Files
odoo_source/addons/test_mail
std-odoo 635519ae29 [FIX] mail: fix tracked field with groups
Bug
===
Since 0bd14547a7,
When editing a record which has a tracked field with a group, and if
the current user is not in the group, an error is raised.

Technical
=========
When we get the tracked fields, we must care about the group of the
current user and keep only the tracked fields the user have access to.

To do that, we use `fields_get`, which will return only fields accessible
by the current user group.

The method `_get_tracked_fields` is cached, but it need to depend on
the current user (and also if we are in sudo mode or not), because the
function will return different results, depending on the group of the
user.

Task-2250070

closes odoo/odoo#51915

X-original-commit: c7010058a93ca2fd3b65ac978d8333b273f04fac
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-27 05:53:13 +00:00
..