Do not compare planned_date when empty

issue10582
review365621002
This commit is contained in:
Sergi Almacellas Abellana
2021-07-22 16:33:51 +02:00
parent a9434aba45
commit 27fecc4f41
+1 -1
View File
@@ -473,7 +473,7 @@ class OpenProductQuantitiesByWarehouse(Wizard):
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