diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index e25fe1752e..8e664ca58d 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -33,13 +33,14 @@ class SellingController(StockController): def set_missing_lead_customer_details(self): if self.doc.customer: - from erpnext.accounts.party import get_party_details - self.doc.update_if_missing(get_party_details(self.doc.customer)) + from erpnext.accounts.party import _get_party_details + self.doc.update_if_missing(_get_party_details(self.doc.customer, + ignore_permissions=self.bean.ignore_permissions)) elif self.doc.lead: from erpnext.selling.doctype.lead.lead import get_lead_details self.doc.update_if_missing(get_lead_details(self.doc.lead)) - + def set_price_list_and_item_details(self): self.set_price_list_currency("Selling") self.set_missing_item_details() diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index ead242b2d9..b108a6a954 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -112,6 +112,7 @@ def _make_sales_order(source_name, target_doclist=None, ignore_permissions=False target[0].customer_name = customer.doc.customer_name si = frappe.bean(target) + si.ignore_permissions = ignore_permissions si.run_method("onload_post_render") doclist = get_mapped_doclist("Quotation", source_name, {