<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/test_mail/tests/test_message_compose.py, 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>[MOV] test_mail: split post and composer tests</title>
<updated>2019-09-06T13:37:56+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2019-09-06T10:18:27+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=8a8da21d2ecc59542be549812b2c6b89bd86f3db'/>
<id>8a8da21d2ecc59542be549812b2c6b89bd86f3db</id>
<content type='text'>
PURPOSE

In order to rewrite some tests, remove low-level tests and add coverage
first step is to reorganize a bit test_mail content. Several tests cases
are spread among several files and finding back some feature coverage
tests is not easy.

SPECIFICATIONS

Reorganize tests, notably

  * put message_post related test in test_message_post;
  * have only composer related test in test_message_compose(r);
  * put alias tests in test_mail_gateway;
  * move some discuss tests to post tests as they are linked to notification
    details, not really Discuss features.

LINKS

Task 1958697</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

In order to rewrite some tests, remove low-level tests and add coverage
first step is to reorganize a bit test_mail content. Several tests cases
are spread among several files and finding back some feature coverage
tests is not easy.

SPECIFICATIONS

Reorganize tests, notably

  * put message_post related test in test_message_post;
  * have only composer related test in test_message_compose(r);
  * put alias tests in test_mail_gateway;
  * move some discuss tests to post tests as they are linked to notification
    details, not really Discuss features.

LINKS

Task 1958697</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] test_mail: lessen data created by default</title>
<updated>2019-09-06T13:27:59+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2019-05-08T14:19:51+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=46241ce8a92390a797f6b90d6fbd79014439eec0'/>
<id>46241ce8a92390a797f6b90d6fbd79014439eec0</id>
<content type='text'>
PURPOSE

In order to rewrite some tests, remove low-level tests and add coverage
first step is to reorganize a bit test_mail content. Several tests cases
are spread among several files and finding back some feature coverage
tests is not easy.

SPECIFICATIONS

Quickly clean common class and lessen data creation by default. Offer some
tool methods, notably to create portal users used in some tests but not
all, or to create mail templates.

LINKS

Task 1958697</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

In order to rewrite some tests, remove low-level tests and add coverage
first step is to reorganize a bit test_mail content. Several tests cases
are spread among several files and finding back some feature coverage
tests is not easy.

SPECIFICATIONS

Quickly clean common class and lessen data creation by default. Offer some
tool methods, notably to create portal users used in some tests but not
all, or to create mail templates.

LINKS

Task 1958697</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] mail, test_mail, *: rename needaction_partner_ids to notified_partner_ids</title>
<updated>2019-08-05T11:50:20+00:00</updated>
<author>
<name>Xavier-Do</name>
<email>xdo@odoo.com</email>
</author>
<published>2019-07-31T09:38:30+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=bb37ab21199d9f17e180f225916f5f66c87af660'/>
<id>bb37ab21199d9f17e180f225916f5f66c87af660</id>
<content type='text'>
,*:crm, website_blog

The mail.message needaction_partner_ids meaning changed over time,
and doesn't actually reflect the list of partner in needaction.
More than that the message_format needaction_partner_ids used by js
began to diverged from mail.message field since 19fb650863f11172c8a6839fcc10919e9ca9977b

To avoid any confusion, renaming it to notified_partner_ids will help
to avoid confusion between python and js meaning, and reflect the actual
content of this field : a list of partner that where notified once on
this message. This field is mainly usefull for testing.

Task-ID 402597</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
,*:crm, website_blog

The mail.message needaction_partner_ids meaning changed over time,
and doesn't actually reflect the list of partner in needaction.
More than that the message_format needaction_partner_ids used by js
began to diverged from mail.message field since 19fb650863f11172c8a6839fcc10919e9ca9977b

To avoid any confusion, renaming it to notified_partner_ids will help
to avoid confusion between python and js meaning, and reflect the actual
content of this field : a list of partner that where notified once on
this message. This field is mainly usefull for testing.

