AttributeError: 'Quotation' object has no attribute 'customer'

This is new, I updated today to 11.1.18 and now I have the error above

Traceback (most recent call last):
` File “/home/tony/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/tony/frappe-bench/apps/frappe/frappe/model/document.py”, line 260, in save
return self._save(*args, **kwargs)
File “/home/tony/frappe-bench/apps/frappe/frappe/model/document.py”, line 283, in _save
self.insert()
File “/home/tony/frappe-bench/apps/frappe/frappe/model/document.py”, line 222, in insert
self.run_before_save_methods()
File “/home/tony/frappe-bench/apps/frappe/frappe/model/document.py”, line 876, in run_before_save_methods
self.run_method(“validate”)
File “/home/tony/frappe-bench/apps/frappe/frappe/model/document.py”, line 772, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/tony/frappe-bench/apps/frappe/frappe/model/document.py”, line 1048, in composer
return composed(self, method, *args, **kwargs)
File “/home/tony/frappe-bench/apps/frappe/frappe/model/document.py”, line 1031, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/tony/frappe-bench/apps/frappe/frappe/model/document.py”, line 766, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/tony/frappe-bench/apps/erpnext/erpnext/selling/doctype/quotation/quotation.py”, line 31, in validate
self.validate_valid_till()
File “/home/tony/frappe-bench/apps/erpnext/erpnext/selling/doctype/quotation/quotation.py”, line 47, in validate_quotation_to
if self.quotation_to == “Lead” and self.party_name:
AttributeError: ‘Quotation’ object has no attribute ‘customer’

Traceback (most recent call last):
File “/home/tony/frappe-bench/apps/frappe/frappe/app.py”, line 61, in application
response = frappe.handler.handle()
File “/home/tony/frappe-bench/apps/frappe/frappe/handler.py”, line 21, in handle
data = execute_cmd(cmd)
File “/home/tony/frappe-bench/apps/frappe/frappe/handler.py”, line 56, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/tony/frappe-bench/apps/frappe/frappe/init.py”, line 1027, in call
if isinstance(fn, string_types):
File “/home/tony/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/tony/frappe-bench/apps/frappe/frappe/model/document.py”, line 260, in save
return self._save(*args, **kwargs)
File “/home/tony/frappe-bench/apps/frappe/frappe/model/document.py”, line 283, in _save
self.insert()
File “/home/tony/frappe-bench/apps/frappe/frappe/model/document.py”, line 222, in insert
self.run_before_save_methods()
File “/home/tony/frappe-bench/apps/frappe/frappe/model/document.py”, line 876, in run_before_save_methods
self.run_method(“validate”)
File “/home/tony/frappe-bench/apps/frappe/frappe/model/document.py”, line 772, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/tony/frappe-bench/apps/frappe/frappe/model/document.py”, line 1048, in composer
return composed(self, method, *args, **kwargs)
File “/home/tony/frappe-bench/apps/frappe/frappe/model/document.py”, line 1031, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/tony/frappe-bench/apps/frappe/frappe/model/document.py”, line 766, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/tony/frappe-bench/apps/erpnext/erpnext/selling/doctype/quotation/quotation.py”, line 31, in validate
self.validate_valid_till()
File “/home/tony/frappe-bench/apps/erpnext/erpnext/selling/doctype/quotation/quotation.py”, line 47, in validate_quotation_to
if self.quotation_to == “Lead” and self.party_name:
AttributeError: ‘Quotation’ object has no attribute ‘customer’`

It has been fixed in the latest version, please update.

I still have this error after updating

I also have a similar issue with payroll now. Can somebody please help?

Explain the issue regarding the payroll.

This has been reported several times by my colleague:

AttributeError: ‘SalaryDetail’ object has no attribute 'depends_on_lwp

Best Regards,

Am I the only person with this problem, I still have this and I still cannot generate quotations.

Hmm, it looks like the patch written to handle renaming on field depends_on_lwp was not executed on your ERPNext instance.

Try executing bench update and see if the patch gets executed.

If above doesn’t work, you might have to delete the patch log from the database (bench mariadb) by executing following SQL query:

delete from `tabPatch Log` where patch like '%rename_depends_on_lwp%';

After executing above SQL query, run bench update --patch.

does this address both the:
AttributeError: ‘Quotation’ object has no attribute ‘customer’`
and
AttributeError: ‘SalaryDetail’ object has no attribute ‘depends_on_lwp’
?

Also is there a log where I can find possible errors like this…

For the error relating to quotation, try executing the following code in the bench console:

frappe.reload_doc('selling', 'doctype', 'quotation', force=1)
frappe.db.commit()