Server error when creating a purchase order

Dear All, I have the following server error which pops up when creating a purchase order from a material request. This errors comes after I tried to customize the system to include a work flow. (Purchase order approval process). the process did not work out well so i deleted the work flow process.

But when i try to make a purchase order from a material request below is the error message i get

Any help please

Dickson Asiku

Traceback (innermost last):
File “/home/dicksona/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 18, in savedocs
doc.save()
File “/home/dicksona/frappe-bench/apps/frappe/frappe/model/document.py”, line 231, in save
self.insert()
File “/home/dicksona/frappe-bench/apps/frappe/frappe/model/document.py”, line 203, in insert
self.db_insert()
File “/home/dicksona/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 277, in db_insert
), d.values())
File “/home/dicksona/frappe-bench/apps/frappe/frappe/database.py”, line 136, in sql
self._cursor.execute(query, values)
File “/home/dicksona/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/dicksona/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1054, “Unknown column ‘purchase approval’ in ‘field list’”)

Traceback (innermost last):
File “/home/dicksona/frappe-bench/apps/frappe/frappe/app.py”, line 57, in application
response = frappe.handler.handle()
File “/home/dicksona/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/dicksona/frappe-bench/apps/frappe/frappe/handler.py”, line 36, in execute_cmd
**ret = frappe.call(method, frappe.form_dict)
File “/home/dicksona/frappe-bench/apps/frappe/frappe/init.py”, line 806, in call
**return fn(*args, newargs)
File “/home/dicksona/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 18, in savedocs
doc.save()
File “/home/dicksona/frappe-bench/apps/frappe/frappe/model/document.py”, line 231, in save
self.insert()
File “/home/dicksona/frappe-bench/apps/frappe/frappe/model/document.py”, line 203, in insert
self.db_insert()
File “/home/dicksona/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 277, in db_insert
), d.values())
File “/home/dicksona/frappe-bench/apps/frappe/frappe/database.py”, line 136, in sql
self._cursor.execute(query, values)
File “/home/dicksona/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/dicksona/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1054, “Unknown column ‘purchase approval’ in ‘field list’”)

Hello,

Thanks for elaborating your query.

Error message indicates that “purchase approval” field was not inserted correctly as a Custom Field. To fix this issue, go to:

  1. Purchase Order List > Menu > Customize
  2. Remove “purchase approval” field from the table of fields.
  3. Update Customize Form.
  4. Reload your ERPNext account.
  5. Try creating Purchase Order from Material Request.

Hope this works for you.

@neilLasrado can you please check into this issue?

1 Like

Hello Umair, thanks very much for the response.

i have followed all your steps, however when i try to update the form, the system gives me the following error 1060, "Duplicate column name ‘purchase_approval’"

i have tried to locate the duplicate column but failed

thanks

Dickson Asiku

Dear Umair, I am still experiencing a problem when i try to update the form.
When i remove purchase approval column and i try to update the form, the system is still bringing up an error.

1060, “Duplicate column name ‘purchase_approval’”

Please i need your help to rectify this.

Thanks
Dickson Asiku