2 I first confirm order for PC Assemble SC349.
4 !workflow {model: mrp.production, action: button_confirm, ref: mrp_production_test1}
6 In order to cancel the production order, I first cancel its picking.
8 !function {model: stock.picking, name: action_cancel}:
9 - model: mrp.production
10 eval: "[obj(ref('mrp_production_test1')).picking_id.id]"
12 Now I cancel the production order.
14 !python {model: mrp.production}: |
15 order = self.browse(cr, uid, ref("mrp_production_test1"), context=context)
16 order.action_cancel(context=context)
18 Now I check that the production order is cancelled.
20 !assert {model: mrp.production, id: mrp_production_test1}:
23 I remove cancelled production order.
25 !python {model: mrp.production}: |
26 order = self.browse(cr, uid, ref("mrp_production_test1"), context=context)
27 self.unlink(cr, uid, [order.id])