Error while setting any filter in sales invoice

Check the following error i get

Traceback (most recent call last):
File “/home/erpdev/frappe-bench/apps/frappe/frappe/”, line 57, in application
response = frappe.handler.handle()
File “/home/erpdev/frappe-bench/apps/frappe/frappe/”, line 22, in handle
data = execute_cmd(cmd)
File “/home/erpdev/frappe-bench/apps/frappe/frappe/”, line 53, in execute_cmd
return, **frappe.form_dict)
File “/home/erpdev/frappe-bench/apps/frappe/frappe/”, line 935, in call
return fn(*args, **newargs)
File “/home/erpdev/frappe-bench/apps/frappe/frappe/model/”, line 590, in get_count
return frappe.db.count(doctype, filters=filters)
File “/home/erpdev/frappe-bench/apps/frappe/frappe/”, line 802, in count
from tab%s where %s"“” % (dt, conditions), filters, debug=debug)[0][0]
File “/home/erpdev/frappe-bench/apps/frappe/frappe/”, line 152, in sql
self._cursor.execute(query, values)
File “/home/erpdev/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/”, line 250, in execute
self.errorhandler(self, exc, value)
File “/home/erpdev/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/”, line 50, in defaulterrorhandler
raise errorvalue
OperationalError: (1054, “Unknown column ‘item_code’ in ‘where clause’”)

have some filter types been removed in the latest pull?
Also same error in stock entry,


A fix for this has already been pushed #4398 , you can pull it after its merged :+1:

1 Like

has the fix been merged yet… still getting the error after the latest pull.

Nope not yet, will be soon though :+1:

Thanks for all the effort.

I see the fix has been merged .
But i am getting the same error after the latest pull.

Error comes whenever i want to see all the sales invoices or stock entry for a particular item.


Can you share the error log and also a gif as to what you’re doing ?

Ok it is working now…
i had forgotten to migrate after the pull.

Thanks a ton .