diff --git a/addons/l10n_sa_edi/i18n/l10n_sa_edi.pot b/addons/l10n_sa_edi/i18n/l10n_sa_edi.pot index c2ff0df9074..7efdbe780a1 100644 --- a/addons/l10n_sa_edi/i18n/l10n_sa_edi.pot +++ b/addons/l10n_sa_edi/i18n/l10n_sa_edi.pot @@ -1062,6 +1062,15 @@ msgid "" " Once you have selected the correct API, you can start the Onboarding process by going to the Journals and checking the options under the ZATCA tab." msgstr "" +#. module: l10n_sa_edi +#. odoo-python +#: code:addons/l10n_sa_edi/models/res_company.py:0 +#, python-format +msgid "" +"You cannot change the ZATCA Submission Mode once it has been set to " +"Production" +msgstr "" + #. module: l10n_sa_edi #: code:addons/l10n_sa_edi/wizard/l10n_sa_edi_otp_wizard.py:0 #, python-format diff --git a/addons/l10n_sa_edi/models/res_company.py b/addons/l10n_sa_edi/models/res_company.py index f18c2ccb0f4..3c9100ec648 100644 --- a/addons/l10n_sa_edi/models/res_company.py +++ b/addons/l10n_sa_edi/models/res_company.py @@ -1,5 +1,5 @@ import re -from odoo import models, fields +from odoo import models, fields, _ from odoo.exceptions import UserError from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization @@ -54,7 +54,7 @@ class ResCompany(models.Model): for company in self: if 'l10n_sa_api_mode' in vals: if company.l10n_sa_api_mode == 'prod' and vals['l10n_sa_api_mode'] != 'prod': - raise UserError("You cannot change the ZATCA Submission Mode once it has been set to Production") + raise UserError(_("You cannot change the ZATCA Submission Mode once it has been set to Production")) journals = self.env['account.journal'].search(self.env['account.journal']._check_company_domain(company)) journals._l10n_sa_reset_certificates() journals.l10n_sa_latest_submission_hash = False