diff --git a/addons/mrp/test/mrp_packs.yml b/addons/mrp/test/mrp_packs.yml index 76e3eb58f2c..eb386ef6b85 100644 --- a/addons/mrp/test/mrp_packs.yml +++ b/addons/mrp/test/mrp_packs.yml @@ -96,7 +96,7 @@ stock of beers remains exact. - !assert {model: stock.picking, id: picking_out, string: pack_of_beer_splitted}: - - len(move_lines) == 2 + - len(move_lines) >= 2 - move_lines[0].product_id.id <> move_lines[1].product_id.id - move_lines[0].product_id.id in (ref('product_product_beers0'), ref('product_product_beerspack0')) - move_lines[1].product_id.id in (ref('product_product_beers0'), ref('product_product_beerspack0')) diff --git a/addons/mrp/test/mrp_phantom_bom.yml b/addons/mrp/test/mrp_phantom_bom.yml index 71a04fc79d7..46b1d19244a 100644 --- a/addons/mrp/test/mrp_phantom_bom.yml +++ b/addons/mrp/test/mrp_phantom_bom.yml @@ -200,7 +200,7 @@ - !python {model: procurement.order}: | from tools.translate import _ - proc_ids = self.search(cr, uid, [('state','=','confirmed')]) + proc_ids = self.search(cr, uid, [('product_id','in',[ref('product_product_orange0'),ref('product_product_sugar0'),ref('product_product_water0')])]) assert proc_ids, _('No Procurements!') - The scheduler runs. diff --git a/addons/mrp/test/mrp_production_order.yml b/addons/mrp/test/mrp_production_order.yml index 476d79f7fab..2e77cd089fe 100644 --- a/addons/mrp/test/mrp_production_order.yml +++ b/addons/mrp/test/mrp_production_order.yml @@ -17,66 +17,14 @@ product_qty: 5.0 product_uom: product.product_uom_unit product_uos_qty: 0.0 -- - I create a record for Workcenter line. -- - !record {model: mrp.production.workcenter.line, id: mrp_production_workcenter_line_assemblyline0}: - cycle: 5.0 - hour: 10.0 - name: Assembly Line 1 - production_id: mrp_production_mo0 - sequence: 0.0 - workcenter_id: mrp.mrp_workcenter_0 -- - I create second record for Workcenter line. -- - !record {model: mrp.production.product.line, id: mrp_production_product_line_regularprocessorconfig0}: - name: Regular processor config - product_id: product.product_product_cpu_gen - product_qty: 5.0 - product_uom: product.product_uom_unit - product_uos_qty: 0.0 - production_id: mrp_production_mo0 -- - I create third record for Workcenter line. -- - !record {model: mrp.production.product.line, id: mrp_production_product_line_hddseagategb0}: - name: HDD Seagate 7200.8 80GB - product_id: product.product_product_hdd1 - product_qty: 5.0 - product_uom: product.product_uom_unit - product_uos_qty: 0.0 - production_id: mrp_production_mo0 -- - I create fourth record for Workcenter line. -- - !record {model: mrp.production.product.line, id: mrp_production_product_line_atxmidsizetower0}: - name: ATX Mid-size Tower - product_id: product.product_product_tow1 - product_qty: 5.0 - product_uom: product.product_uom_unit - product_uos_qty: 0.0 - production_id: mrp_production_mo0 -- - I create a record for production line. -- - !record {model: mrp.production.product.line, id: mrp_production_product_line_mouse0}: - name: Mouse - product_id: product.product_product_25 - product_qty: 5.0 - product_uom: product.product_uom_unit - product_uos_qty: 0.0 - production_id: mrp_production_mo0 -- - I create second record for production line. -- - !record {model: mrp.production.product.line, id: mrp_production_product_line_keyboard0}: - name: Keyboard - product_id: product.product_product_24 - product_qty: 5.0 - product_uom: product.product_uom_unit - product_uos_qty: 0.0 - production_id: mrp_production_mo0 +- + I compute the data. +- + !python {model: mrp.production}: | + self.action_compute(cr, uid, [ref("mrp_production_mo0")], {"lang": "en_US", "tz": + False, "search_default_current": 1, "active_model": "ir.ui.menu", "active_ids": + [ref("mrp.menu_mrp_production_action")], "active_id": ref("mrp.menu_mrp_production_action"), + }) - I confirm the order. - @@ -86,7 +34,7 @@ - !python {model: procurement.order}: | from tools.translate import _ - proc_ids = self.search(cr, uid, [('state','=','confirmed')]) + proc_ids = self.search(cr, uid, [('product_id','=',[ref('product.product_product_pc1')])]) assert proc_ids, _('No Procurements!') - The scheduler runs.