[FIX] l10n_be_invoice_bba: Display warning in user's language

This commit is contained in:
Yenthe V.G
2017-05-29 11:00:00 +02:00
committed by Yannick Tivisse
parent 717002c2da
commit 054e06e223
2 changed files with 3 additions and 1 deletions
@@ -44,6 +44,8 @@ msgstr ""
#. module: l10n_be_invoice_bba
#: constraint:account.invoice:0
#: code:addons/l10n_be_invoice_bba/models/account_invoice.py:34
#, python-format
msgid "Invalid BBA Structured Communication !"
msgstr ""
@@ -34,7 +34,7 @@ class AccountInvoice(models.Model):
def _check_communication(self):
for inv in self:
if inv.reference_type == 'bba' and not self.check_bbacomm(inv.reference):
raise ValidationError('Invalid BBA Structured Communication !')
raise ValidationError(_('Invalid BBA Structured Communication !'))
def check_bbacomm(self, val):
supported_chars = '0-9+*/ '