From 4d65cb907f14710883f2d3a9a4cf31893b57e482 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 17 Feb 2026 11:01:47 +0530 Subject: [PATCH] refactor(test): make bom stock calculated deterministic --- .../report/bom_stock_calculated/test_bom_stock_calculated.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/manufacturing/report/bom_stock_calculated/test_bom_stock_calculated.py b/erpnext/manufacturing/report/bom_stock_calculated/test_bom_stock_calculated.py index 37642da0680..e0105b114c5 100644 --- a/erpnext/manufacturing/report/bom_stock_calculated/test_bom_stock_calculated.py +++ b/erpnext/manufacturing/report/bom_stock_calculated/test_bom_stock_calculated.py @@ -1,6 +1,8 @@ # Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt +import frappe + from erpnext.manufacturing.doctype.production_plan.test_production_plan import make_bom from erpnext.manufacturing.report.bom_stock_calculated.bom_stock_calculated import ( execute as bom_stock_calculated_report, @@ -56,6 +58,7 @@ def create_items(): "standard_rate": 100, "opening_stock": 100, "last_purchase_rate": 100, + "item_defaults": [{"company": "_Test Company", "default_warehouse": "Stores - _TC"}], } ).name rm_item2 = make_item( @@ -64,6 +67,7 @@ def create_items(): "standard_rate": 200, "opening_stock": 200, "last_purchase_rate": 200, + "item_defaults": [{"company": "_Test Company", "default_warehouse": "Stores - _TC"}], } ).name