From 24f79114997bd396077358feabe11dd24735e0ee Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Thu, 1 Feb 2018 17:22:06 +0100 Subject: [PATCH] [FIX] account: constraint method on recordset --- addons/account/models/account_invoice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index 282c0b441c5..e05b02ae058 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -1785,6 +1785,7 @@ class AccountPaymentTermLine(models.Model): if self.value == 'percent' and (self.value_amount < 0.0 or self.value_amount > 100.0): raise ValidationError(_('Percentages for Payment Terms Line must be between 0 and 100.')) + @api.one @api.constrains('days') def _check_days(self): if self.option in ('day_following_month', 'day_current_month') and self.days <= 0: