mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-29 22:58:25 +00:00
fix: do not translate root Item Group lookup key
_("All Item Groups") resolves in the session language, so for
non-English users the db.exists lookup missed the root (stored in
English) and new groups were saved parentless, becoming uneditable
second roots.
Closes #57345
This commit is contained in:
@@ -32,8 +32,8 @@ class ItemGroup(NestedSet):
|
|||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
if not self.parent_item_group and not frappe.in_test:
|
if not self.parent_item_group and not frappe.in_test:
|
||||||
if frappe.db.exists("Item Group", _("All Item Groups")):
|
if frappe.db.exists("Item Group", "All Item Groups"):
|
||||||
self.parent_item_group = _("All Item Groups")
|
self.parent_item_group = "All Item Groups"
|
||||||
self.validate_item_group_defaults()
|
self.validate_item_group_defaults()
|
||||||
self.check_item_tax()
|
self.check_item_tax()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user