Skip to content
Snippets Groups Projects
Commit 99d259d6 authored by Thibault Delavallée's avatar Thibault Delavallée
Browse files

[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)

X-original-commit: odoo/odoo@62f28f1b898ff9f37bb74345a814e83b37386181
Part-of: odoo/odoo#134188
parent 437361f3
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