[IMP]: for mrp repair

bzr revid: ksa@tinyerp.com-20110921123844-jyu32u7qept27cn7
This commit is contained in:
Kirti Savalia (OpenERP) 2011-09-21 18:08:44 +05:30
parent 23ac71a177
commit 61a506a07b
2 changed files with 16 additions and 3 deletions

View File

@ -40,6 +40,16 @@
context = {"lang": 'en_US', "active_model":"mrp.repair", "active_ids": [ref("mrp_repair_rma2")], "tz": False, "active_id":ref('mrp_repair_rma2')}
self.fields_view_get(cr, uid, False, "form", context)
self.cancel_repair(cr, uid, [ref("mrp_repair_rma2")], context=context)
-
Reopen the repair order in draft state.
-
!python {model: mrp.repair}: |
self.action_cancel_draft(cr, uid, [ref('mrp_repair_rma2')])
-
Repair order state to 'Ready'.
-
!python {model: mrp.repair}: |
self.action_repair_ready(cr, uid, [ref('mrp_repair_rma2')], context=None)
-
I start by creating new Repair order for "Basic Pc" product and Invoice Type b4repair.
-
@ -82,4 +92,4 @@
-
Repairing Process for product is Done and I End Repair process by click on "End Repair" button For Invoice Type b4repair.
-
!workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rma1}
!workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rma1}

View File

@ -80,7 +80,6 @@
-
!assert {model: mrp.repair, id: mrp_repair_rma0}:
- state == 'draft'
- |
I confirm This Repair order.
-
@ -121,5 +120,9 @@
repair_id = self.browse(cr, uid, [ref('mrp_repair_rma0')], context=context)[0]
invoice_ids = inv_obj.search(cr, uid, [('partner_id', '=', repair_id.partner_id.id)])
invoice_id = inv_obj.browse(cr, uid, invoice_ids)[0]
assert repair_id.partner_id.id == invoice_id.partner_id.id, "No invoice existing for the same partner"
- |
Cancel repair order.
-
!python {model: mrp.repair}: |
self.action_cancel(cr, uid, [ref('mrp_repair_rma0')], context=None)