mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 23:49:19 +00:00
[fix] [minor] get customer default only if customer has value
This commit is contained in:
@@ -55,6 +55,8 @@ class TransactionBase(StatusUpdater):
|
|||||||
return self._party_type_and_name
|
return self._party_type_and_name
|
||||||
|
|
||||||
def get_customer_defaults(self):
|
def get_customer_defaults(self):
|
||||||
|
if not self.doc.customer: return {}
|
||||||
|
|
||||||
out = self.get_default_address_and_contact("customer")
|
out = self.get_default_address_and_contact("customer")
|
||||||
|
|
||||||
customer = webnotes.doc("Customer", self.doc.customer)
|
customer = webnotes.doc("Customer", self.doc.customer)
|
||||||
|
|||||||
Reference in New Issue
Block a user