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

[FW][FIX] sale, mass_mailing_sms, test_mail_full: correctly support partner-only records


When performing an sms marketing on a model having only a ``partner_id``
field available (aka no ``phone`` or ``mobile``) it crashes due to seen
list computation (aka already contacted recipients). This is due to an SQL
query not taking into account those models as it works only for those with
a phone field.

We fix it as done in ``mass_mailìng`` app, aka fetching information on the
related partner if available.

Some tests for models using a 2many relationships towards recipients are
added. Note that this kind of model does not really support complete SMS
notification, as only the first found partner is notified. Mass SMS on this
kind of model is currently not possible as seen list is not supported. There
is no standard use case of this in Odoo codebase.

Correctly support sms marketing on sale model by defining the necessary
methods. As sale order has only a partner_id field available we have to
correctly override phone related methods for SMS.

LINKS

Task ID-2431217
COM PR odoo/odoo#71140

X-Original-Commit odoo/odoo@987d974ccb8c75c6eca899adb5be50fe48c8eb2c

closes odoo/odoo#71178

closes odoo/odoo#71205

X-original-commit: 642816d0a819bf74927ed5aa11b6843cbb97d4df
Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent a274f4a4
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment