2011-12-22 07:08:28 +00:00
|
|
|
-
|
2013-03-14 10:54:11 +00:00
|
|
|
In order to test "mrp_repair" module, I start with confirm state, and start repair with giving the access rights of mrp user.
|
|
|
|
-
|
|
|
|
!context
|
|
|
|
uid: 'res_mrp_repair_user'
|
2011-12-22 07:08:28 +00:00
|
|
|
-
|
2012-07-26 10:00:05 +00:00
|
|
|
I confirm Repair order for Invoice Method 'No Invoice'.
|
2011-12-22 07:08:28 +00:00
|
|
|
-
|
|
|
|
!workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rmrp1}
|
|
|
|
-
|
2014-01-24 12:30:36 +00:00
|
|
|
I start the repairing process by clicking on "Start Repair" button for Invoice Method 'No Invoice'.
|
2011-12-22 07:08:28 +00:00
|
|
|
-
|
|
|
|
!workflow {model: mrp.repair, action: repair_ready, ref: mrp_repair_rmrp1}
|
|
|
|
-
|
2012-07-26 10:00:05 +00:00
|
|
|
I check its state which is in "Under Repair".
|
2011-12-22 07:08:28 +00:00
|
|
|
-
|
|
|
|
!assert {model: mrp.repair, id: mrp_repair_rmrp1}:
|
|
|
|
- state == 'under_repair'
|
|
|
|
-
|
2012-07-26 10:00:05 +00:00
|
|
|
Repairing process for product is in Done state and I end this process by clicking on "End Repair" button.
|
2011-12-22 07:08:28 +00:00
|
|
|
-
|
|
|
|
!workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rmrp1}
|
|
|
|
-
|
2012-07-26 10:00:05 +00:00
|
|
|
I define Invoice Method 'No Invoice' option in this repair order.
|
2014-01-24 12:30:36 +00:00
|
|
|
So, I check that Invoice has not been created for this repair order.
|
2011-12-22 07:08:28 +00:00
|
|
|
-
|
|
|
|
!python {model: mrp.repair}: |
|
|
|
|
repair_id = self.browse(cr, uid, [ref('mrp_repair_rmrp1')], context=context)[0]
|
2014-01-24 12:30:36 +00:00
|
|
|
assert not repair_id.invoice_id.id, "Invoice should not exist for this repair order"
|