[fix] [minor] get customer default only if customer has value

This commit is contained in:
Anand Doshi 2013-08-27 14:20:00 +05:30
parent 252d14a85e
commit 047f8d734b

View File

@ -55,6 +55,8 @@ class TransactionBase(StatusUpdater):
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)