Propagate ignore_permissions during mapping from quotation to sales order
This commit is contained in:
parent
201dbbd977
commit
4362443b6e
@ -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()
|
||||
|
@ -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, {
|
||||
|
Loading…
Reference in New Issue
Block a user