Task-ID 402597</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] *: sudo() -&gt; with_user()</title>
<updated>2019-07-04T11:32:22+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2019-06-17T09:45:09+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=b7fd679a6c41dbb694c6fb2ce4911798de0424b1'/>
<id>b7fd679a6c41dbb694c6fb2ce4911798de0424b1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] *: removes datas_fname from ir.attachment</title>
<updated>2019-06-05T09:12:13+00:00</updated>
<author>
<name>Thanh Dodeur</name>
<email>tso@odoo.com</email>
</author>
<published>2019-04-05T08:11:26+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c212cfe8992292f57acacd809de26e1817533095'/>
<id>c212cfe8992292f57acacd809de26e1817533095</id>
<content type='text'>
This commit removes the field `datas_fname` from `ir.attachment` as
it was unnecessary and most of the time the duplicate of `name` or
`url`.

Task #1909865

closes odoo/odoo#32976

Signed-off-by: Martin Geubelle (mge) &lt;mge@openerp.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit removes the field `datas_fname` from `ir.attachment` as
it was unnecessary and most of the time the duplicate of `name` or
`url`.

Task #1909865

closes odoo/odoo#32976

Signed-off-by: Martin Geubelle (mge) &lt;mge@openerp.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] mail: reduce message_post query count and clean code</title>
<updated>2019-05-29T13:34:32+00:00</updated>
<author>
<name>Xavier-Do</name>
<email>xdo@odoo.com</email>
</author>
<published>2019-04-12T13:21:18+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=de7c119e666d108564b3889d1c08e5bf2e4da082'/>
<id>de7c119e666d108564b3889d1c08e5bf2e4da082</id>
<content type='text'>
Purpose of this commit is to improve performance of post and notify through
various code improvements.

Containing
  * making of _notify_customize_recipients a mail.thread method;
  * _message_auto_subscribe_followers optimized;
  * renaming and optimisation of _notify_partners;
  * message_post_attachements optization;
  * remove unused mail_post_autofollow_partner_ids context key;
  * minimize message create queries;
  * only check record related access right for thread messages not in pending
    moderation;
  * get attachements from values instead of db;
  * storing lang in ctx from the beginning;
  * don't track on write on attachments;

Related to task 1943901
Linked to PR #32404</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Purpose of this commit is to improve performance of post and notify through
various code improvements.

Containing
  * making of _notify_customize_recipients a mail.thread method;
  * _message_auto_subscribe_followers optimized;
  * renaming and optimisation of _notify_partners;
  * message_post_attachements optization;
  * remove unused mail_post_autofollow_partner_ids context key;
  * minimize message create queries;
  * only check record related access right for thread messages not in pending
    moderation;
  * get attachements from values instead of db;
  * storing lang in ctx from the beginning;
  * don't track on write on attachments;

Related to task 1943901
Linked to PR #32404</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] mail, various: apply light code cleaning</title>
<updated>2019-05-29T13:32:26+00:00</updated>
<author>
<name>Xavier-Do</name>
<email>xdo@odoo.com</email>
</author>
<published>2019-04-12T11:42:47+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c9d173a3e7645eef388a927466d564889d304cb6'/>
<id>c9d173a3e7645eef388a927466d564889d304cb6</id>
<content type='text'>
Purpose of this commit is to clean some bits of code, notably calls to
message_post/log as well as notification methods. It will ease performance
improvement work.

Small optimization: account: read content after extension check

Parameter cleaning

 * use message log with kwargs instead of args;
 * remove message post after hook useless parameters;
 * remove _notify_email_recipients useless message parameter;
 * remove message_notify useless send_after_commit parameters;
 * remove message post params matching default values;

Other improvements

 * remove message_post commands support for partners and channels;
 * only calls message_post with ids list for channels and partners. We
   don't support mix of ids and command anymore to simplify code;
 * remove support of private discussion in mail.thread adding partners
   as recipients, as there is no use anymore;

Related to task 1943901
Linked to PR #32404</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Purpose of this commit is to clean some bits of code, notably calls to
message_post/log as well as notification methods. It will ease performance
improvement work.

Small optimization: account: read content after extension check

Parameter cleaning

 * use message log with kwargs instead of args;
 * remove message post after hook useless parameters;
 * remove _notify_email_recipients useless message parameter;
 * remove message_notify useless send_after_commit parameters;
 * remove message post params matching default values;

Other improvements

 * remove message_post commands support for partners and channels;
 * only calls message_post with ids list for channels and partners. We
   don't support mix of ids and command anymore to simplify code;
 * remove support of private discussion in mail.thread adding partners
   as recipients, as there is no use anymore;

