From dab5e349ab8082826f8bf8c2c736a2cd1cdda1d4 Mon Sep 17 00:00:00 2001 From: "Purnendu Singh (OpenERP)" Date: Tue, 6 Aug 2013 12:29:28 +0530 Subject: [PATCH] [IMP] stock: changes due to rename the of product_uom to product_uom_id of stock.inventory.line object bzr revid: psi@tinyerp.com-20130806065928-tk273x62a1p13z81 --- addons/stock/stock_demo.xml | 34 +++++++++---------- addons/stock/stock_demo.yml | 4 +-- .../stock/wizard/stock_change_product_qty.py | 2 +- .../wizard/stock_inventory_line_split.py | 2 +- addons/stock/wizard/stock_inventory_merge.py | 4 +-- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml index 7233226762d..3f67cff3278 100644 --- a/addons/stock/stock_demo.xml +++ b/addons/stock/stock_demo.xml @@ -55,105 +55,105 @@ - + 16.0 - + - + 16.0 - + - + 8.0 - + 18.0 - + 10.0 - + 22.0 - + 8.0 - + 26.0 - + 32.0 - + 37.0 - + 39.0 - + 45.0 - + 10.0 - + 2.0 - + 80.0 diff --git a/addons/stock/stock_demo.yml b/addons/stock/stock_demo.yml index 36ec87621be..b4be8054d5f 100644 --- a/addons/stock/stock_demo.yml +++ b/addons/stock/stock_demo.yml @@ -51,7 +51,7 @@ - !record {model: stock.inventory.line, id: stock_inventory_line_icecream_lot0}: product_id: product_icecream - product_uom: product.product_uom_kgm + product_uom_id: product.product_uom_kgm inventory_id: stock_inventory_icecream product_qty: 50.0 prod_lot_id: lot_icecream_0 @@ -59,7 +59,7 @@ - !record {model: stock.inventory.line, id: stock_inventory_line_icecream_lot1}: product_id: product_icecream - product_uom: product.product_uom_kgm + product_uom_id: product.product_uom_kgm inventory_id: stock_inventory_icecream product_qty: 40.0 prod_lot_id: lot_icecream_1 diff --git a/addons/stock/wizard/stock_change_product_qty.py b/addons/stock/wizard/stock_change_product_qty.py index d8119b62285..e303b95c55e 100644 --- a/addons/stock/wizard/stock_change_product_qty.py +++ b/addons/stock/wizard/stock_change_product_qty.py @@ -95,7 +95,7 @@ class stock_change_product_qty(osv.osv_memory): 'product_qty' : data.new_quantity, 'location_id' : data.location_id.id, 'product_id' : rec_id, - 'product_uom' : res_original.uom_id.id, + 'product_uom_id' : res_original.uom_id.id, 'prod_lot_id' : data.lot_id.id } inventry_line_obj.create(cr , uid, line_data, context=context) diff --git a/addons/stock/wizard/stock_inventory_line_split.py b/addons/stock/wizard/stock_inventory_line_split.py index 6496835ed79..e06bf0d11e8 100644 --- a/addons/stock/wizard/stock_inventory_line_split.py +++ b/addons/stock/wizard/stock_inventory_line_split.py @@ -40,7 +40,7 @@ class stock_inventory_line_split(osv.osv_memory): if 'product_id' in fields: res.update({'product_id':line.product_id.id}) if 'product_uom' in fields: - res.update({'product_uom': line.product_uom.id}) + res.update({'product_uom': line.product_uom_id.id}) if 'qty' in fields: res.update({'qty': line.product_qty}) return res diff --git a/addons/stock/wizard/stock_inventory_merge.py b/addons/stock/wizard/stock_inventory_merge.py index e2b5cff513d..9245628b040 100644 --- a/addons/stock/wizard/stock_inventory_merge.py +++ b/addons/stock/wizard/stock_inventory_merge.py @@ -64,7 +64,7 @@ class stock_inventory_merge(osv.osv_memory): _('Merging is only allowed on draft inventories.')) for line in inventory.inventory_line_id: - key = (line.location_id.id, line.product_id.id, line.product_uom.id) + key = (line.location_id.id, line.product_id.id, line.product_uom_id.id) if key in invent_lines: invent_lines[key] += line.product_qty else: @@ -80,7 +80,7 @@ class stock_inventory_merge(osv.osv_memory): 'inventory_id': new_invent, 'location_id': key[0], 'product_id': key[1], - 'product_uom': key[2], + 'product_uom_id': key[2], 'product_qty': quantity, })