fix: stock levels disapperaing on refresh
refresh_section removes all sections with `custom` class, added different class to avoid this behaviour.
This commit is contained in:
parent
e39a7f29e2
commit
b99469cdab
@ -93,7 +93,7 @@ frappe.ui.form.on("Item", {
|
||||
|
||||
erpnext.item.edit_prices_button(frm);
|
||||
erpnext.item.toggle_attributes(frm);
|
||||
|
||||
|
||||
if (!frm.doc.is_fixed_asset) {
|
||||
erpnext.item.make_dashboard(frm);
|
||||
}
|
||||
@ -381,7 +381,8 @@ $.extend(erpnext.item, {
|
||||
// Show Stock Levels only if is_stock_item
|
||||
if (frm.doc.is_stock_item) {
|
||||
frappe.require('item-dashboard.bundle.js', function() {
|
||||
const section = frm.dashboard.add_section('', __("Stock Levels"));
|
||||
frm.dashboard.parent.find('.stock-levels').remove();
|
||||
const section = frm.dashboard.add_section('', __("Stock Levels"), 'stock-levels');
|
||||
erpnext.item.item_dashboard = new erpnext.stock.ItemDashboard({
|
||||
parent: section,
|
||||
item_code: frm.doc.name,
|
||||
|
Loading…
x
Reference in New Issue
Block a user