mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 06:59:20 +00:00
refactor(Supplier Group): use frm.is_new() instead of frm.doc.__islocal
This commit is contained in:
@@ -38,7 +38,7 @@ frappe.ui.form.on("Supplier Group", {
|
|||||||
frm.trigger("set_root_readonly");
|
frm.trigger("set_root_readonly");
|
||||||
},
|
},
|
||||||
set_root_readonly: function (frm) {
|
set_root_readonly: function (frm) {
|
||||||
if (!frm.doc.parent_supplier_group && !frm.doc.__islocal) {
|
if (!frm.doc.parent_supplier_group && !frm.is_new()) {
|
||||||
frm.set_read_only();
|
frm.set_read_only();
|
||||||
frm.set_intro(__("This is a root supplier group and cannot be edited."));
|
frm.set_intro(__("This is a root supplier group and cannot be edited."));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user