<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/sms/tests, 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>[IMP] event_sms, link_tracker, sms, test_mail_full: improve SMS-based mailing tests</title>
<updated>2021-04-19T14:11:13+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2021-04-16T11:52:45+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e77b9e575e398f42df524bdaf5d692ea882a4521'/>
<id>e77b9e575e398f42df524bdaf5d692ea882a4521</id>
<content type='text'>
PURPOSE

Purpose is to have more tests when sending sms mailings, notably about
canceled or failed mails or sms as well as jinja and links rendering.

SPECIFICATIONS

In this commit we improve SMS Marketing mailing tests. We notably

  * add tests for void and invalid email and numbers. It allows to check they
    correctly update their trace status;
  * add tests for unsubscribe and view links embedded in sms marketing;
  * add tests to simulate a click on links sent through sms marketing and
    ensure click statistics are effectively updated;
  * ensure content of sent sms are checked;

Default content of mailings used in test is updated to ensure jinja is
correctly rendered, including links and some corner cases. This will also
helps ensuring behavior is kept when converting to QWeb.

In event we now correctly use sms gateway mock to ensure SMS finding.

In link_tracker a helper is added to check url tracking in plaintext content.

LINKS

Task ID-2508643
Followup of odoo/odoo#68874 (improve mail tests)
Prepares Task ID-27033 (support QWeb in templates)
Prepares Task ID-2377974 (clean trace and status management in mass mailing)
COM PR odoo/odoo#69461
ENT PR odoo/enterprise#17780</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

Purpose is to have more tests when sending sms mailings, notably about
canceled or failed mails or sms as well as jinja and links rendering.

SPECIFICATIONS

In this commit we improve SMS Marketing mailing tests. We notably

  * add tests for void and invalid email and numbers. It allows to check they
    correctly update their trace status;
  * add tests for unsubscribe and view links embedded in sms marketing;
  * add tests to simulate a click on links sent through sms marketing and
    ensure click statistics are effectively updated;
  * ensure content of sent sms are checked;

Default content of mailings used in test is updated to ensure jinja is
correctly rendered, including links and some corner cases. This will also
helps ensuring behavior is kept when converting to QWeb.

In event we now correctly use sms gateway mock to ensure SMS finding.

In link_tracker a helper is added to check url tracking in plaintext content.

LINKS

Task ID-2508643
Followup of odoo/odoo#68874 (improve mail tests)
Prepares Task ID-27033 (support QWeb in templates)
Prepares Task ID-2377974 (clean trace and status management in mass mailing)
COM PR odoo/odoo#69461
ENT PR odoo/enterprise#17780</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] event, mail, mass_mailing, sms, test_mail: clean some mail tests tools helpers and parameters</title>
<updated>2021-04-08T15:06:12+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2021-04-07T09:17:19+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c75e8619663efc4d97ab13fb35f815104239dd36'/>
<id>c75e8619663efc4d97ab13fb35f815104239dd36</id>
<content type='text'>
In this commit we backport some of 14.1+ improvements done in mail tools
in order to keep a coherent definition through sub versions. We also
improve docstring and add some explanations on available toold and asserts.

Task ID-2500615
COM PR odoo/odoo#68874</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In this commit we backport some of 14.1+ improvements done in mail tools
in order to keep a coherent definition through sub versions. We also
improve docstring and add some explanations on available toold and asserts.

Task ID-2500615
COM PR odoo/odoo#68874</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] sms: ensure group system has full rights on sms.template model</title>
<updated>2021-03-30T09:49:29+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2021-03-30T07:49:26+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=362f9d003fbe0f629926224ae9bd18c9028d9a1d'/>
<id>362f9d003fbe0f629926224ae9bd18c9028d9a1d</id>
<content type='text'>
As no global rule is defined for system, people belonging to both system
and a functional group may be limited in their rights about sms templates.

For example install event_sms -&gt; admin is member of system and event manager
groups. He cannot edit templates other than related to event.

With this commit members of system may write, create or unlink all templates
independently from their functinal groups.

Task ID-2495426
Followup of odoo/odoo#64626

closes odoo/odoo#68530

X-original-commit: e0c1563993da918a0fbc2e31a13f3fe6a7ea2916
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As no global rule is defined for system, people belonging to both system
and a functional group may be limited in their rights about sms templates.

For example install event_sms -&gt; admin is member of system and event manager
groups. He cannot edit templates other than related to event.

