From 4118c54478a734e104aa9c811f5a130ef7eaba64 Mon Sep 17 00:00:00 2001 From: Invitu Date: Sat, 5 Sep 2015 08:29:43 -1000 Subject: [PATCH] [FIX] fix issue 973 : read_group function has to be groupby cost --- purchase_landed_cost/models/purchase_cost_distribution.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purchase_landed_cost/models/purchase_cost_distribution.py b/purchase_landed_cost/models/purchase_cost_distribution.py index 4667028d..3c24bda7 100644 --- a/purchase_landed_cost/models/purchase_cost_distribution.py +++ b/purchase_landed_cost/models/purchase_cost_distribution.py @@ -243,7 +243,7 @@ def _product_price_update(self, move, new_price): product.product_tmpl_id.product_variant_ids.ids), ('id', 'not in', move.quant_ids.ids)] quants = self.env['stock.quant'].read_group( - domain_quant, ['product_id', 'qty', 'cost'], [])[0] + domain_quant, ['product_id', 'qty', 'cost'], ['cost'])[0] # Get the standard price new_std_price = ((quants['cost'] * quants['qty'] + new_price * move.product_qty) /