From 51cdffcb9ed75d498ef074c2a31f822c3e79da4c Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 5 Jul 2016 09:43:29 +0200 Subject: [PATCH] [FIX] stock_account: default new price if compute from BoM When the new standard price is computed from the BoM (thanks to module `product_extended`), the price suggested is still the standard price of the product. --- addons/stock_account/wizard/stock_change_standard_price.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock_account/wizard/stock_change_standard_price.py b/addons/stock_account/wizard/stock_change_standard_price.py index a90a9961694..18d44e3b0d6 100644 --- a/addons/stock_account/wizard/stock_change_standard_price.py +++ b/addons/stock_account/wizard/stock_change_standard_price.py @@ -36,7 +36,7 @@ class change_standard_price(osv.osv_memory): res = super(change_standard_price, self).default_get(cr, uid, fields, context=context) - price = product_obj.standard_price + price = context.get('default_new_price') or product_obj.standard_price if 'new_price' in fields: res.update({'new_price': price})