After upgrade to V 7.1.10 for ERPNext

Dear all,
After upgrade to Version 7.1.10 ERPNext is now giving me this error when creating a new Sales Order and selecting the Client:

Traceback (most recent call last):
File “/home/helio/frappe-bench/apps/frappe/frappe/”, line 55, in application
response = frappe.handler.handle()
File “/home/helio/frappe-bench/apps/frappe/frappe/”, line 19, in handle
File “/home/helio/frappe-bench/apps/frappe/frappe/”, line 36, in execute_cmd
ret =, **frappe.form_dict)
File “/home/helio/frappe-bench/apps/frappe/frappe/”, line 890, in call
return fn(*args, **newargs)
File “/home/helio/frappe-bench/apps/frappe/frappe/desk/form/”, line 44, in validate_link
% (fetch, frappe.db.escape(options), ‘%s’), (value,))[0]]
File “/home/helio/frappe-bench/apps/frappe/frappe/”, line 137, in sql
self._cursor.execute(query, values)
File “/home/helio/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/helio/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1054, “Unknown column ‘payment_terms’ in ‘field list’”)

can you run again bench update.

I’ve done that many times and still. If I raise a Quotation and after, raise a new order the problem does not show up.


Try reloading the doctype Sales Order and Quotation as follows from bench console

frappe.db.reload_doctype('Sales Order')

and then run bench --site all migrate

Hope that helps to solve your problem.

@shreyasp thanks for the tip.
I have run bench.console and run the reload_doctype and after the migrate for the sites i have and the problem still persist.
Does this error comes from a PY file as i dont see any information error on the console? How can i check which file or function is causing this problem?


It seems payment_terms that you mention is a custom field. Moreover, If you have added, payment_terms as part of search field in customize the form. If that’s the case then remove “payment_terms” from the search and your problem should get resolved.

@shreyasp once again thanks for the support … it really was a field added in one of my client side scripts.
problem solved when more than one eye analyzing.