diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py index 166c7eec..09e5567d 100644 --- a/ext/custom-addons/dp_custom/models/sale.py +++ b/ext/custom-addons/dp_custom/models/sale.py @@ -106,7 +106,7 @@ class SaleOrder(models.Model): def _compute_dlv_date_warn(self): for record in self: record.delivery_date_warning = False - if record.desired_delivery_date > record.delivery_date: + if record.desired_delivery_date and record.delivery_date and record.desired_delivery_date > record.delivery_date: record.delivery_date_warning = True @api.multi