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

[IMP] various: use 'email_formatted' instead of 'formataddr'

PURPOSE

Be defensive when dealing with email fields, notably when having multi-emails
or email field containing an already-formatted email.

SPECIFICATIONS

When possible, use 'email_formatted' field on partner, instead of calling
'format_addr'. That way management of corner case input (multi emails and
double encapsulation) is managed by the computed field itself.

When 'format_addr' has to be used, ensure email part is normalized to avoid
formatting issues.

Also use tools to extract emails instead of 'email_re' regex when possible.
That way all code extracting and managing emails go through the same stack.

Task-2612945 (Mail: Defensive email formatting)

X-original-commit: odoo/odoo@9ef715fb994564af9e933ba31933a09eca97c24f
Part-of: odoo/odoo#133958
parent 326df6f9
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