Error creating new sales invoice [solved]

Hello there.

I encountered following error when i open sales invoice list. When i click close and go for creating new sales invoice, i see New Sales Invoice XX, but i am unable to save it.

"
Traceback (innermost last):
File “/home/emergent/frappe-bench/apps/frappe/frappe/app.py”, line 51, in application
response = frappe.handler.handle()
File “/home/emergent/frappe-bench/apps/frappe/frappe/handler.py”, line 66, in handle
execute_cmd(cmd)
File “/home/emergent/frappe-bench/apps/frappe/frappe/handler.py”, line 89, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/emergent/frappe-bench/apps/frappe/frappe/init.py”, line 532, in call
return fn(*args, **newargs)
File “/home/emergent/frappe-bench/apps/frappe/frappe/widgets/reportview.py”, line 14, in get
return compress(execute(**get_form_params()))
File “/home/emergent/frappe-bench/apps/frappe/frappe/widgets/reportview.py”, line 20, in execute
order_by, limit_start, limit_page_length, as_list, with_childnames, debug, ignore_permissions)
File “/home/emergent/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 47, in execute
return self.build_and_run()
File “/home/emergent/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 59, in build_and_run
return frappe.db.sql(query, as_dict=not self.as_list, debug=self.debug)
File “/home/emergent/frappe-bench/apps/frappe/frappe/database.py”, line 121, in sql
self._cursor.execute(query)
File “/home/emergent/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/emergent/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1054, “Unknown column ‘tabSales Invoice.customer_section’ in ‘field list’”)
"

Do,

bench frappe --latest

will solve this error.

1 Like

Nothing happened…
Same error…
That command updated frappe,erpnext and shoping cart.
Do i need to anything else?
I also restarted my production server…
How can i check server log?

This error come if you don’t have certain field in database but that field is present in /Customize Form or SQL statement.

Please check Sales Invoice customize form, there may be custom field ‘customer_section’
Remove that field and update it again.

Do you have multiple site.

bench frappe --latest

should solve this.

If you have multiple site then please do

bench frappe --latest all

So that it will update all site.

No i have only one site set up by default via install script.

Thank you @kolate_sambhaji, by reset defaults in customizing of sales invoice form, i am back to normal.

1 Like