diff --git a/addons/l10n_ch/tests/test_l10n_ch_qr_print.py b/addons/l10n_ch/tests/test_l10n_ch_qr_print.py index 19cee822985..49369776f50 100644 --- a/addons/l10n_ch/tests/test_l10n_ch_qr_print.py +++ b/addons/l10n_ch/tests/test_l10n_ch_qr_print.py @@ -56,7 +56,7 @@ class QRPrintTest(AccountTestInvoicingCommon): invoice.action_invoice_sent() return True except UserError as e: - _logger.warning(e.name) + _logger.warning(str(e)) return False def test_print_qr(self): diff --git a/addons/microsoft_outlook/controllers/main.py b/addons/microsoft_outlook/controllers/main.py index a4fc8ac93e7..fd1bb08465e 100644 --- a/addons/microsoft_outlook/controllers/main.py +++ b/addons/microsoft_outlook/controllers/main.py @@ -62,7 +62,7 @@ class MicrosoftOutlookController(http.Controller): refresh_token, access_token, expiration = record._fetch_outlook_refresh_token(code) except UserError as e: return request.render('microsoft_outlook.microsoft_outlook_oauth_error', { - 'error': str(e.name), + 'error': str(e), 'model_name': model_name, 'rec_id': rec_id, }) diff --git a/addons/portal/controllers/portal.py b/addons/portal/controllers/portal.py index 920f6717f18..d36353deeea 100644 --- a/addons/portal/controllers/portal.py +++ b/addons/portal/controllers/portal.py @@ -260,7 +260,7 @@ class CustomerPortal(Controller): msg = _('The old password you provided is incorrect, your password was not changed.') return {'errors': {'password': {'old': msg}}} except UserError as e: - return {'errors': {'password': e.name}} + return {'errors': {'password': str(e)}} # update session token so the user does not get logged out (cache cleared by passwd change) new_token = request.env.user._compute_session_token(request.session.sid)