diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py index 7bd3bf93..58e5ffc6 100644 --- a/ext/custom-addons/dp_custom/models/sale.py +++ b/ext/custom-addons/dp_custom/models/sale.py @@ -553,7 +553,8 @@ class SaleOrder(models.Model): if vals.get('order_line',False): self._reset_sequence() - self.partner_id.last_order_changed = datetime.now() + if self.partner_id: + self.partner_id.last_order_changed = datetime.now() return res