diff --git a/addons/delivery/stock.py b/addons/delivery/stock.py
index efc793af33c..ae42a440f83 100644
--- a/addons/delivery/stock.py
+++ b/addons/delivery/stock.py
@@ -66,7 +66,7 @@ class stock_picking(osv.osv):
}),
'carrier_tracking_ref': fields.char('Carrier Tracking Ref', size=32),
'number_of_packages': fields.integer('Number of Packages'),
- 'product_uom_weight': fields.many2one('product.uom', 'Unit of Measure', required=True,readonly="1",help="Unit of Measure (Unit of Measure) is the unit of measurement for Weight",),
+ 'weight_uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True,readonly="1",help="Unit of Measure (Unit of Measure) is the unit of measurement for Weight",),
}
def _prepare_shipping_invoice_line(self, cr, uid, picking, invoice, context=None):
@@ -135,7 +135,7 @@ class stock_picking(osv.osv):
return result
_defaults = {
- 'product_uom_weight': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('kg'))], context=c)[0],
+ 'weight_uom_id': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('kg'))], context=c)[0],
}
stock_picking()
@@ -174,8 +174,13 @@ class stock_move(osv.osv):
store={
'stock.move': (lambda self, cr, uid, ids, c=None: ids, ['product_id', 'product_qty', 'product_uom'], 20),
}),
+ 'weight_uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True,readonly="1",help="Unit of Measure (Unit of Measure) is the unit of measurement for Weight",),
+ 'weight_net_uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True,readonly="1",help="Unit of Measure (Unit of Measure) is the unit of measurement for Weight",),
}
-
+ _defaults = {
+ 'weight_uom_id': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('kg'))], context=c)[0],
+ 'weight_net_uom_id': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('kg'))], context=c)[0],
+ }
stock_move()
# Redefinition of the new fields in order to update the model stock.picking.out in the orm
diff --git a/addons/product/product.py b/addons/product/product.py
index 9085e518688..c85e81ced4c 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -784,9 +784,9 @@ class product_packaging(osv.osv):
'height': fields.float('Height', help='The height of the package'),
'width': fields.float('Width', help='The width of the package'),
'length': fields.float('Length', help='The length of the package'),
- 'product_uom_width': fields.many2one('product.uom', 'Unit of Measure',readonly="1", required=True, help="Unit of Measure (Unit of Measure) is the unit of measurement for width",),
- 'product_uom_length': fields.many2one('product.uom', 'Unit of Measure', readonly="1",required=True, help="Unit of Measure (Unit of Measure) is the unit of measurement for Length",),
- 'product_uom_height': fields.many2one('product.uom', 'Unit of Measure',readonly="1", required=True, help="Unit of Measure (Unit of Measure) is the unit of measurement for Height",),
+ 'width_uom_id': fields.many2one('product.uom', 'Unit of Measure',readonly="1", required=True, help="Unit of Measure (Unit of Measure) is the unit of measurement for width",),
+ 'length_uom_id': fields.many2one('product.uom', 'Unit of Measure', readonly="1",required=True, help="Unit of Measure (Unit of Measure) is the unit of measurement for Length",),
+ 'height_uom_id': fields.many2one('product.uom', 'Unit of Measure',readonly="1", required=True, help="Unit of Measure (Unit of Measure) is the unit of measurement for Height",),
}
@@ -816,9 +816,9 @@ class product_packaging(osv.osv):
'rows' : lambda *a : 3,
'sequence' : lambda *a : 1,
'ul' : _get_1st_ul,
- 'product_uom_width': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('cm'))], context=c)[0],
- 'product_uom_length': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('cm'))], context=c)[0],
- 'product_uom_height': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('cm'))], context=c)[0]
+ 'width_uom_id': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('cm'))], context=c)[0],
+ 'length_uom_id': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('cm'))], context=c)[0],
+ 'height_uom_id': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('cm'))], context=c)[0]
}
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index 54e3249cd9f..3822cf12eab 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -566,18 +566,18 @@