mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-11 21:51:48 +00:00
test: assert operating cost is propagated to routing operations
This commit is contained in:
@@ -113,12 +113,13 @@ class TestWorkstation(ERPNextTestSuite):
|
||||
# update_bom_operation() (run on w1.save()) must write the new rate directly onto the
|
||||
# Routing's BOM Operation rows. This is the converted query's own effect (not the BOM
|
||||
# update_cost above) and is what silently skipped on Postgres when parenttype was 'routing'.
|
||||
routing_op_rate = frappe.db.get_value(
|
||||
routing_op_rate, routing_op_operating_cost = frappe.db.get_value(
|
||||
"BOM Operation",
|
||||
{"parent": routing_doc.name, "parenttype": "Routing", "workstation": "_Test Workstation A"},
|
||||
"hour_rate",
|
||||
["hour_rate", "operating_cost"],
|
||||
)
|
||||
self.assertEqual(routing_op_rate, 250)
|
||||
self.assertEqual(routing_op_operating_cost, 250)
|
||||
|
||||
|
||||
def make_workstation(*args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user