Show Stock Level section only to stock maintain items (#11073)
This commit is contained in:
parent
bf3b54f658
commit
e31757b001
@ -249,15 +249,18 @@ $.extend(erpnext.item, {
|
|||||||
if(frm.doc.__islocal)
|
if(frm.doc.__islocal)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
frappe.require('assets/js/item-dashboard.min.js', function() {
|
// Show Stock Levels only if is_stock_item
|
||||||
var section = frm.dashboard.add_section('<h5 style="margin-top: 0px;">\
|
if (frm.doc.is_stock_item) {
|
||||||
<a href="#stock-balance">' + __("Stock Levels") + '</a></h5>');
|
frappe.require('assets/js/item-dashboard.min.js', function() {
|
||||||
erpnext.item.item_dashboard = new erpnext.stock.ItemDashboard({
|
var section = frm.dashboard.add_section('<h5 style="margin-top: 0px;">\
|
||||||
parent: section,
|
<a href="#stock-balance">' + __("Stock Levels") + '</a></h5>');
|
||||||
item_code: frm.doc.name
|
erpnext.item.item_dashboard = new erpnext.stock.ItemDashboard({
|
||||||
|
parent: section,
|
||||||
|
item_code: frm.doc.name
|
||||||
|
});
|
||||||
|
erpnext.item.item_dashboard.refresh();
|
||||||
});
|
});
|
||||||
erpnext.item.item_dashboard.refresh();
|
}
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
edit_prices_button: function(frm) {
|
edit_prices_button: function(frm) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user