From 8cd9edde5d738d556819966c87bf376c695dda94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 27 Oct 2009 10:17:57 +0100 Subject: [PATCH] Test stock_date_end in context before comparing with today --- product.py | 1 + 1 file changed, 1 insertion(+) diff --git a/product.py b/product.py index 02f375b78b..5b638331d9 100644 --- a/product.py +++ b/product.py @@ -72,6 +72,7 @@ class Product(ModelSQL, ModelView): return dict([(id, 0.0) for id in ids]) if name == 'quantity' and \ + context.get('stock_date_end') and \ context.get('stock_date_end') > \ date_obj.today(cursor, user, context=context):