changeset f5b129f28f90 in modules/stock:default
details: https://hg.tryton.org/modules/stock?cmd=changeset&node=f5b129f28f90
description:
Do not compare planned_date when empty
issue10582
review365621002
diffstat:
product.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r bb00de0b5cc9 -r f5b129f28f90 product.py
--- a/product.py Mon Jul 12 22:37:21 2021 +0200
+++ b/product.py Thu Jul 22 16:33:51 2021 +0200
@@ -473,7 +473,7 @@
Date = pool.get('ir.date')
today = Date.today()
value = [('date', '>=', today)]
- if (hasattr(self.record, 'planned_date')
+ if (getattr(self.record, 'planned_date', None)
and self.record.planned_date >= today):
value.append(('date', '<=', self.record.planned_date))
return value