commonified get_party_details

This commit is contained in:
Rushabh Mehta
2014-02-03 16:14:56 +05:30
parent 347889b233
commit cc008cc109
11 changed files with 126 additions and 161 deletions

View File

@@ -33,9 +33,9 @@ class SellingController(StockController):
self.set_taxes("other_charges", "taxes_and_charges")
def set_missing_lead_customer_details(self):
from erpnext.selling.doctype.customer.customer import get_customer_details
from erpnext.accounts.party import get_party_details
if self.doc.customer:
self.doc.update_if_missing(get_customer_details(self.doc.customer))
self.doc.update_if_missing(get_party_details(self.doc.customer))
elif self.doc.lead:
self.doc.update_if_missing(self.get_lead_defaults())