Incomprehensible error

I get an error while trying to delete the Lead with the number CRM-LEAD-2019-00014. Logs below. Please help me deal with the problem.

Request Error
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 61, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 21, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 56, in execute_cmd
return, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 1032, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 84, in runserverobj
frappe.desk.form.run_method.runserverobj(method, docs=docs, dt=dt, dn=dn, arg=arg, args=args)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/”, line 42, in runserverobj
r = doc.run_method(method, **args)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 772, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 1048, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 1031, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 766, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/selling/doctype/quotation/”, line 78, in declare_order_lost
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/selling/doctype/quotation/”, line 47, in update_lead
if self.quotation_to == “Lead” and self.party_name:
AttributeError: ‘Quotation’ object has no attribute ‘party_name’
[ERROR] 2019-08-08 09:07:48,187 | /home/frappe/frappe-bench/apps/frappe/frappe/
Site: site1.local
Form Dict: {
“cmd”: “frappe.desk.notifications.get_open_count”,
“doctype”: “Lead”,
“items”: “["Opportunity","Quotation"]”,
“name”: “CRM-LEAD-2019-00014”

You many need to check if there is a field called party_name in your doctype Quotation. If it exists then maybe you need to reload the doctype from the console and recheck.

Is this a recently upgraded instance?