<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/mass_mailing_sms/models, branch 14.0</title>
<subtitle>The current checkout of upstream Odoo</subtitle>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/'/>
<entry>
<title>[FIX] sale, mass_mailing_sms, test_mail_full: correctly support partner-only records</title>
<updated>2021-05-21T16:45:37+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2021-05-06T09:15:28+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=987d974ccb8c75c6eca899adb5be50fe48c8eb2c'/>
<id>987d974ccb8c75c6eca899adb5be50fe48c8eb2c</id>
<content type='text'>
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

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] crm: correctly compute phone_sanitized without having crm_sms installed</title>
<updated>2021-05-11T14:27:50+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2021-05-11T14:14:00+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=4b0c551194e8ef66df9136629afe71566ffe212e'/>
<id>4b0c551194e8ef66df9136629afe71566ffe212e</id>
<content type='text'>
Currently phone_sanitized computation on lead model works only if crm_sms
is installed. Indeed an override of ``_phone_get_number_fields`` is missing.
However ``_sms_get_number_fields`` coming with ``crm_sms`` and its ``sms``
dependency hides the issue as those modules are auto-install. However if
``crm_sms`` is uninstalled phone_sanitized is not correctly computed anymore.

Task ID-2528169
Oversight of odoo/odoo#45315</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently phone_sanitized computation on lead model works only if crm_sms
is installed. Indeed an override of ``_phone_get_number_fields`` is missing.
However ``_sms_get_number_fields`` coming with ``crm_sms`` and its ``sms``
dependency hides the issue as those modules are auto-install. However if
``crm_sms`` is uninstalled phone_sanitized is not correctly computed anymore.

Task ID-2528169
Oversight of odoo/odoo#45315</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] *: rephrase, correct typos</title>
<updated>2020-11-27T15:42:35+00:00</updated>
<author>
<name>Martin Trigaux</name>
<email>mat@odoo.com</email>
</author>
<published>2020-11-27T13:42:36+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9b3b2e8d711e3be75b1faffaf6f4f8f4ec90186e'/>
<id>9b3b2e8d711e3be75b1faffaf6f4f8f4ec90186e</id>
<content type='text'>
Courtesy of Transifex's translators for reporting bad/unclear sentences.

closes odoo/odoo#62539

Related: odoo/enterprise#15032
Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Courtesy of Transifex's translators for reporting bad/unclear sentences.

closes odoo/odoo#62539

Related: odoo/enterprise#15032
Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mass_mailing_sms : traceback on create contact list</title>
<updated>2020-09-28T09:59:55+00:00</updated>
<author>
<name>Mariska Archielli (ram)</name>
<email>ram@odoo.com</email>
</author>
<published>2020-09-28T08:27:28+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=31f2bb5e494965d31f5e49d47908fd4b5eb64077'/>
<id>31f2bb5e494965d31f5e49d47908fd4b5eb64077</id>
<content type='text'>
Fix traceback when creating a new contact by checking the id list is not empty.

Task ID : 2302578

closes odoo/odoo#58555

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix traceback when creating a new contact by checking the id list is not empty.

Task ID : 2302578

closes odoo/odoo#58555

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] *: adapt action content retrieval</title>
<updated>2020-08-17T09:09:02+00:00</updated>
<author>
<name>Martin Trigaux</name>
<email>mat@odoo.com</email>
</author>
<published>2020-05-25T07:04:52+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6156f98288b16f6c84d36bacf16d5a66a661abb3'/>
<id>6156f98288b16f6c84d36bacf16d5a66a661abb3</id>
<content type='text'>
Use _for_xml_id to replace all the self.env.ref().read()[0]
This has the advantage of having a single point of control and to add
the fields filtering and model verification.

Add sudo for other operations on ir.actions.*</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use _for_xml_id to replace all the self.env.ref().read()[0]
This has the advantage of having a single point of control and to add
the fields filtering and model verification.

Add sudo for other operations on ir.actions.*</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] mass_mailing[_sms]: update subject and allow emoji support for sms content</title>
<updated>2020-08-11T14:38:33+00:00</updated>
<author>
<name>xO-Tx</name>
<email>mou@odoo.com</email>
</author>
<published>2020-06-15T07:49:43+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=f7862cd2b5cfd333688b219a64034e24f7d2e5a1'/>
<id>f7862cd2b5cfd333688b219a64034e24f7d2e5a1</id>
<content type='text'>
PURPOSE

Subject field on mailing has not the same use in email marketing (subject of
emails) and in SMS maketing (used internally as there is no subject in SMS).

Purpose of this commit is to improve mailing form view to better distinguish
email and SMS flows.

SPECIFICATIONS

