From 703cd5131d07ccf8fd46789c6a035da10533616e Mon Sep 17 00:00:00 2001 From: Bertrand Chenal Date: Wed, 23 Sep 2009 17:18:47 +0200 Subject: [PATCH] Re-apply chunck 6f0af488dd35 --- product.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/product.py b/product.py index d80175cb82..39a68627fd 100644 --- a/product.py +++ b/product.py @@ -574,13 +574,13 @@ class OpenLocation(Wizard): context=context) res = act_window_obj.read(cursor, user, model_data.db_id, context=context) - if context == None: context = {} - context['product'] = data['id'] + ctx = {} + ctx['product'] = data['id'] if data['form']['forecast_date']: - context['stock_date_end'] = data['form']['forecast_date'] + ctx['stock_date_end'] = data['form']['forecast_date'] else: - context['stock_date_end'] = datetime.date.max - res['context'] = str(context) + ctx['stock_date_end'] = datetime.date.max + res['context'] = str(ctx) return res