Unknown column 'repost_required' in 'field list

why am I Getting This error While Cancel Sales Invoice

Hello,

ERPNext version ?

Could you put the result if copy Error to clipboards ?

App Versions

{
	"erpnext": "14.0.0-dev",
	"frappe": "14.0.0-dev",
	"india_compliance": "14.0.0",
	"library_management": "0.0.1",
	"payments": "0.0.1"
}

Route

Form/Sales Invoice/SINV-22-00047

Trackeback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 58, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 53, in handle
    return _RESTAPIHandler(call, doctype, name).get_response()
  File "apps/frappe/frappe/api.py", line 69, in get_response
    return self.handle_method()
  File "apps/frappe/frappe/api.py", line 79, in handle_method
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 45, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 83, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1584, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/save.py", line 40, in cancel
    doc.cancel()
  File "apps/frappe/frappe/model/document.py", line 1019, in cancel
    return self._cancel()
  File "apps/frappe/frappe/model/document.py", line 999, in _cancel
    return self.save()
  File "apps/frappe/frappe/model/document.py", line 300, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 351, in _save
    self.run_post_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1095, in run_post_save_methods
    self.run_method("on_cancel")
  File "apps/frappe/frappe/model/document.py", line 927, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1271, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1253, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 924, in fn
    return method_object(*args, **kwargs)
  File "apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py", line 377, in on_cancel
    self.db_set("repost_required", 0)
  File "apps/frappe/frappe/model/document.py", line 1177, in db_set
    frappe.db.set_value(
  File "apps/frappe/frappe/database/database.py", line 895, in set_value
    query.run(debug=debug)
  File "apps/frappe/frappe/query_builder/utils.py", line 76, in execute_query
    return frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
  File "apps/frappe/frappe/database/database.py", line 210, in sql
    self._cursor.execute(query, values)
  File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 148, in execute
    result = self._query(query)
  File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 310, in _query
    conn.query(q)
  File "env/lib/python3.10/site-packages/pymysql/connections.py", line 548, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "env/lib/python3.10/site-packages/pymysql/connections.py", line 775, in _read_query_result
    result.read()
  File "env/lib/python3.10/site-packages/pymysql/connections.py", line 1156, in read
    first_packet = self.connection._read_packet()
  File "env/lib/python3.10/site-packages/pymysql/connections.py", line 725, in _read_packet
    packet.raise_for_error()
  File "env/lib/python3.10/site-packages/pymysql/protocol.py", line 221, in raise_for_error
    err.raise_mysql_exception(self._data)
  File "env/lib/python3.10/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, "Unknown column 'repost_required' in 'field list'")

Request Data

{
	"type": "POST",
	"args": {
		"doctype": "Sales Invoice",
		"name": "SINV-22-00047"
	},
	"btn": {
		"jQuery360060353601610376951": {
			"events": {
				"click": [
					{
						"type": "click",
						"origType": "click",
						"guid": 7087,
						"namespace": ""
					}
				]
			}
		}
	},
	"freeze": true,
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.form.save.cancel"
}

Response Data

{
	"exception": "pymysql.err.OperationalError: (1054, \"Unknown column 'repost_required' in 'field list'\")"
}

You should upgrade to next version-14 erpnext/frappe with the command

bench update