-
- Downloads
[IMP] mail: improve create_uid heuristics in mail gateway
PURPOSE
Currently mailgateway runner user is used to create most documents through
incoming emails. Purpose of this commit is to try to link document creation
and update to users, using the email to make the matching.
SPECIFICATIONS
New sudo implementation allow to bypass access rights while keeping effective
user as creator. Use this mechanism to create documents still using the
mailgateway runner user while linking creator to matching user.
Heuristic to use to match email_from and users
* if route is linked to an alias: check its owner record and check in its
followers;
* find users having this emails;
* if route is linked to an alias: use alias_user_id field;
* fallback on mailgateway user;
Other side effect is that creator and author of incoming email linked to the
new record will now better match the document creator when linked to an
existing user.
LINKS
Task 1919267
PR #30597
Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
Loading
Please register or sign in to comment