From eea80b6c01df479fbbc6cbc13edc4a7e3fadc2c4 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 25 Nov 2021 19:01:22 +0530 Subject: [PATCH] fix: Create stock item --- erpnext/assets/doctype/asset_repair/test_asset_repair.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/assets/doctype/asset_repair/test_asset_repair.py b/erpnext/assets/doctype/asset_repair/test_asset_repair.py index ed5ae2cb4d..7efb03083e 100644 --- a/erpnext/assets/doctype/asset_repair/test_asset_repair.py +++ b/erpnext/assets/doctype/asset_repair/test_asset_repair.py @@ -11,12 +11,14 @@ from erpnext.assets.doctype.asset.test_asset import ( create_asset_data, set_depreciation_settings_in_company, ) +from erpnext.stock.doctype.item.test_item import create_item class TestAssetRepair(unittest.TestCase): def setUp(self): set_depreciation_settings_in_company() create_asset_data() + create_item("_Test Stock Item") frappe.db.sql("delete from `tabTax Rule`") def test_update_status(self): @@ -139,7 +141,7 @@ def create_asset_repair(**args): asset_repair.stock_consumption = 1 asset_repair.warehouse = create_warehouse("Test Warehouse", company = asset.company) asset_repair.append("stock_items", { - "item_code": args.item_code or "_Test Item", + "item_code": args.item_code or "_Test Stock Item", "valuation_rate": args.rate if args.get("rate") is not None else 100, "consumed_quantity": args.qty or 1 })