diff --git a/addons/account/models/account_payment_term.py b/addons/account/models/account_payment_term.py index 5fcbfdbd60e..3dccc01e8ee 100644 --- a/addons/account/models/account_payment_term.py +++ b/addons/account/models/account_payment_term.py @@ -263,7 +263,7 @@ class AccountPaymentTermLine(models.Model): def _get_due_date(self, date_ref): self.ensure_one() - due_date = fields.Date.from_string(date_ref) + due_date = fields.Date.from_string(date_ref) or fields.Date.today() if self.delay_type == 'days_after_end_of_month': return date_utils.end_of(due_date, 'month') + relativedelta(days=self.nb_days) elif self.delay_type == 'days_after_end_of_next_month':