Skip to content
Snippets Groups Projects
Commit 446cd3f3 authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[FIX] models: infinite loop

Example of workflow to reproduce the issue:
- Add a selection field 'Test' to `project.task` with Studio
- Go to Projects > Planning > By Project
- Switch to list view
- Add the newly created field to the view 'Task > Test'

The interface loops indefinitely because the server is stuck in an
infinite loop.

The loop is the following:

https://github.com/odoo/odoo/blob/89270ee39c0daa46ae8e2e3e57d7e512a1a65ddf/odoo/models.py#L5624-L5625



The root cause of the issue comes from an incorrect object ID added in
the list of fields to recompute. Since the method is set in a
`post_init`, the object `field` is different from `recs[field_name]`.

To prevent the error, we retrieve the object directly in the
`mark_fields_to_compute` method.

opw-2083852

closes odoo/odoo#38497

Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
Co-authored-by: default avatarDenis Ledoux <dle@odoo.com>
parent 3ad50aa5
No related branches found
No related tags found
No related merge requests found
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