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

(cherry picked from commit a254201696)

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
mergify[bot]
2022-01-31 15:43:08 +05:30
committed by GitHub
parent 144c8ec904
commit 9425ca07f5

View File

@@ -380,8 +380,7 @@ $.extend(erpnext.item, {
// Show Stock Levels only if is_stock_item
if (frm.doc.is_stock_item) {
frappe.require('assets/js/item-dashboard.min.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,