From ae021f21c21673d754f7b125837b6d5cadabcd88 Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Tue, 20 Sep 2011 12:39:23 +0530 Subject: [PATCH] [IMP]:onchange for product in mrp repair bzr revid: ksa@tinyerp.com-20110920070923-mcer01g3xmzdqur8 --- addons/mrp_repair/test/test_mrp_repair.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/addons/mrp_repair/test/test_mrp_repair.yml b/addons/mrp_repair/test/test_mrp_repair.yml index 129ff431aab..b932f4fe7b3 100644 --- a/addons/mrp_repair/test/test_mrp_repair.yml +++ b/addons/mrp_repair/test/test_mrp_repair.yml @@ -41,6 +41,7 @@ type: add fees_lines: - name: 'HDD1 Seagate repair fees' + product_id: product.product_product_hdd1 product_uom_qty: 1.0 product_uom: product.product_uom_unit price_unit: 50.0 @@ -59,7 +60,7 @@ location_dest_id: stock.stock_location_14 location_id: stock.stock_location_14 move_id: 'stock_move_pcbasicpc0' - name: RMA00004 + name: RMA00005 operations: - location_dest_id: stock.location_production location_id: stock.stock_location_stock @@ -73,6 +74,7 @@ type: add fees_lines: - name: 'HDD1 Seagate repair fees' + product_id: product.product_product_hdd1 product_uom_qty: 1.0 product_uom: product.product_uom_unit price_unit: 50.0 @@ -138,3 +140,8 @@ 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" +- | + On change of product sets some values +- + !python {model: mrp.repair}: | + self.onchange_product_id(cr, uid, [ref('mrp_repair_rma0')], product_id=False)