[IMP] various: support multi-emails in '_message_post_after_hook'
PURPOSE Be defensive when dealing with email fields, notably when having multi-emails or email field containing an already-formatted email. SPECIFICATIONS Post-message hook is used in various apps to link records to a newly created created partner. This is the case notably when used with a template as it creates partner on the fly based on emails to always handle partners. We now check either the complete 'email', either the normalized version of it to avoid comparison issues with multi emails and formatted emails. As 'email_normalized' now supports multi-emails by storing the first found one it helps finding the partner. Task-2612945 (Mail: Defensive email formatting) Part-of: odoo/odoo#74474
Showing
- addons/crm/models/crm_lead.py 9 additions, 4 deletionsaddons/crm/models/crm_lead.py
- addons/event/models/event_registration.py 11 additions, 6 deletionsaddons/event/models/event_registration.py
- addons/hr_recruitment/models/hr_recruitment.py 12 additions, 6 deletionsaddons/hr_recruitment/models/hr_recruitment.py
- addons/project/models/project.py 10 additions, 4 deletionsaddons/project/models/project.py
- addons/website_event_track/models/event_track.py 11 additions, 6 deletionsaddons/website_event_track/models/event_track.py
Loading
Please register or sign in to comment