Related to task 1943901
Linked to PR #32404</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] mail: improve user notification model in mail.message</title>
<updated>2019-05-29T13:32:25+00:00</updated>
<author>
<name>XavierDo</name>
<email>xdo@odoo.com</email>
</author>
<published>2019-04-12T11:42:43+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d917b2d072a837d0d7deb0429b7552d680f26b6f'/>
<id>d917b2d072a837d0d7deb0429b7552d680f26b6f</id>
<content type='text'>
Currently if a message has a res_id and a res_model it appears in the
matching record's chatter. Its access rights are computed based on this
record. This is the standard behavior of mail.message model.

User notifications are currently built on messages not having model and
res_id in order to avoid appearing on chatter. This has several drawbacks
notably access rights, redirection to the record, systray, finding back
records, ...

This commit solves those issues by adding new message_type 'user_notification'
that should be as a classic mail.message with model and res_id but without
the whole notification mechanism and without being displayed in the chatter.

An user notification is now a classic message pushed to a given partner only
and not displayed in the chatter.

Related to task 1943901
Linked to PR #32404</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently if a message has a res_id and a res_model it appears in the
matching record's chatter. Its access rights are computed based on this
record. This is the standard behavior of mail.message model.

User notifications are currently built on messages not having model and
res_id in order to avoid appearing on chatter. This has several drawbacks
notably access rights, redirection to the record, systray, finding back
records, ...

This commit solves those issues by adding new message_type 'user_notification'
that should be as a classic mail.message with model and res_id but without
the whole notification mechanism and without being displayed in the chatter.

An user notification is now a classic message pushed to a given partner only
and not displayed in the chatter.

Related to task 1943901
Linked to PR #32404</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] test_mail: add tests for mail gateway and perform light cleaning</title>
<updated>2019-04-26T10:28:09+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2019-04-15T15:33:23+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e87189222dfcb1c2ca3285862c9d7a28d6ea1426'/>
<id>e87189222dfcb1c2ca3285862c9d7a28d6ea1426</id>
<content type='text'>
This commit add some tests related to the mail gateway: more bounce management
tests and some additional thread formation tests. Some test asserts about
bounce / blacklist management are commented as they are not completely working
currently. This will be improved in master soon.

Some cleaning in also done in all mail gateway tests. Notably some call to
tool methods are cleaned / simplified, duplicate tests are removed. Some
low-level checks are removed.

A new test model is added for mail gateway: mail.test.gateway. It is a
chatter model with blacklist enabled on it. It allows to tests the
various blacklist-related overrides and features as well as all basic
mail gateway features.

Sub-part of task 1853147 (pre-cleaning before implementing mail gateway
improvements)
Linked to PR #32974</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit add some tests related to the mail gateway: more bounce management
tests and some additional thread formation tests. Some test asserts about
bounce / blacklist management are commented as they are not completely working
currently. This will be improved in master soon.

Some cleaning in also done in all mail gateway tests. Notably some call to
tool methods are cleaned / simplified, duplicate tests are removed. Some
low-level checks are removed.

A new test model is added for mail gateway: mail.test.gateway. It is a
chatter model with blacklist enabled on it. It allows to tests the
various blacklist-related overrides and features as well as all basic
mail gateway features.

Sub-part of task 1853147 (pre-cleaning before implementing mail gateway
improvements)
Linked to PR #32974</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] test_mail: use odoo test helper method to create test users</title>
<updated>2018-10-18T13:57:02+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2018-10-11T08:41:50+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a7b3d1697cad1a9d5801dab1736359e9caa1ba90'/>
<id>a7b3d1697cad1a9d5801dab1736359e9caa1ba90</id>
<content type='text'>
Purpose of this commit is to use the newly introduced helper to create
test users in a quick way and reduce code duplication. A mail specific
helper tool function is defined based on the standard one defined in test
allowing to pass a custom context. It bypasses mailing features in order
to speedup the creation.

This commit is linked to task ID 1889703 and PR #27526.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Purpose of this commit is to use the newly introduced helper to create
test users in a quick way and reduce code duplication. A mail specific
helper tool function is defined based on the standard one defined in test
allowing to pass a custom context. It bypasses mailing features in order
to speedup the creation.

This commit is linked to task ID 1889703 and PR #27526.</pre>
</div>
</content>
</entry>
</feed>
