Skip to content
Snippets Groups Projects
Commit 120b8768 authored by Lucas Lefèvre's avatar Lucas Lefèvre Committed by Yannick Tivisse
Browse files

[FIX] mail: Check field exists when computing groups


Steps to reproduce:

1. install `hr_contract_salary`

2. create a contract

3. set or update `hr_responsible_id` on the contract
(it creates a `mail.tracking.value`)

4. uninstall `hr_contract_salary`

5. go to the contract form view
=> traceback `hr_responsible_id` does not exist

Before displaying a `mail.tracking.value`, `groups` of the
fields are checked to fitler tracking values according to access
rights of the user.
However if the module that added the field has been uninstalled,
the field does not exists anymore.

Fix:
check if field exists before getting fields groups.
If the field does not exists: set groups to `base.group_system`

closes odoo/odoo#31398

Signed-off-by: default avatar"Yannick Tivisse (yti)" <yti@odoo.com>
parent d31f3eba
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment