From 18b02ee71e6a3067b701525aea006eea6ea70672 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Mon, 24 Feb 2014 12:24:37 +0100 Subject: [PATCH] [IMP] Change store = True of product_qty of move bzr revid: jco@openerp.com-20140224112437-if4nkqaj9balf580 --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 46b4776492b..57fc427dc3e 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1368,7 +1368,7 @@ class stock_move(osv.osv): 'date_expected': fields.datetime('Expected Date', states={'done': [('readonly', True)]}, required=True, select=True, help="Scheduled date for the processing of this move"), 'product_id': fields.many2one('product.product', 'Product', required=True, select=True, domain=[('type', '<>', 'service')], states={'done': [('readonly', True)]}), # TODO: improve store to add dependency on product UoM - 'product_qty': fields.function(_quantity_normalize, type='float', store=True, string='Quantity', + 'product_qty': fields.function(_quantity_normalize, type='float', store={'stock.move': (lambda self, cr, uid, ids, ctx: ids, ['product_uom_qty', 'product_uom'], 20)}, string='Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), help='Quantity in the default UoM of the product'), 'product_uom_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'),