mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-22 19:06:36 +00:00
fix: inventory dimensions columns visibility depends on filter
(cherry picked from commit 2b411fb7f5)
This commit is contained in:
committed by
Mergify
parent
8276e8e8b3
commit
fe0e5c2d48
@@ -263,6 +263,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);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -406,16 +406,17 @@ class StockBalanceReport:
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
for dimension in get_inventory_dimensions():
|
if self.filters.get("show_dimension_wise_stock"):
|
||||||
columns.append(
|
for dimension in get_inventory_dimensions():
|
||||||
{
|
columns.append(
|
||||||
"label": _(dimension.doctype),
|
{
|
||||||
"fieldname": dimension.fieldname,
|
"label": _(dimension.doctype),
|
||||||
"fieldtype": "Link",
|
"fieldname": dimension.fieldname,
|
||||||
"options": dimension.doctype,
|
"fieldtype": "Link",
|
||||||
"width": 110,
|
"options": dimension.doctype,
|
||||||
}
|
"width": 110,
|
||||||
)
|
}
|
||||||
|
)
|
||||||
|
|
||||||
columns.extend(
|
columns.extend(
|
||||||
[
|
[
|
||||||
|
|||||||
Reference in New Issue
Block a user