diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index 814260e3196..0f268ceceef 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -3275,6 +3275,8 @@ class TestWorkOrder(IntegrationTestCase): """Test that phantom BOMs are not added to additional costs, but regular non-stock items in the FG BOM are added.""" + from erpnext.stock.doctype.item.test_item import make_item + # Create items: # - FG Item (stock item) # - Phantom sub-assembly (non-stock item to be phantom) @@ -3399,7 +3401,7 @@ class TestWorkOrder(IntegrationTestCase): fg_bom.insert() fg_bom.submit() - # Ensure stock for regular RM + # Ensure stock test_stock_entry.make_stock_entry( item_code=regular_rm, target="_Test Warehouse - _TC", @@ -3407,6 +3409,13 @@ class TestWorkOrder(IntegrationTestCase): basic_rate=100, ) + test_stock_entry.make_stock_entry( + item_code=phantom_rm, + target="_Test Warehouse - _TC", + qty=10, + basic_rate=200, + ) + # Create work order wo = make_wo_order_test_record( production_item=fg_item,