When I tried to “Add to Quote” from the website, this error is coming, But the Quotation is created in the Quotation form.
I also did a bench update , after that also this error is coming.
Error Screen-shot
Can anyone help me why is this issue occurring?
NCP
May 29, 2024, 11:18am
3
Issue has been already raised.
opened 02:19PM - 11 Apr 24 UTC
When I click "Request for Quote" on a cart with some items, I get an "uncaught s… erver exception: There was an error building this page". The stack trace is:
```
Traceback (most recent call last):
File "apps/frappe/frappe/website/serve.py", line 20, in get_response
response = renderer_instance.render()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/website/page_renderers/template_page.py", line 84, in render
html = self.get_html()
^^^^^^^^^^^^^^^
File "apps/frappe/frappe/website/utils.py", line 523, in cache_html_decorator
html = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/website/page_renderers/template_page.py", line 95, in get_html
self.update_context()
File "apps/frappe/frappe/website/page_renderers/template_page.py", line 163, in update_context
data = self.run_pymodule_method("get_context")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/website/page_renderers/template_page.py", line 223, in run_pymodule_method
return method(self.context)
^^^^^^^^^^^^^^^^^^^^
File "apps/webshop/webshop/templates/pages/order.py", line 43, in get_context
"Customer", context.doc.customer, "loyalty_program"
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Quotation' object has no attribute 'customer'
```
I found the issue being discussed recently in this forum: https://discuss.frappe.io/t/attributeerror-quotation-object-has-no-attribute-customer-in-v14-3-1/97342/2
The fix suggested there is to change `context.doc.customer` to `context.doc.customer_name` on line 43 of webshopt/templates/pages/order.py. I also found I needed to make the same change on line 53. After making these changes everything has been working well for me.
Thank you.
Hello,
Any update on this ??
NCP
August 21, 2024, 12:37pm
6
PR already PR, so open it and check it.