From 61a506a07b9cae93cb377d5cdd09952e212ced53 Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Wed, 21 Sep 2011 18:08:44 +0530 Subject: [PATCH] [IMP]: for mrp repair bzr revid: ksa@tinyerp.com-20110921123844-jyu32u7qept27cn7 --- addons/mrp_repair/test/mrp_repair_cancel.yml | 12 +++++++++++- addons/mrp_repair/test/test_mrp_repair.yml | 7 +++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/addons/mrp_repair/test/mrp_repair_cancel.yml b/addons/mrp_repair/test/mrp_repair_cancel.yml index dfc0eac27ba..fa9b02018b6 100644 --- a/addons/mrp_repair/test/mrp_repair_cancel.yml +++ b/addons/mrp_repair/test/mrp_repair_cancel.yml @@ -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} \ No newline at end of file + !workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rma1} diff --git a/addons/mrp_repair/test/test_mrp_repair.yml b/addons/mrp_repair/test/test_mrp_repair.yml index 52dc56ccbd8..a35ef966ce9 100644 --- a/addons/mrp_repair/test/test_mrp_repair.yml +++ b/addons/mrp_repair/test/test_mrp_repair.yml @@ -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) \ No newline at end of file