summaryrefslogtreecommitdiff
path: root/addons/mrp_subcontracting/tests
diff options
context:
space:
mode:
authorArnold Moyaux <arm@odoo.com>2019-02-11 14:47:18 +0000
committerArnold Moyaux <arm@odoo.com>2019-04-12 12:50:34 +0000
commita4c0994cf44f06dd2d9db2af18e8fb4653a3ef09 (patch)
treeb04a2959d02e2da3a513aeb6d9ce92c220d42c43 /addons/mrp_subcontracting/tests
parent6f25cf1aa71366c0cabf93a9be79a929223f3287 (diff)
[REF] mrp: byproduct as a workorder line
Technical refactoring in order to set by-products the same way than raw materials. Before this commit byproduct were always set at the last workorder or automaticaly set at the end of produce wizard with the same quantity than in the BoM. In order to modify it, the user has to produce the finished product then unlock and edit the finished move line linked to the byproduct. In this commit, the user could specify at which workorder the byproduct is created and he could directly specify another quantity done in the produce wizard inside a specific tab for by-products. Technicaly, abstract workorder will add a new many2one key on workorder line in order to set 2 different one2many (one for finished goods and the other for raw materials). The key is set depending the many2one key for production on the linked stock move. On the by-products itself, it is now managed as a workorder line, thus the code to generate them and transform them in a finished stock move line is the same than for the raw components.
Diffstat (limited to 'addons/mrp_subcontracting/tests')
-rw-r--r--addons/mrp_subcontracting/tests/test_subcontracting.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mrp_subcontracting/tests/test_subcontracting.py b/addons/mrp_subcontracting/tests/test_subcontracting.py
index 4ed43c5946d..856f9849b6f 100644
--- a/addons/mrp_subcontracting/tests/test_subcontracting.py
+++ b/addons/mrp_subcontracting/tests/test_subcontracting.py
@@ -502,7 +502,7 @@ class TestSubcontractingTracking(TransactionCase):
'active_ids': [mo.id],
}))
produce_form.final_lot_id = lot_id
- produce_form.workorder_line_ids._records[0]['lot_id'] = serial_id.id
+ produce_form.raw_workorder_line_ids._records[0]['lot_id'] = serial_id.id
wiz_produce = produce_form.save()
wiz_produce.do_produce()