fix: inventory dimensions columns visibility depends on filter

This commit is contained in:
Rohit Waghchaure
2025-04-07 11:47:27 +05:30
parent 27deed6d94
commit 2b411fb7f5
2 changed files with 15 additions and 10 deletions

View File

@@ -267,6 +267,10 @@ $.extend(erpnext.utils, {
fieldname: dimension["fieldname"], fieldname: dimension["fieldname"],
label: __(dimension["doctype"]), label: __(dimension["doctype"]),
fieldtype: "MultiSelectList", fieldtype: "MultiSelectList",
depends_on:
report_name === "Stock Balance"
? "eval:doc.show_dimension_wise_stock === 1"
: "",
get_data: function (txt) { get_data: function (txt) {
return frappe.db.get_link_options(dimension["doctype"], txt); return frappe.db.get_link_options(dimension["doctype"], txt);
}, },

View File

@@ -420,6 +420,7 @@ class StockBalanceReport:
}, },
] ]
if self.filters.get("show_dimension_wise_stock"):
for dimension in get_inventory_dimensions(): for dimension in get_inventory_dimensions():
columns.append( columns.append(
{ {