mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-16 07:58:38 +00:00
Merge pull request #57390 from mihir-kandoi/fix-item-group-root-lookup
fix: do not translate root Item Group lookup key
This commit is contained in:
@@ -32,8 +32,11 @@ class ItemGroup(NestedSet):
|
||||
|
||||
def validate(self):
|
||||
if not self.parent_item_group and not frappe.in_test:
|
||||
if frappe.db.exists("Item Group", _("All Item Groups")):
|
||||
self.parent_item_group = _("All Item Groups")
|
||||
root = frappe.db.get_value(
|
||||
"Item Group", {"parent_item_group": ("is", "not set"), "is_group": 1}, order_by="lft asc"
|
||||
)
|
||||
if root and root != self.name:
|
||||
self.parent_item_group = root
|
||||
self.validate_item_group_defaults()
|
||||
self.check_item_tax()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user