diff options
| author | Olivier Dony <odo@openerp.com> | 2017-07-07 18:25:59 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2017-07-07 18:34:54 +0200 |
| commit | e8271ffcc7e0d1aad11e20540a5f35b88fd4ac35 (patch) | |
| tree | a360172a74c213db52a5344b65e81ab53dbaa8c0 /addons/web/static/src | |
| parent | 326ff3699a07933666564a4a5e8ad7cdd290f203 (diff) | |
[FIX] mail: avoid attaching auto-notifications to foreign parents
`parent_id` fields are common in many models, and thus default values
for those fields are sometimes passed in the context.
Because mail.message also has `parent_id` field, it would automatically
use the default when an automatic message was being posted. While of
course, the parent_id value comes from a different model.
This "adoption" by a random "parent message" is unexpected,
not desired, and it can even cause a very surprising AccessError if the
parent message is not readable by the user.
Forcing the `parent_id` value during the creation of an automatic message
avoids this confusion.
One way to trigger the bug was to use the "subtask" stat button to create a
child subtask for a project task (it relies on the parent task ID
passed in the context)
Diffstat (limited to 'addons/web/static/src')
0 files changed, 0 insertions, 0 deletions
