Skip to content
Snippets Groups Projects
Commit 52526920 authored by len-odoo's avatar len-odoo Committed by Laurent Mignon (ACSONE)
Browse files

[FIX] mail: do not have _get_message_needaction crash on empty task list


Suppose that a Task is added on a task via a studio customisation.
Then the _get_message_needaction method gets called on the onchange of the
toplevel task, which triggers another call to _get_message_needaction.
During that update, we get a self with a model.newID; its ids field is empty,
so the list of tasks res itself is empty.
As a result the method crashes on a malformed query.
This can in turn prevent the completion of some higher-level operation,
e.g. a state change on the task.

opw 1909043

closes odoo/odoo#29084

closes odoo/odoo#36813

Signed-off-by: default avatarNans Lefebvre (len) <len@odoo.com>
parent 921f5ffd
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