-
- Downloads
[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:
Thibault Delavallee (tde) <tde@openerp.com>
Showing
- addons/mass_mailing_sms/models/mailing_mailing.py 26 additions, 6 deletionsaddons/mass_mailing_sms/models/mailing_mailing.py
- addons/sale/models/sale_order.py 8 additions, 0 deletionsaddons/sale/models/sale_order.py
- addons/sms/models/mail_thread.py 4 additions, 2 deletionsaddons/sms/models/mail_thread.py
- addons/test_mail_full/models/mailing_mailing.py 2 additions, 1 deletionaddons/test_mail_full/models/mailing_mailing.py
- addons/test_mail_full/models/test_mail_models.py 18 additions, 0 deletionsaddons/test_mail_full/models/test_mail_models.py
- addons/test_mail_full/security/ir.model.access.csv 2 additions, 0 deletionsaddons/test_mail_full/security/ir.model.access.csv
- addons/test_mail_full/tests/test_mass_sms.py 82 additions, 1 deletionaddons/test_mail_full/tests/test_mass_sms.py
- addons/test_mail_full/tests/test_sms_post.py 18 additions, 0 deletionsaddons/test_mail_full/tests/test_sms_post.py
Loading
Please register or sign in to comment