From a16da9f9c67a94791422e106dccaef1fcecdc422 Mon Sep 17 00:00:00 2001 From: Richard Mathot Date: Wed, 5 Apr 2017 14:05:15 +0200 Subject: [PATCH] [IMP] mrp: price on product should be changed when receiving from production in average price, not only from supplier --- addons/stock_account/models/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock_account/models/stock.py b/addons/stock_account/models/stock.py index 1bd6928af98..e5087c67814 100644 --- a/addons/stock_account/models/stock.py +++ b/addons/stock_account/models/stock.py @@ -185,7 +185,7 @@ class StockMove(models.Model): tmpl_dict = defaultdict(lambda: 0.0) # adapt standard price on incomming moves if the product cost_method is 'average' std_price_update = {} - for move in self.filtered(lambda move: move.location_id.usage == 'supplier' and move.product_id.cost_method == 'average'): + for move in self.filtered(lambda move: move.location_id.usage in ('supplier', 'production') and move.product_id.cost_method == 'average'): product_tot_qty_available = move.product_id.qty_available + tmpl_dict[move.product_id.id] # if the incoming move is for a purchase order with foreign currency, need to call this to get the same value that the quant will use.