From 7ffa8380da60f188a7d466ec2586985f103e6eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 6 Mar 2013 13:08:21 +0100 Subject: [PATCH] Fix average cost price computation context locations should be list of ids and not instances issue3037 review703002 (transplanted from 9a4d2bccf7f8fe00d32955d82342dfd627d749a1) --- move.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/move.py b/move.py index 199ad19e26..e14d229188 100644 --- a/move.py +++ b/move.py @@ -331,9 +331,10 @@ class Move(ModelSQL, ModelView): company = Company(company) context = {} - context['locations'] = Location.search([ + locations = Location.search([ ('type', '=', 'storage'), ]) + context['locations'] = [l.id for l in locations] context['stock_date_end'] = Date.today() with Transaction().set_context(context): product = Product(product_id)