From 054e06e223fd08a6944267fa3c74042828cb051d Mon Sep 17 00:00:00 2001 From: "Yenthe V.G" Date: Mon, 29 May 2017 10:15:56 +0200 Subject: [PATCH] [FIX] l10n_be_invoice_bba: Display warning in user's language --- addons/l10n_be_invoice_bba/i18n/l10n_be_invoice_bba.pot | 2 ++ addons/l10n_be_invoice_bba/models/account_invoice.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/l10n_be_invoice_bba/i18n/l10n_be_invoice_bba.pot b/addons/l10n_be_invoice_bba/i18n/l10n_be_invoice_bba.pot index a12b4e0d631..6a1fd4be122 100644 --- a/addons/l10n_be_invoice_bba/i18n/l10n_be_invoice_bba.pot +++ b/addons/l10n_be_invoice_bba/i18n/l10n_be_invoice_bba.pot @@ -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 "" diff --git a/addons/l10n_be_invoice_bba/models/account_invoice.py b/addons/l10n_be_invoice_bba/models/account_invoice.py index 9bf72ae7b0f..1cad1081a65 100644 --- a/addons/l10n_be_invoice_bba/models/account_invoice.py +++ b/addons/l10n_be_invoice_bba/models/account_invoice.py @@ -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+*/ '