summaryrefslogtreecommitdiff
path: root/addons/mrp/tests/test_order.py
diff options
context:
space:
mode:
authorSimon Lejeune <sle@openerp.com>2020-04-21 10:10:45 +0200
committerSimon Lejeune <sle@openerp.com>2020-06-15 16:59:40 +0200
commitc660770ebd84c2c0d9e56ca5897effc6c138b827 (patch)
tree124f67a64758d2ff0899e29260a80b251f56f02a /addons/mrp/tests/test_order.py
parentbeccf82e09d536255d9d9cb9bfe58ebae2559843 (diff)
[REF] mrp: remove routing model
Set the operations directly on the Bill of Material. Duplicate the demo data where a routing was shared. Adapt the tests. Remove the following feature: - set the same routing on parent and kit child bom - when planning, if the component of the kit have the same operation than a component of the parent bom, merge these operations task-2241471
Diffstat (limited to 'addons/mrp/tests/test_order.py')
-rw-r--r--addons/mrp/tests/test_order.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/addons/mrp/tests/test_order.py b/addons/mrp/tests/test_order.py
index f13f41d44ae..90f25506ba6 100644
--- a/addons/mrp/tests/test_order.py
+++ b/addons/mrp/tests/test_order.py
@@ -63,7 +63,6 @@ class TestMrpOrder(TestMrpCommon):
test_date_planned = Dt.now() - timedelta(days=1)
test_quantity = 2.0
- self.bom_1.routing_id = False
man_order_form = Form(self.env['mrp.production'].with_user(self.user_mrp_user))
man_order_form.product_id = self.product_4
man_order_form.bom_id = self.bom_1
@@ -149,15 +148,6 @@ class TestMrpOrder(TestMrpCommon):
# check sub product availability state is assigned
self.assertEqual(production_2.reservation_state, 'assigned', 'Production order should be availability for assigned state')
- def test_empty_routing(self):
- """ Check what happens when you work with an empty routing"""
- routing = self.env['mrp.routing'].create({'name': 'Routing without operations'})
- self.bom_3.routing_id = routing.id
- production_form = Form(self.env['mrp.production'])
- production_form.product_id = self.product_6
- production = production_form.save()
- self.assertEqual(production.routing_id.id, False, 'The routing field should be empty on the mo')
-
def test_split_move_line(self):
""" Consume more component quantity than the initial demand.
It should create extra move and share the quantity between the two stock
@@ -911,8 +901,6 @@ class TestMrpOrder(TestMrpCommon):
bp.product_qty = 2.0
bp.product_uom_id = dozen
- self.bom_1.routing_id = False
-
mo_form = Form(self.env['mrp.production'])
mo_form.product_id = self.product_4
mo_form.bom_id = self.bom_1
@@ -1231,14 +1219,10 @@ class TestMrpOrder(TestMrpCommon):
'uom_id': unit.id,
'uom_po_id': unit.id,
})
- routing = self.env['mrp.routing'].create({
- 'name': 'Secondary Assembly',
- })
bom = self.env['mrp.bom'].create({
'product_tmpl_id': plastic_laminate.product_tmpl_id.id,
'product_uom_id': unit.id,
'sequence': 1,
- 'routing_id': routing.id,
'bom_line_ids': [(0, 0, {
'product_id': ply_veneer.id,
'product_qty': 1,