-
- Downloads
[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
Showing
- addons/crm/models/crm_lead.py 21 additions, 8 deletionsaddons/crm/models/crm_lead.py
- addons/crm/tests/test_crm_lead_notification.py 2 additions, 2 deletionsaddons/crm/tests/test_crm_lead_notification.py
- addons/hr_recruitment/models/hr_recruitment.py 1 addition, 1 deletionaddons/hr_recruitment/models/hr_recruitment.py
- addons/mail/models/mail_thread.py 4 additions, 3 deletionsaddons/mail/models/mail_thread.py
Loading
Please register or sign in to comment