Merge pull request #46893 from rohitwaghchaure/fixed-support-35192

fix: inventory dimensions columns visibility depends on filter
This commit is contained in:
rohitwaghchaure
2025-04-08 08:49:33 +05:30
committed by GitHub
2 changed files with 15 additions and 10 deletions

View File

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

View File

@@ -420,16 +420,17 @@ class StockBalanceReport:
},
]
for dimension in get_inventory_dimensions():
columns.append(
{
"label": _(dimension.doctype),
"fieldname": dimension.fieldname,
"fieldtype": "Link",
"options": dimension.doctype,
"width": 110,
}
)
if self.filters.get("show_dimension_wise_stock"):
for dimension in get_inventory_dimensions():
columns.append(
{
"label": _(dimension.doctype),
"fieldname": dimension.fieldname,
"fieldtype": "Link",
"options": dimension.doctype,
"width": 110,
}
)
columns.extend(
[