This commit changes helper for mailing subject and update its label according
to mailing_type (mail or sms), as well as the sms content field to enable emoji
support in mailing subjects. This is done through a fake sms_subject field
that is a text without emojis while standard subject allows emojis. Helpers
depends on the displayed field.

Override CRUD to synchronize sms_subject on subject to have only one field
used to store data.

Also allow emojis in SMS content, suing the enable_emojis option.

LINKS

Task ID-2224393
PR #49096</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

Subject field on mailing has not the same use in email marketing (subject of
emails) and in SMS maketing (used internally as there is no subject in SMS).

Purpose of this commit is to improve mailing form view to better distinguish
email and SMS flows.

SPECIFICATIONS

This commit changes helper for mailing subject and update its label according
to mailing_type (mail or sms), as well as the sms content field to enable emoji
support in mailing subjects. This is done through a fake sms_subject field
that is a text without emojis while standard subject allows emojis. Helpers
depends on the displayed field.

Override CRUD to synchronize sms_subject on subject to have only one field
used to store data.

Also allow emojis in SMS content, suing the enable_emojis option.

LINKS

Task ID-2224393
PR #49096</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] *: replace to new _() syntax</title>
<updated>2020-06-18T11:03:34+00:00</updated>
<author>
<name>Martin Trigaux</name>
<email>mat@odoo.com</email>
</author>
<published>2020-06-04T10:39:11+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=ba244cef01132347df4d2d9553ea3105ba13a938'/>
<id>ba244cef01132347df4d2d9553ea3105ba13a938</id>
<content type='text'>
Using a few regex like
\((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\)
($1, $3))

Old syntax is still compatible but starts the migration to the new
syntax that catches error.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using a few regex like
\((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\)
($1, $3))

Old syntax is still compatible but starts the migration to the new
syntax that catches error.
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] sms: Add new failure status for unregistered accounts</title>
<updated>2020-05-12T16:39:40+00:00</updated>
<author>
<name>Rémi Rahir</name>
<email>rar@odoo.com</email>
</author>
<published>2020-03-27T17:28:03+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=7287800101ba6d054960b906da3a5a538abcb02f'/>
<id>7287800101ba6d054960b906da3a5a538abcb02f</id>
<content type='text'>
Since January 2020, users are required to validate their IAP account via
SMS code validation. This new behaviour needed to be properly ported to
the client to correctly inform the user.

This commit adds support of a new failure_type: 'Unregistered Account'.

Task #2209567

closes odoo/odoo#48512

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since January 2020, users are required to validate their IAP account via
SMS code validation. This new behaviour needed to be properly ported to
the client to correctly inform the user.

This commit adds support of a new failure_type: 'Unregistered Account'.

Task #2209567

closes odoo/odoo#48512

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] *: set ondelete policy of required Selection fields</title>
<updated>2020-03-30T13:42:04+00:00</updated>
<author>
<name>Adrian Torres</name>
<email>adt@odoo.com</email>
</author>
<published>2020-02-20T13:43:00+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=1daf8eb12735db5c697e4a0868b43fe44f6b2f6a'/>
<id>1daf8eb12735db5c697e4a0868b43fe44f6b2f6a</id>
<content type='text'>
With this commit, Selection fields with `required=True` which are
extended via `selection_add` are given proper ondelete policies to
ensure the cleanup of records containing these extended options during
uninstall of the extending module.

This commit also cleans up leftover uninstall hooks that were being used
to handle the same set of problems prior to the ondelete mechanism being
implemented for Selection fields.

closes odoo/odoo#46325

Related: odoo/enterprise#9117
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With this commit, Selection fields with `required=True` which are
extended via `selection_add` are given proper ondelete policies to
ensure the cleanup of records containing these extended options during
uninstall of the extending module.

This commit also cleans up leftover uninstall hooks that were being used
to handle the same set of problems prior to the ondelete mechanism being
implemented for Selection fields.

closes odoo/odoo#46325

Related: odoo/enterprise#9117
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] mass_mailing_(sms): Add unblacklisting button</title>
<updated>2020-03-26T10:15:18+00:00</updated>
<author>
<name>Tiffany Chang (tic)</name>
<email>tic@odoo.com</email>
</author>
<published>2020-02-13T12:59:34+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=f9ff21a200b0c5553ba6d1314e4d9f54d3ebdd7d'/>
<id>f9ff21a200b0c5553ba6d1314e4d9f54d3ebdd7d</id>
<content type='text'>
Previously a blacklisted phone number or email address could only be
removed from their respective blacklist by going to the corresponding
blacklist view [in mass_mailing_(sms)] and manually
archiving/deactiviting the entry. All users could see that an email was
blacklisted via an fa-ban icon added next to their corresponding field
in the modules: crm, mass_mailing, mass_mailing_sms, and contacts (via
extension).

