Do not compare planned_date when empty

issue10582
review365621002
(grafted from f5b129f28f90ff2416ee93567e1143cda07ac9e7)

--HG--
branch : 6.0
This commit is contained in:
Sergi Almacellas Abellana committed 2021-07-22 16:33:51 +02:00
1 parent 7c6f0b4847
commit bdbe6efe1f
1 file changed
+1 -1
+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