Test stock_date_end in context before comparing with today

This commit is contained in:
Cédric Krier committed 2009-10-27 10:17:57 +01:00
1 parent 329ab52fbc
commit 8cd9edde5d
1 file changed
+1
+1
View File
@@ -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):