[FIX] account_banking_sepa_direct_debit: UserError instead of Warning

This commit is contained in:
Guille
2019-11-05 13:36:28 +01:00
parent c1e0d1ca63
commit 1b0a506f6d

View File

@@ -81,7 +81,7 @@ class AccountPaymentOrder(models.Model):
% (line.partner_id.name, line.name))
scheme = line.mandate_id.scheme
if line.mandate_id.state != 'valid':
raise Warning(
raise UserError(
_("The SEPA Direct Debit mandate with reference '%s' "
"for partner '%s' has expired.")
% (line.mandate_id.unique_mandate_reference,
@@ -89,7 +89,7 @@ class AccountPaymentOrder(models.Model):
if line.mandate_id.type == 'oneoff':
seq_type = 'OOFF'
if line.mandate_id.last_debit_date:
raise Warning(
raise UserError(
_("The mandate with reference '%s' for partner "
"'%s' has type set to 'One-Off' and it has a "
"last debit date set to '%s', so we can't use "