From f840413c844621f8f7e4f0f917543fffe695ab15 Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Tue, 20 Sep 2011 14:01:26 +0530 Subject: [PATCH] [IMP]:change quantity for product in mrp bzr revid: ksa@tinyerp.com-20110920083126-4w3ad8izopmh4xd4 --- addons/mrp/test/mrp_production_order.yml | 14 +++++++++++++- addons/mrp_repair/test/test_mrp_repair.yml | 11 +++++------ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/addons/mrp/test/mrp_production_order.yml b/addons/mrp/test/mrp_production_order.yml index 386f0673ab0..f829b1c4aae 100644 --- a/addons/mrp/test/mrp_production_order.yml +++ b/addons/mrp/test/mrp_production_order.yml @@ -142,4 +142,16 @@ - Then I Cancel the production order and related stock moves. - - !workflow {model: mrp.production, action: button_cancel, ref: mrp_production_mo2} \ No newline at end of file + !workflow {model: mrp.production, action: button_cancel, ref: mrp_production_mo2} +- + I am set the product quantity. +- + !record {model: change.production.qty, id: mrp_production_qty}: + product_qty: 5.0 +- + Changes the Quantity of Product. +- + !python {model: change.production.qty}: | + context = {"lang": 'en_US', "active_model":"mrp.production", "active_ids": [ref("mrp_production_qty")], "tz": False, "active_id":ref('mrp_production_qty')} + self.default_get(cr, uid, ["product_qty"], context) + self.change_prod_qty(cr, uid, [ref("mrp_production_qty")], context=context) diff --git a/addons/mrp_repair/test/test_mrp_repair.yml b/addons/mrp_repair/test/test_mrp_repair.yml index 655a93f1708..c2f993a311d 100644 --- a/addons/mrp_repair/test/test_mrp_repair.yml +++ b/addons/mrp_repair/test/test_mrp_repair.yml @@ -241,10 +241,9 @@ - !workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rma2} - - Cancel Repair order using wizard. + Cancel Repair order using wizard. - - !python {model: mrp.repair.cancel}: | - 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) \ No newline at end of file + !python {model: mrp.repair.cancel}: | + 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) \ No newline at end of file