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@987d974ccb closes odoo/odoo#71178 closes odoo/odoo#71205 X-original-commit: 642816d0a819bf74927ed5aa11b6843cbb97d4df Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
1.1 KiB
1.1 KiB
| 1 | id | name | model_id:id | group_id:id | perm_read | perm_write | perm_create | perm_unlink |
|---|---|---|---|---|---|---|---|---|
| 2 | access_mail_test_sms_all | mail.test.sms.all | model_mail_test_sms | 0 | 0 | 0 | 0 | |
| 3 | access_mail_test_sms_user | mail.test.sms.user | model_mail_test_sms | base.group_user | 1 | 1 | 1 | 1 |
| 4 | access_mail_test_sms_bl_all | mail.test.sms.bl.all | model_mail_test_sms_bl | 0 | 0 | 0 | 0 | |
| 5 | access_mail_test_sms_bl_user | mail.test.sms.bl.user | model_mail_test_sms_bl | base.group_user | 1 | 1 | 1 | 1 |
| 6 | access_mail_test_sms_bl_optout_all | mail.test.sms.bl.optout.all | model_mail_test_sms_bl_optout | 0 | 0 | 0 | 0 | |
| 7 | access_mail_test_sms_bl_optout_user | mail.test.sms.bl.optout.user | model_mail_test_sms_bl_optout | base.group_user | 1 | 1 | 1 | 1 |
| 8 | access_mail_test_sms_partner_all | mail.test.sms.partner.all | model_mail_test_sms_partner | 0 | 0 | 0 | 0 | |
| 9 | access_mail_test_sms_partner_user | mail.test.sms.partner.user | model_mail_test_sms_partner | base.group_user | 1 | 1 | 1 | 1 |
| 10 | access_mail_test_sms_partner_2many_all | mail.test.sms.partner.2many.all | model_mail_test_sms_partner_2many | 0 | 0 | 0 | 0 | |
| 11 | access_mail_test_sms_partner_2many_user | mail.test.sms.partner.2many.user | model_mail_test_sms_partner_2many | base.group_user | 1 | 1 | 1 | 1 |