With this commit members of system may write, create or unlink all templates
independently from their functinal groups.

Task ID-2495426
Followup of odoo/odoo#64626

closes odoo/odoo#68530

X-original-commit: e0c1563993da918a0fbc2e31a13f3fe6a7ea2916
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] sms, various: do not restrict read access on sms.template</title>
<updated>2021-03-29T12:57:32+00:00</updated>
<author>
<name>Jérémy Hennecart</name>
<email>jeh@odoo.com</email>
</author>
<published>2020-04-30T08:18:17+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=157eee07ba74de1dad30510a85411eeff2b2dcf1'/>
<id>157eee07ba74de1dad30510a85411eeff2b2dcf1</id>
<content type='text'>
sms.template model has several record rules to give access to templates
linked to models managed by certain groups (like crm.lead for sales managers)
These record rules were meant to restrict access to certain model to create,
write and unlink, but not read.

This is leading to issues when trying to read a template on other models.
Indeed people should always be able read sms.template content.

Unit test were also added to the sms module to ensure that a member of
group_user can always read a sms template.

Unit test is added to ensure admin always has full control on sms.templates.

Task ID-2191254
COM PR odoo/odoo#68445
ENT PR odoo/enterprise#17340

X-original-commit: c9e119a096ba5410e0ab9767207192eb4b7822a2</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sms.template model has several record rules to give access to templates
linked to models managed by certain groups (like crm.lead for sales managers)
These record rules were meant to restrict access to certain model to create,
write and unlink, but not read.

This is leading to issues when trying to read a template on other models.
Indeed people should always be able read sms.template content.

Unit test were also added to the sms module to ensure that a member of
group_user can always read a sms template.

Unit test is added to ensure admin always has full control on sms.templates.

Task ID-2191254
COM PR odoo/odoo#68445
ENT PR odoo/enterprise#17340

X-original-commit: c9e119a096ba5410e0ab9767207192eb4b7822a2</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] sms, link_tracker: clean some test helpers and add an helper to click SMS links</title>
<updated>2020-05-26T10:35:58+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2020-05-26T09:50:51+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e8b1e2b7e448e0e29ca75c1585814788345c643b'/>
<id>e8b1e2b7e448e0e29ca75c1585814788345c643b</id>
<content type='text'>
Clean some helpers, and add a helper to simulata a click on a shortened link
embedded in an SMS.

Task ID 2247037
Community PR #50384</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clean some helpers, and add a helper to simulata a click on a shortened link
embedded in an SMS.

Task ID 2247037
Community PR #50384</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] sms: fix test helpers calling a removed method</title>
<updated>2020-05-26T10:35:58+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2020-05-26T08:13:07+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c13c3318b2eb32366fe342edb934461c4efbffcd'/>
<id>c13c3318b2eb32366fe342edb934461c4efbffcd</id>
<content type='text'>
Fix a crash when calling assertSMSStatistics without a number but taking the
number from a partner.

Also fix "sent" sms helper, content should be optional like other helpers.

Task ID 2247037
Community PR #50384</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix a crash when calling assertSMSStatistics without a number but taking the
number from a partner.

Also fix "sent" sms helper, content should be optional like other helpers.

Task ID 2247037
Community PR #50384</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] (test_)(mass_)mail(_full): rename and reorganize mail related test classes</title>
<updated>2020-05-26T10:35:58+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2020-04-29T11:38:20+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=4a2ac044f8bd4a5a1f96f0e45c008473dc15eec3'/>
<id>4a2ac044f8bd4a5a1f96f0e45c008473dc15eec3</id>
<content type='text'>
Modules holding tests and helpers

  * link_tracker: mainly mock, asserts and tools for link tracker tests
    (MockLinkTracker);
  * mail: mainly gateway mock and base for mail tests
    * MockEmail -&gt; mocks for mail gateway;
    * MailCase -&gt; tools and asserts for mail tests;
    * MailCommon -&gt;     base for mail functional tests);

  * sms: mainly SMS gateway mock and base for sms tests
    * MockSMS -&gt; mocks for SMS gateway;
    * SMS Case -&gt; tools and asserts for mail / SMS tests;
    * SMSCommon -&gt; update of MailCommon with SMS capabilities);

  * mass_mailing: mainly asserts and tools for mass mailing tests
    * MassMailCase -&gt; update of MailCase for mass mailing tools and asserts;
    * MassMailCommon -&gt; update of MailCommon with mass mailing);

  * mass_mailing_sms: mainly asserts and tools for mass SMS tests
    * MockMassSMS -&gt; update of MockSMS for mass SMS tools and asserts;
    * MassSMSCommon -&gt; update of MassMailCommon with SMS capabilities);

