Files
odoo_source/addons/mrp/test/cancel_order.yml
T

26 lines
815 B
YAML

-
I first confirm order for shirt.
-
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_shirt}
-
In order to cancel the production order, I first cancel its picking.
-
!function {model: stock.picking, name: action_cancel}:
- model: mrp.production
eval: "[obj(ref('mrp_production_shirt')).picking_id.id]"
-
Now I cancel the production order.
-
!workflow {model: mrp.production, action: button_cancel, ref: mrp_production_shirt}
-
Now I check that the production order is cancelled.
-
!assert {model: mrp.production, id: mrp_production_shirt}:
- state == 'cancel'
-
I remove cancelled production order.
-
!python {model: mrp.production}: |
order = self.browse(cr, uid, ref("mrp_production_shirt"), context=context)
self.unlink(cr, uid, [order.id])