From 50278d7ecb13ec0bbf639658a33be702faac71fe Mon Sep 17 00:00:00 2001 From: Date: Tue, 7 Apr 2015 14:50:28 +0200 Subject: [PATCH] Don't fail on on stock_date_end == None. issue4695 review14211002 --- stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock.py b/stock.py index 88800f3d77..daba0bf3ad 100644 --- a/stock.py +++ b/stock.py @@ -215,7 +215,7 @@ class Move: context = Transaction().context today = Date.today() - stock_date_end = context.get('stock_date_end', datetime.date.max) + stock_date_end = context.get('stock_date_end') or datetime.date.max if query and ((stock_date_end == today and context.get('forecast')) or stock_date_end > today): lot = Lot.__table__()