From 6bff9d39e312dc5a5f157def06cbfaa8b5a54fa6 Mon Sep 17 00:00:00 2001 From: RitvikSardana Date: Tue, 16 Apr 2024 12:20:16 +0530 Subject: [PATCH] fix: remove validate_name_in_customer function (cherry picked from commit 2b32d3644f909ba34a429c607335a0b7b54d7953) --- erpnext/setup/doctype/customer_group/customer_group.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/erpnext/setup/doctype/customer_group/customer_group.py b/erpnext/setup/doctype/customer_group/customer_group.py index 06f2f43374e..5dd0fd02011 100644 --- a/erpnext/setup/doctype/customer_group/customer_group.py +++ b/erpnext/setup/doctype/customer_group/customer_group.py @@ -71,14 +71,9 @@ class CustomerGroup(NestedSet): ) def on_update(self): - self.validate_name_with_customer() super().on_update() self.validate_one_root() - def validate_name_with_customer(self): - if frappe.db.exists("Customer", self.name): - frappe.msgprint(_("A customer with the same name already exists"), raise_exception=1) - def get_parent_customer_groups(customer_group): lft, rgt = frappe.db.get_value("Customer Group", customer_group, ["lft", "rgt"])