2013-03-01 09:28:05 +00:00
|
|
|
-
|
|
|
|
MRP user can cancelled Production Order, so let's check data with giving the access rights of user.
|
|
|
|
-
|
|
|
|
!context
|
|
|
|
uid: 'res_users_mrp_user'
|
2011-09-23 07:10:19 +00:00
|
|
|
-
|
2012-07-24 07:20:36 +00:00
|
|
|
I first confirm order for PC Assemble SC349.
|
2011-09-23 07:10:19 +00:00
|
|
|
-
|
2012-07-18 11:01:51 +00:00
|
|
|
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_test1}
|
2011-09-23 07:10:19 +00:00
|
|
|
-
|
2011-10-17 12:42:36 +00:00
|
|
|
Now I cancel the production order.
|
2011-09-23 07:10:19 +00:00
|
|
|
-
|
2012-07-17 13:28:03 +00:00
|
|
|
!python {model: mrp.production}: |
|
2012-07-18 11:01:51 +00:00
|
|
|
order = self.browse(cr, uid, ref("mrp_production_test1"), context=context)
|
2012-07-17 13:28:03 +00:00
|
|
|
order.action_cancel(context=context)
|
2011-10-17 12:42:36 +00:00
|
|
|
-
|
|
|
|
Now I check that the production order is cancelled.
|
|
|
|
-
|
2012-07-18 11:01:51 +00:00
|
|
|
!assert {model: mrp.production, id: mrp_production_test1}:
|
2011-10-17 12:42:36 +00:00
|
|
|
- state == 'cancel'
|
2011-10-18 11:02:48 +00:00
|
|
|
-
|
2011-12-09 11:21:31 +00:00
|
|
|
I remove cancelled production order.
|
2011-10-18 11:02:48 +00:00
|
|
|
-
|
2011-12-09 11:21:31 +00:00
|
|
|
!python {model: mrp.production}: |
|
2012-07-18 11:01:51 +00:00
|
|
|
order = self.browse(cr, uid, ref("mrp_production_test1"), context=context)
|
2011-12-09 11:21:31 +00:00
|
|
|
self.unlink(cr, uid, [order.id])
|