[hotfix] create customer contact and address from lead only on create
This commit is contained in:
parent
e9b14e497b
commit
5532a14938
@ -33,6 +33,7 @@ class Customer(TransactionBase):
|
||||
frappe.throw(_("Series is mandatory"), frappe.MandatoryError)
|
||||
|
||||
def validate(self):
|
||||
self.flags.is_new_doc = self.is_new()
|
||||
self.validate_mandatory()
|
||||
validate_accounting_currency(self)
|
||||
validate_party_account(self)
|
||||
@ -76,7 +77,9 @@ class Customer(TransactionBase):
|
||||
self.update_lead_status()
|
||||
self.update_address()
|
||||
self.update_contact()
|
||||
self.create_lead_address_contact()
|
||||
|
||||
if self.flags.is_new_doc:
|
||||
self.create_lead_address_contact()
|
||||
|
||||
def validate_name_with_customer_group(self):
|
||||
if frappe.db.exists("Customer Group", self.name):
|
||||
|
Loading…
x
Reference in New Issue
Block a user