mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
[hotfix] create customer contact and address from lead only on create
This commit is contained in:
@@ -33,6 +33,7 @@ class Customer(TransactionBase):
|
|||||||
frappe.throw(_("Series is mandatory"), frappe.MandatoryError)
|
frappe.throw(_("Series is mandatory"), frappe.MandatoryError)
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
|
self.flags.is_new_doc = self.is_new()
|
||||||
self.validate_mandatory()
|
self.validate_mandatory()
|
||||||
validate_accounting_currency(self)
|
validate_accounting_currency(self)
|
||||||
validate_party_account(self)
|
validate_party_account(self)
|
||||||
@@ -76,6 +77,8 @@ class Customer(TransactionBase):
|
|||||||
self.update_lead_status()
|
self.update_lead_status()
|
||||||
self.update_address()
|
self.update_address()
|
||||||
self.update_contact()
|
self.update_contact()
|
||||||
|
|
||||||
|
if self.flags.is_new_doc:
|
||||||
self.create_lead_address_contact()
|
self.create_lead_address_contact()
|
||||||
|
|
||||||
def validate_name_with_customer_group(self):
|
def validate_name_with_customer_group(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user