chore: revert manual handling of stock level section (#29537)

This commit is contained in:
Ankush Menat 2022-01-31 15:37:19 +05:30 committed by GitHub
parent 5aa1b6bc38
commit a254201696
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -376,8 +376,7 @@ $.extend(erpnext.item, {
// Show Stock Levels only if is_stock_item
if (frm.doc.is_stock_item) {
frappe.require('item-dashboard.bundle.js', function() {
frm.dashboard.parent.find('.stock-levels').remove();
const section = frm.dashboard.add_section('', __("Stock Levels"), 'stock-levels');
const section = frm.dashboard.add_section('', __("Stock Levels"));
erpnext.item.item_dashboard = new erpnext.stock.ItemDashboard({
parent: section,
item_code: frm.doc.name,