Modules for tests

  * test_mail: module for mail app tests (TestMailCommon);
  * test_mass_mailing: module for mass mailing app tests (TestMassMailCommon);
  * test_mail_full: tests integrating all discuss features, currently mainly
    mail and SMS (TestMailFullCommon);

Enterprise: update test_mail_enterprise and test_marketing_automation

Task ID 2247037
Community PR odoo/odoo#50384
Enterprise PR odoo/enterprise#10266
Upgrade PR odoo/upgrade#1122</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Modules holding tests and helpers

  * link_tracker: mainly mock, asserts and tools for link tracker tests
    (MockLinkTracker);
  * mail: mainly gateway mock and base for mail tests
    * MockEmail -&gt; mocks for mail gateway;
    * MailCase -&gt; tools and asserts for mail tests;
    * MailCommon -&gt;     base for mail functional tests);

  * sms: mainly SMS gateway mock and base for sms tests
    * MockSMS -&gt; mocks for SMS gateway;
    * SMS Case -&gt; tools and asserts for mail / SMS tests;
    * SMSCommon -&gt; update of MailCommon with SMS capabilities);

  * mass_mailing: mainly asserts and tools for mass mailing tests
    * MassMailCase -&gt; update of MailCase for mass mailing tools and asserts;
    * MassMailCommon -&gt; update of MailCommon with mass mailing);

  * mass_mailing_sms: mainly asserts and tools for mass SMS tests
    * MockMassSMS -&gt; update of MockSMS for mass SMS tools and asserts;
    * MassSMSCommon -&gt; update of MassMailCommon with SMS capabilities);

Modules for tests

  * test_mail: module for mail app tests (TestMailCommon);
  * test_mass_mailing: module for mass mailing app tests (TestMassMailCommon);
  * test_mail_full: tests integrating all discuss features, currently mainly
    mail and SMS (TestMailFullCommon);

Enterprise: update test_mail_enterprise and test_marketing_automation

Task ID 2247037
Community PR odoo/odoo#50384
Enterprise PR odoo/enterprise#10266
Upgrade PR odoo/upgrade#1122</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][IMP] sms: create failed notification when SMS-ing record without any phone number</title>
<updated>2020-04-30T14:47:49+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2020-04-30T13:27:26+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c5c7a02302f6095c2ecf1e215421a8c9ff630638'/>
<id>c5c7a02302f6095c2ecf1e215421a8c9ff630638</id>
<content type='text'>
When no valid phone number was found on a record, and when using _message_sms
directly, no SMS and no notification was created. You could therefore think
everything was ok while it was actually not.

Instead we now create failed notifications. It allows to be notified of it
and fix numbers through cancel / resend wizards.

Task ID 2244192

closes odoo/odoo#50486

X-original-commit: baecdfaa2d31714a20d1fb8af7799af1805cd939
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 no valid phone number was found on a record, and when using _message_sms
directly, no SMS and no notification was created. You could therefore think
everything was ok while it was actually not.

Instead we now create failed notifications. It allows to be notified of it
and fix numbers through cancel / resend wizards.

Task ID 2244192

closes odoo/odoo#50486

X-original-commit: baecdfaa2d31714a20d1fb8af7799af1805cd939
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] sms: fix crash when using composer on a record without valid phone number</title>
<updated>2020-04-30T14:47:49+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2020-04-30T13:11:26+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9a3581d925af1a00849418608fd5db6d3cae203b'/>
<id>9a3581d925af1a00849418608fd5db6d3cae203b</id>
<content type='text'>
When no valid phone number was found on a record, and when using the composer
in single recipient mode, you had a crash at sending as composer tried to
write on a field called False.

Instead we just take the first available phone field of the record. As they
are all void we can update them safely.

Task ID 2244192

X-original-commit: 2306d7d79d8e64597912f15365cede7473589731</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When no valid phone number was found on a record, and when using the composer
in single recipient mode, you had a crash at sending as composer tried to
write on a field called False.

Instead we just take the first available phone field of the record. As they
are all void we can update them safely.

Task ID 2244192

X-original-commit: 2306d7d79d8e64597912f15365cede7473589731</pre>
</div>
</content>
</entry>
</feed>
