ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Incomprehensible error


#1

Hello!
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/app.py”, line 61, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 21, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 56, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1032, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, 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/run_method.py”, line 42, in runserverobj
r = doc.run_method(method, **args)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 772, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1048, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1031, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 766, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/selling/doctype/quotation/quotation.py”, line 78, in declare_order_lost
self.update_lead()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/selling/doctype/quotation/quotation.py”, 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/app.py:
Site: site1.local
Form Dict: {
“cmd”: “frappe.desk.notifications.get_open_count”,
“doctype”: “Lead”,
“items”: “[“Opportunity”,“Quotation”]”,
“name”: “CRM-LEAD-2019-00014”
}


#2

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?