From 1c84087ef03e6a1126e33a08ca0ad1dca53dd0ed Mon Sep 17 00:00:00 2001 From: marination Date: Fri, 20 May 2022 01:02:56 +0530 Subject: [PATCH] debug: CI for `test_work_order_with_non_stock_item` --- .github/workflows/server-tests-mariadb.yml | 2 +- .../doctype/production_plan/test_production_plan.py | 3 +++ erpnext/manufacturing/doctype/work_order/test_work_order.py | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/server-tests-mariadb.yml b/.github/workflows/server-tests-mariadb.yml index cdb68499ffd57..af2f74ec2b51c 100644 --- a/.github/workflows/server-tests-mariadb.yml +++ b/.github/workflows/server-tests-mariadb.yml @@ -112,7 +112,7 @@ jobs: FRAPPE_BRANCH: ${{ github.event.inputs.branch }} - name: Run Tests - run: cd ~/frappe-bench/ && bench --site test_site run-parallel-tests --app erpnext --use-orchestrator --with-coverage + run: cd ~/frappe-bench/ && bench --site test_site run-tests --app erpnext --doctype "Work Order" env: TYPE: server CI_BUILD_ID: ${{ github.run_id }} diff --git a/erpnext/manufacturing/doctype/production_plan/test_production_plan.py b/erpnext/manufacturing/doctype/production_plan/test_production_plan.py index 891a4978789f3..6731e66df9821 100644 --- a/erpnext/manufacturing/doctype/production_plan/test_production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/test_production_plan.py @@ -798,6 +798,9 @@ def make_bom(**args): for item in args.raw_materials: item_doc = frappe.get_doc("Item", item) + # debug + if item == "_Test FG Non Stock Item": + print("rates >>>", item_doc.valuation_rate, args.rate) bom.append( "items", diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index 2aba48231be8c..9edbf7e7b6cca 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -431,6 +431,11 @@ def test_work_order_with_non_stock_item(self): wo = make_wo_order_test_record(production_item=fg_item) + # debug + bom = frappe.get_doc("BOM", wo.bom_no) + for item in bom.items: + print(item.item_code, item.amount, frappe.db.get_value("Item", item.item_code, "is_stock_item")) + se = frappe.get_doc(make_stock_entry(wo.name, "Material Transfer for Manufacture", 1)) se.insert() se.submit()