fix: customer_group import from lead to customer (#48266)
In case customization happens and the lead has the field "customer_group", the get_mapped_doc function would fail and be overwritten by the default value.
This commit is contained in:
@@ -327,7 +327,8 @@ def _make_customer(source_name, target_doc=None, ignore_permissions=False):
|
||||
target.customer_type = "Individual"
|
||||
target.customer_name = source.lead_name
|
||||
|
||||
target.customer_group = frappe.db.get_default("Customer Group")
|
||||
if not target.customer_group:
|
||||
target.customer_group = frappe.db.get_default("Customer Group")
|
||||
|
||||
address = get_default_address("Lead", source.name)
|
||||
contact = get_default_contact("Lead", source.name)
|
||||
|
||||
Reference in New Issue
Block a user