-
- Downloads
[FIX] base: allow user to modify its own preferences
The res.users model functions a bit uniquely since it should allow a user to
modify their own parameters but turns off model edition priviledges by default.
See "SELF_WRITEABLE_FIELDS".
This implies that ir_ui_view#_postprocess_access_rights method will by default
turn off record edition, by automatically adding a 'edit="false"' attribute on
the form node when the frontend calls 'get_views'.
This will in turn prevent the user from modifying its preferences as it will
set the form view in readonly mode.
(It was apparently ignored pre-OWL, hence why we only have this issue now).
To fix the issue, we force the edition by manually setting 'edit="1"' on our
"view_users_form_simple_modif" form.
Allowing the end-user to modify their own settings again.
A tour was added to ensure this behavior.
Note that tour steps need to be adapted in the 'hr' module, as this module
changes the flow of modifying user preferences.
Task-3067001
closes odoo/odoo#106125
Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
Showing
- addons/hr/__manifest__.py 1 addition, 0 deletionsaddons/hr/__manifest__.py
- addons/hr/static/tests/tours/user_modify_own_profile_tour.js 19 additions, 0 deletionsaddons/hr/static/tests/tours/user_modify_own_profile_tour.js
- addons/mail/static/tests/tours/user_modify_own_profile_tour.js 26 additions, 0 deletions...s/mail/static/tests/tours/user_modify_own_profile_tour.js
- addons/mail/tests/__init__.py 1 addition, 0 deletionsaddons/mail/tests/__init__.py
- addons/mail/tests/test_user_modify_own_profile.py 15 additions, 0 deletionsaddons/mail/tests/test_user_modify_own_profile.py
- odoo/addons/base/views/res_users_views.xml 1 addition, 1 deletionodoo/addons/base/views/res_users_views.xml
Loading
Please register or sign in to comment