Merge pull request #17550 from dimanex/bugfix/17547-Pricing-Rules-are-broken

Pricing Rules are not queried correctly after removing 'customer' and adding 'party_name' in Quotation #17547
This commit is contained in:
Nabin Hait
2019-05-27 19:24:24 +05:30
committed by GitHub

View File

@@ -237,9 +237,9 @@ class AccountsController(TransactionBase):
document_type = "{} Item".format(self.doctype)
parent_dict.update({"document_type": document_type})
# party_name field used for customer in opportunity and quotation
if not parent_dict.get("customer") and parent_dict.get("party_name"):
parent_dict.update({"customer": parent_dict.get("party_name")})
# party_name field used for customer in quotation
if self.doctype == "Quotation" and self.quotation_to == "Customer" and parent_dict.get("party_name"):
parent_dict.update({"customer": parent_dict.get("party_name")})
for item in self.get("items"):
if item.get("item_code"):