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)
|
||||
return;
|
||||
|
||||
frappe.require('assets/js/item-dashboard.min.js', function() {
|
||||
var section = frm.dashboard.add_section('<h5 style="margin-top: 0px;">\
|
||||
<a href="#stock-balance">' + __("Stock Levels") + '</a></h5>');
|
||||
erpnext.item.item_dashboard = new erpnext.stock.ItemDashboard({
|
||||
parent: section,
|
||||
item_code: frm.doc.name
|
||||
// Show Stock Levels only if is_stock_item
|
||||
if (frm.doc.is_stock_item) {
|
||||
frappe.require('assets/js/item-dashboard.min.js', function() {
|
||||
var section = frm.dashboard.add_section('<h5 style="margin-top: 0px;">\
|
||||
<a href="#stock-balance">' + __("Stock Levels") + '</a></h5>');
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user