From 27fecc4f41b137baee05deb58fcf67d86ff7029f Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Thu, 22 Jul 2021 16:33:51 +0200 Subject: [PATCH] Do not compare planned_date when empty issue10582 review365621002 --- product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product.py b/product.py index bc67342aa3..0e386506cc 100644 --- a/product.py +++ b/product.py @@ -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