commit | 047f8d734bd20c71722c13bbfbb67fe369e371a6 | [log] [tgz] |
---|---|---|
author | Anand Doshi <anand@erpnext.com> | Tue Aug 27 14:20:00 2013 +0530 |
committer | Anand Doshi <anand@erpnext.com> | Tue Aug 27 14:20:00 2013 +0530 |
tree | 4708040cfe66fff5347a7bff17545b42e479ec0f | |
parent | 252d14a85e9a1605ac6506d35fccb0d5691bd68c [diff] |
[fix] [minor] get customer default only if customer has value
diff --git a/utilities/transaction_base.py b/utilities/transaction_base.py index d2bffcf..aace0cb 100644 --- a/utilities/transaction_base.py +++ b/utilities/transaction_base.py
@@ -55,6 +55,8 @@ return self._party_type_and_name def get_customer_defaults(self): + if not self.doc.customer: return {} + out = self.get_default_address_and_contact("customer") customer = webnotes.doc("Customer", self.doc.customer)