From fc8f5385d627e82fbca9d27f60177952ea07c7f8 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Mon, 4 Oct 2010 16:02:32 +0530 Subject: [PATCH] [Fix] stock: Fix the buildbot-bug for stock_planing yml bzr revid: sbh@tinyerp.com-20101004103232-1gsxkqkwjogm8df2 --- addons/stock/product.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/stock/product.py b/addons/stock/product.py index bdaec60832e..e1d4c71b46c 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -233,9 +233,11 @@ class product_product(osv.osv): to_date = context.get('to_date',False) date_str = False date_values = False + where = [tuple(location_ids),tuple(location_ids),tuple(ids),tuple(states)] if from_date and to_date: date_str = "date>=%s and date<=%s" - date_values = [from_date, to_date] + where.append(tuple([from_date])) + where.append(tuple([to_date])) elif from_date: date_str = "date>=%s" date_values = [from_date] @@ -243,7 +245,7 @@ class product_product(osv.osv): date_str = "date<=%s" date_values = [to_date] - where = [tuple(location_ids),tuple(location_ids),tuple(ids),tuple(states)] + if date_values: where.append(tuple(date_values)) if 'in' in what: