mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] account_banking_sepa_direct_debit: Remove warnings in tests.
TT35948
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user