diff options
| author | Martin Trigaux <mat@odoo.com> | 2019-08-08 13:39:22 +0000 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2019-08-08 13:56:25 +0000 |
| commit | 496d2c30ad7194d40d9adfdd27d61aa29508aeb5 (patch) | |
| tree | 085ef89c56fe98aa952e08ad729aebc0a8c8b6c2 /addons/portal/controllers | |
| parent | 5b83f7214f3412b303398580a5fe106af4c2f818 (diff) | |
[FIX] account,iap,sale,mail,portal: translate error messages
The error were untranslatables
Courtesy of Moises Lopez
closes odoo/odoo#35573
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Diffstat (limited to 'addons/portal/controllers')
| -rw-r--r-- | addons/portal/controllers/portal.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/portal/controllers/portal.py b/addons/portal/controllers/portal.py index ea019834c15..d60c26f11d9 100644 --- a/addons/portal/controllers/portal.py +++ b/addons/portal/controllers/portal.py @@ -234,7 +234,7 @@ class CustomerPortal(Controller): document = request.env[model_name].browse([document_id]) document_sudo = document.sudo().exists() if not document_sudo: - raise MissingError("This document does not exist.") + raise MissingError(_("This document does not exist.")) try: document.check_access_rights('read') document.check_access_rule('read') @@ -269,12 +269,12 @@ class CustomerPortal(Controller): def _show_report(self, model, report_type, report_ref, download=False): if report_type not in ('html', 'pdf', 'text'): - raise UserError("Invalid report type: %s" % report_type) + raise UserError(_("Invalid report type: %s") % report_type) report_sudo = request.env.ref(report_ref).sudo() if not isinstance(report_sudo, type(request.env['ir.actions.report'])): - raise UserError("%s is not the reference of a report" % report_ref) + raise UserError(_("%s is not the reference of a report") % report_ref) method_name = 'render_qweb_%s' % (report_type) report = getattr(report_sudo, method_name)([model.id], data={'report_type': report_type})[0] |
