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.
(cherry picked from commit 1b18105bce)
This commit is contained in:
@@ -323,7 +323,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")
|
||||
|
||||
doclist = get_mapped_doc(
|
||||
"Lead",
|
||||
|
||||
Reference in New Issue
Block a user