mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-29 11:38:32 +00:00
Merge pull request #41025 from RitvikSardana/develop-ritvik-remove-customer-check
fix: remove validate_name_in_customer function
This commit is contained in:
@@ -40,14 +40,9 @@ class CustomerGroup(NestedSet):
|
||||
self.parent_customer_group = get_root_of("Customer Group")
|
||||
|
||||
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"])
|
||||
|
||||
Reference in New Issue
Block a user