mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 22:19:18 +00:00
test: fixed test case
(cherry picked from commit 10f58112ae)
Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
This commit is contained in:
@@ -508,10 +508,28 @@ class TestWorkOrder(ERPNextTestSuite):
|
|||||||
|
|
||||||
def test_work_order_material_transferred_qty_with_process_loss(self):
|
def test_work_order_material_transferred_qty_with_process_loss(self):
|
||||||
stock_entries = []
|
stock_entries = []
|
||||||
bom = frappe.get_doc(
|
item_code = make_item("_Test Item For Process Loss", {"is_stock_item": 1}).name
|
||||||
"BOM", {"docstatus": 1, "with_operations": 1, "company": "_Test Company", "has_variants": 0}
|
rm_item_code = make_item("Test Item For Process Loss RM", {"is_stock_item": 1}).name
|
||||||
|
|
||||||
|
bom = make_bom(
|
||||||
|
item=item_code,
|
||||||
|
raw_materials=[rm_item_code],
|
||||||
|
with_operations=1,
|
||||||
|
do_not_save=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
operation = {
|
||||||
|
"operation": "_Test Operation 1",
|
||||||
|
"workstation": "_Test Workstation 1",
|
||||||
|
"description": "Test Data",
|
||||||
|
"operating_cost": 100,
|
||||||
|
"time_in_mins": 40,
|
||||||
|
}
|
||||||
|
|
||||||
|
bom.append("operations", operation)
|
||||||
|
bom.save()
|
||||||
|
bom.submit()
|
||||||
|
|
||||||
work_order = make_wo_order_test_record(
|
work_order = make_wo_order_test_record(
|
||||||
item=bom.item,
|
item=bom.item,
|
||||||
qty=2,
|
qty=2,
|
||||||
|
|||||||
Reference in New Issue
Block a user