diff --git a/addons/stock/product.py b/addons/stock/product.py index 06f9c36332e..5db1e1b3164 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -105,7 +105,9 @@ class product_product(osv.osv): 'compute_child': False }) - qty = product.qty_available + # qty_available depends of the location in the context + qty = self.read(cr, uid, [product.id], ['qty_available'], context=c)[0]['qty_available'] + diff = product.standard_price - new_price if not diff: raise osv.except_osv(_('Error!'), _("No difference between standard price and new price!")) if qty: