I keep getting the following error when I try to create a purchase order from a sales order and try to save the purchase.
I have updated and migrated successfully but the error remains.
My site is hosted on frappe cloud.
Any suggestions would be appreciated.
Installed Apps
ERPNext: v13.40.2 (HEAD)
Frappe Framework: v13.41.7 (HEAD)
Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 69, in application
response = frappe.api.handle()
File “apps/frappe/frappe/api.py”, line 55, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/handler.py”, line 38, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 76, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “apps/frappe/frappe/init.py”, line 1457, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/desk/form/save.py”, line 24, in savedocs
doc.save()
File “apps/frappe/frappe/model/document.py”, line 310, in save
return self._save(*args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 332, in _save
return self.insert()
File “apps/frappe/frappe/model/document.py”, line 261, in insert
self.run_before_save_methods()
File “apps/frappe/frappe/model/document.py”, line 1052, in run_before_save_methods
self.run_method(“validate”)
File “apps/frappe/frappe/model/document.py”, line 941, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 1261, in composer
return composed(self, method, *args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 1243, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “apps/frappe/frappe/model/document.py”, line 938, in fn
return method_object(*args, **kwargs)
File “apps/erpnext/erpnext/buying/doctype/purchase_order/purchase_order.py”, line 54, in validate
super(PurchaseOrder, self).validate()
File “apps/erpnext/erpnext/controllers/buying_controller.py”, line 33, in validate
super(BuyingController, self).validate()
File “apps/erpnext/erpnext/controllers/stock_controller.py”, line 42, in validate
super(StockController, self).validate()
File “apps/erpnext/erpnext/controllers/accounts_controller.py”, line 155, in validate
self.set_incoming_rate()
File “apps/erpnext/erpnext/controllers/buying_controller.py”, line 307, in set_incoming_rate
frappe.db.get_value(ref_doctype, d.get(frappe.scrub(ref_doctype)), field)
File “apps/frappe/frappe/database/database.py”, line 469, in get_value
limit=1,
File “apps/frappe/frappe/database/database.py”, line 540, in get_values
limit=limit,
File “apps/frappe/frappe/database/database.py”, line 739, in _get_values_from_table
update=update,
File “apps/frappe/frappe/database/database.py”, line 174, in sql
self._cursor.execute(query, values)
File “env/lib/python3.7/site-packages/pymysql/cursors.py”, line 148, in execute
result = self._query(query)
File “env/lib/python3.7/site-packages/pymysql/cursors.py”, line 310, in _query
conn.query(q)
File “env/lib/python3.7/site-packages/pymysql/connections.py”, line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “env/lib/python3.7/site-packages/pymysql/connections.py”, line 775, in _read_query_result
result.read()
File “env/lib/python3.7/site-packages/pymysql/connections.py”, line 1156, in read
first_packet = self.connection._read_packet()
File “env/lib/python3.7/site-packages/pymysql/connections.py”, line 725, in _read_packet
packet.raise_for_error()
File “env/lib/python3.7/site-packages/pymysql/protocol.py”, line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File “env/lib/python3.7/site-packages/pymysql/err.py”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, “Unknown column ‘incoming_rate’ in ‘field list’”)