fix: Ignore default payment term templates when coping payment terms from orders

This commit is contained in:
Deepesh Garg
2021-08-06 23:53:16 +05:30
committed by GangaManoj
parent 072f63b324
commit bcf56e64ba
9 changed files with 1057 additions and 361 deletions

View File

@@ -72,7 +72,8 @@ class BuyingController(StockController, Subcontracting):
# set contact and address details for supplier, if they are not mentioned
if getattr(self, "supplier", None):
self.update_if_missing(get_party_details(self.supplier, party_type="Supplier", ignore_permissions=self.flags.ignore_permissions,
doctype=self.doctype, company=self.company, party_address=self.supplier_address, shipping_address=self.get('shipping_address')))
doctype=self.doctype, company=self.company, party_address=self.supplier_address, shipping_address=self.get('shipping_address'),
fetch_payment_terms_template= not self.get('ignore_default_payment_terms_template')))
self.set_missing_item_details(for_validate)