Skip to content
Snippets Groups Projects
Commit e1d50a40 authored by Abdelouahab (abla)'s avatar Abdelouahab (abla)
Browse files

[FIX] mail: fix current user finding in `_mail_find_partner_from_emails`


To reproduce
============
- login as Mitchell Admin
- change the email of a portal user, ex: Joel Willis, to the same email
as Mitchell Admin. Do this through the Contacts App
- always connected as Mitchell Admin, create a sale order and send it by
email to client, in chatter the sender will be Joel Willis

Problem
=======
when setting the author, `_mail_find_partner_from_emails` is called, when searching
for users with the given eamil, two results are found and the first one
is taken as author

Solution
========
give the priority to the current user when it matches the given conditions

opw-3455520

closes odoo/odoo#134389

Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent 53d66e3b
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment