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