Reviewers: ,
Description:
stock: Include NULL planned_date with datetime.date.max
Please review this at http://codereview.tryton.org/790002/
Affected files:
M product.py
Index: product.py
===================================================================
--- a/product.py
+++ b/product.py
@@ -284,9 +284,9 @@
'('
'(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 @@
'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,
]