Set default only if customer_address not found (#15605)

* Set default only if customer_address not found

* Similar fix for Purchase Invoice and shipping_address
This commit is contained in:
Shreya Shah
2018-10-07 11:42:07 +05:30
committed by Nabin Hait
parent e7e269d4a4
commit 5615cb4735
3 changed files with 13 additions and 12 deletions

View File

@@ -68,7 +68,8 @@ class BuyingController(StockController):
# 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))
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))
self.set_missing_item_details(for_validate)