Skip to content

Commit

Permalink
debug: CI for test_work_order_with_non_stock_item
Browse files Browse the repository at this point in the history
  • Loading branch information
marination committed May 19, 2022
1 parent dd99c00 commit 1c84087
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/server-tests-mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions erpnext/manufacturing/doctype/work_order/test_work_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 1c84087

Please sign in to comment.