diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 3fb8a692ad3..99610964920 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -297,6 +297,7 @@ class stock_quant(osv.osv): 'product_id': fields.many2one('product.product', 'Product', required=True, ondelete="restrict", readonly=True, select=True), 'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete="restrict", readonly=True, select=True), 'qty': fields.float('Quantity', required=True, help="Quantity of products in this quant, in the default unit of measure of the product", readonly=True, select=True), + 'product_uom_id': fields.related('product_id', 'uom_id', type='many2one', relation="product.uom", string='Unit of Measure', readonly=True), 'package_id': fields.many2one('stock.quant.package', string='Package', help="The package containing this quant", readonly=True, select=True), 'packaging_type_id': fields.related('package_id', 'packaging_id', type='many2one', relation='product.packaging', string='Type of packaging', readonly=True, store=True), 'reservation_id': fields.many2one('stock.move', 'Reserved for Move', help="The move the quant is reserved for", readonly=True, select=True), diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 7072a26f6d8..33f9c57873f 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -1665,6 +1665,7 @@ + @@ -1687,6 +1688,7 @@ +