fix: invalid filter on item_group (backport #55186) (#55187)

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
fix: invalid filter on item_group (#55186)
This commit is contained in:
mergify[bot]
2026-05-22 16:49:10 +05:30
committed by GitHub
parent 425e6c52f4
commit 25739ae217

View File

@@ -226,13 +226,6 @@ frappe.ui.form.on("Item", {
}); });
frm.set_df_property("is_fixed_asset", "read_only", frm.doc.__onload?.asset_exists ? 1 : 0); frm.set_df_property("is_fixed_asset", "read_only", frm.doc.__onload?.asset_exists ? 1 : 0);
frm.toggle_reqd("customer", frm.doc.is_customer_provided_item ? 1 : 0); frm.toggle_reqd("customer", frm.doc.is_customer_provided_item ? 1 : 0);
frm.set_query("item_group", () => {
return {
filters: {
is_group: 0,
},
};
});
}, },
validate: function (frm) { validate: function (frm) {
@@ -411,12 +404,6 @@ $.extend(erpnext.item, {
}; };
}; };
frm.fields_dict["item_group"].get_query = function (doc, cdt, cdn) {
return {
filters: [["Item Group", "docstatus", "!=", 2]],
};
};
frm.fields_dict["item_defaults"].grid.get_field("deferred_revenue_account").get_query = function ( frm.fields_dict["item_defaults"].grid.get_field("deferred_revenue_account").get_query = function (
doc, doc,
cdt, cdt,