Include NULL planned_date with datetime.date.max

review790002
This commit is contained in:
Cédric Krier committed 2013-04-16 15:31:10 +02:00
1 parent 4cc0484027
commit b0ab39804c
1 file changed
+4 -3
+4 -3
View File
@@ -284,9 +284,9 @@ class Product:
'('
'(effective_date IS NULL) '
'AND '
'(planned_date <= %s) '
'(COALESCE(planned_date, %s) <= %s) '
'AND '
'(planned_date >= %s)'
'(COALESCE(planned_date, %s) >= %s)'
')'
'OR '
'('
@@ -302,7 +302,8 @@ class Product:
'done', context.get('stock_assign') and 'assigned' or 'done',
today, today,
'done', 'assigned', 'draft',
context['stock_date_end'], today,
datetime.date.max, context['stock_date_end'],
datetime.date.max, today,
context['stock_date_end'], today,
]