[FIX] account_banking_sepa_direct_debit: Remove warnings in tests.

TT35948
This commit is contained in:
Víctor Martínez
2022-04-12 14:59:51 +02:00
parent 21ef9bd730
commit a5d8a3bf3e

View File

@@ -6,7 +6,8 @@ from datetime import datetime
from dateutil.relativedelta import relativedelta
from odoo import _, api, exceptions, fields, models
from odoo import _, api, fields, models
from odoo.exceptions import UserError
NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY = 36
@@ -50,7 +51,7 @@ class AccountBankingMandate(models.Model):
def _check_recurring_type(self):
for mandate in self:
if mandate.type == "recurrent" and not mandate.recurrent_sequence_type:
raise exceptions.Warning(
raise UserError(
_("The recurrent mandate '%s' must have a sequence type.")
% mandate.unique_mandate_reference
)