This commit adds additional fa-ban icons next to blacklisted phone
numbers and makes all instances of these icons clickable to remove them
from their corresponding blacklist using a wizard. There are several
limitations to this implementation including:

1. If both a mobile and phone number field appear within a crm lead
instance, then only the mobile field will indicate if it is blacklisted
(due to current implementation of PhoneMixin which only checks 1 phone
value against the blacklist and "sms" which returns mobile numbers first).
I.e. if a phone field value is blacklisted, but a value is typed into the
mobile field, then the phone field will never indicate that it is blacklisted.

2. If someone clicks on a unblacklisting icon after changing the
corresponding field value without clicking off the field input, then the
latest typed in value will be the one submitted for unblacklisting,
which may not actually be blacklisted (due to "is_blacklisted" flag
being a computed field and it not having a chance to re-compute to hide
the button).

3. If someone changes values in the blacklist, then someone who already
has a form open will not see icon disappear until something triggers a
re-compute of the "phone_sanitized_blacklisted" flag (this was already the
case with the icon, but now a user may try to unblacklist a value that is
already unblacklisted.)

4. Since the icon needs to be visible by everyone to indicate whether or
not a phone/email is blacklisted, users without corresponding unblacklist
permissions will be able to click on the icon. When they click on it, they
will be informed they do not have permission to unblacklist. A wizard was
determined to be the best way to implement this unblacklisting for the
following reasons:
  - A "Unblacklisting Reason" is needed and will not be stored as a field.
  - A field widget is unable to do this due to security settings +
    inability to refresh view after unblacklisting with a
    "Unblacklisting Reason" without wiping unsaved changes.

Additionally, to better align with GDPR, the corresponding form view for
the phone/email blacklist has been updated to use the same wizard to
track "Reason for unblacklisting". Unfortunately there is no
straightforward way to prevent direct "Archive" action, so users are
still able to bypass unblacklisting without being asked for a "reason
for unblacklisting".

Supports task: 2117635
Upgrade PR: odoo/upgrade#939
COM PR: odoo/odoo#45315</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously a blacklisted phone number or email address could only be
removed from their respective blacklist by going to the corresponding
blacklist view [in mass_mailing_(sms)] and manually
archiving/deactiviting the entry. All users could see that an email was
blacklisted via an fa-ban icon added next to their corresponding field
in the modules: crm, mass_mailing, mass_mailing_sms, and contacts (via
extension).

This commit adds additional fa-ban icons next to blacklisted phone
numbers and makes all instances of these icons clickable to remove them
from their corresponding blacklist using a wizard. There are several
limitations to this implementation including:

1. If both a mobile and phone number field appear within a crm lead
instance, then only the mobile field will indicate if it is blacklisted
(due to current implementation of PhoneMixin which only checks 1 phone
value against the blacklist and "sms" which returns mobile numbers first).
I.e. if a phone field value is blacklisted, but a value is typed into the
mobile field, then the phone field will never indicate that it is blacklisted.

2. If someone clicks on a unblacklisting icon after changing the
corresponding field value without clicking off the field input, then the
latest typed in value will be the one submitted for unblacklisting,
which may not actually be blacklisted (due to "is_blacklisted" flag
being a computed field and it not having a chance to re-compute to hide
the button).

3. If someone changes values in the blacklist, then someone who already
has a form open will not see icon disappear until something triggers a
re-compute of the "phone_sanitized_blacklisted" flag (this was already the
case with the icon, but now a user may try to unblacklist a value that is
already unblacklisted.)

4. Since the icon needs to be visible by everyone to indicate whether or
not a phone/email is blacklisted, users without corresponding unblacklist
permissions will be able to click on the icon. When they click on it, they
will be informed they do not have permission to unblacklist. A wizard was
determined to be the best way to implement this unblacklisting for the
following reasons:
  - A "Unblacklisting Reason" is needed and will not be stored as a field.
  - A field widget is unable to do this due to security settings +
    inability to refresh view after unblacklisting with a
    "Unblacklisting Reason" without wiping unsaved changes.

Additionally, to better align with GDPR, the corresponding form view for
the phone/email blacklist has been updated to use the same wizard to
track "Reason for unblacklisting". Unfortunately there is no
straightforward way to prevent direct "Archive" action, so users are
still able to bypass unblacklisting without being asked for a "reason
for unblacklisting".

Supports task: 2117635
Upgrade PR: odoo/upgrade#939
COM PR: odoo/odoo#45315</pre>
</div>
</content>
</entry>
</feed>
