[FIX] UserError.name still used although it was removed
Bug: the property name was removed in https://github.com/odoo/odoo/commit/d200dcfb2c912353d404312b9d9484846868cf96 similar to: https://github.com/odoo/enterprise/pull/42033 https://github.com/odoo/enterprise/pull/40754 opw-3368194 closes odoo/odoo#126070 X-original-commit: 6e6b067b5109327489dccdcc1f5e5405994f98d0 Related: odoo/enterprise#43002 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user