odoo/odoo#193495

Created by Jeffrey Luo (jelu)
Merged at b1278549e4848bf0404a1a1fc5e76d6e6f293b74

Statuses:

label
odoo-dev:16.0-opw-4378487-jelu
head
155e119e98e50ec15662ab96f4be42cdd018d141
merged
5 months ago by Security, Florian Vranckx (flvr)
odoo/odoo
16.0 #193495
17.0 #193778
saas-17.2 #193800
saas-17.4 #193822
18.0 #193835
saas-18.1 #195804
saas-18.2
saas-18.3
master #195835

[FIX] auth_ldap: add email on new res.partner

Before this commit, when a new res.user is created after signing in with auth_ldap, there was no email on the linked res.partner, which may cause issues in modules such as helpdesk, where partner email is used to find related tickets.

res.users created through the form view will trigger the onchange which sets the 'email' = 'login', which does not happen when creating a user directly through the ORM.

This commit adds 'email' as a key which is returned by the method _map_ldap_attributes, which is used to create new partners with the correct email associated with the res.user login.

opw-4378487


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr