<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/mail/models/mail_render_mixin.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>[IMP] mail: add tests and docstrings for rendering mixin tools (jinja / qweb)</title>
<updated>2021-04-08T15:06:28+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2020-11-18T15:38:45+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=070bec2f3a7a50c6fc8f104cf92a9416ebc001b8'/>
<id>070bec2f3a7a50c6fc8f104cf92a9416ebc001b8</id>
<content type='text'>
PURPOSE

Add some tests for ``mail.render.mixin`` in order to assert its base behavior.

SPECIFICATIONS

Add tests for

  * jinja rendering tools;
  * QWeb rendering tools;
  * translation support;

Also add tests for jinja markers: block, variable and line statement markers
should be tested.

Also improve docstrings of tool methods. Add notably explanation of parameters
and better explain methods purpose.

LINKS

Task ID-2500615
Prepares Task ID-2484296 (improve markers use in Jinja)
Prepares Task ID-27033 (support QWeb in templates)
COM PR odoo/odoo#68874</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

Add some tests for ``mail.render.mixin`` in order to assert its base behavior.

SPECIFICATIONS

Add tests for

  * jinja rendering tools;
  * QWeb rendering tools;
  * translation support;

Also add tests for jinja markers: block, variable and line statement markers
should be tested.

Also improve docstrings of tool methods. Add notably explanation of parameters
and better explain methods purpose.

LINKS

Task ID-2500615
Prepares Task ID-2484296 (improve markers use in Jinja)
Prepares Task ID-27033 (support QWeb in templates)
COM PR odoo/odoo#68874</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: fallback on English message</title>
<updated>2021-02-04T09:40:00+00:00</updated>
<author>
<name>Martin Trigaux</name>
<email>mat@odoo.com</email>
</author>
<published>2021-02-04T09:40:00+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=80f05addf48dd57da9ae78f39116a9b23f60529a'/>
<id>80f05addf48dd57da9ae78f39116a9b23f60529a</id>
<content type='text'>
In case of bad translation that doesn't contain the placeholder

Context:
A bad Japanese translation was inserted

  #. module: mail
  #: code:addons/mail/models/mail_thread.py:0
  #, python-format
  msgid "Create new %(document)s"
  msgstr "新しい%(ドキュメント)を作成する"

The translation has been corrected but use the 14.0 syntax of _ method
to include placeholders and fallback on the English source term in
case of bad translation
cf odoo/odoo#52155

closes odoo/odoo#65517

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case of bad translation that doesn't contain the placeholder

Context:
A bad Japanese translation was inserted

  #. module: mail
  #: code:addons/mail/models/mail_thread.py:0
  #, python-format
  msgid "Create new %(document)s"
  msgstr "新しい%(ドキュメント)を作成する"

The translation has been corrected but use the 14.0 syntax of _ method
to include placeholders and fallback on the English source term in
case of bad translation
cf odoo/odoo#52155

closes odoo/odoo#65517

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[REM] *: ability to put raw modules in evaluation contexts</title>
<updated>2020-09-28T08:35:13+00:00</updated>
<author>
<name>Debauche Stéphane</name>
<email>std@odoo.com</email>
</author>
<published>2020-09-28T08:35:13+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=06a8c5264eb6e87c29ad1d23a14e12dd45aa281c'/>
<id>06a8c5264eb6e87c29ad1d23a14e12dd45aa281c</id>
<content type='text'>
Co-authored-by: Xavier Morel &lt;xmo@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Xavier Morel &lt;xmo@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] mass_mailing: allow to customize the mail preview</title>
<updated>2020-08-18T08:47:28+00:00</updated>
<author>
<name>std-odoo</name>
<email>std@odoo.com</email>
</author>
<published>2020-08-10T08:07:48+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=13d1f3e012d0c528dbea67ee5e1d4c32548195a3'/>
<id>13d1f3e012d0c528dbea67ee5e1d4c32548195a3</id>
<content type='text'>
Purpose
=======
Allow to customize the preview text in mass mailing.

Specifications
==============
We do not generate the preview text anymore, instead we add
a new field to let the user choose want he want to put into
the preview. As the preview is added in the mail body, it
supports dynamic placeholders.

Rename "View in browser" into "View Online" because the text
will be displayed in the preview if the snippet is added at
the beginning of the email. And we want to make it shorter.

Remove the alt attribute of the image tag which are not part
of the "email content" in the mass mailing template.
So, we improve the email preview in the mail clients
(otherwise the mail client include the alt attribute into the
preview).

Task-2313872

closes odoo/odoo#55695

Related: odoo/upgrade#1584
Related: odoo/enterprise#12323
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Purpose
=======
Allow to customize the preview text in mass mailing.

Specifications
==============
We do not generate the preview text anymore, instead we add
a new field to let the user choose want he want to put into
the preview. As the preview is added in the mail body, it
supports dynamic placeholders.

Rename "View in browser" into "View Online" because the text
will be displayed in the preview if the snippet is added at
the beginning of the email. And we want to make it shorter.

Remove the alt attribute of the image tag which are not part
of the "email content" in the mass mailing template.
So, we improve the email preview in the mail clients
(otherwise the mail client include the alt attribute into the
preview).

Task-2313872

closes odoo/odoo#55695

Related: odoo/upgrade#1584
Related: odoo/enterprise#12323
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] mass_mailing: add preview block for mailings</title>
<updated>2020-08-05T13:55:04+00:00</updated>
<author>
<name>std-odoo</name>
<email>std@odoo.com</email>
</author>
<published>2020-05-26T06:29:34+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=ed4846dd9df32aa97ba2bf73ac772428d4237f25'/>
<id>ed4846dd9df32aa97ba2bf73ac772428d4237f25</id>
<content type='text'>
PURPOSE

When displaying an email in a list the mail client (gmail, outlook...) computes
a preview based on the content. This preview is generally not well computed as
it contains a lot of garbage and tags while it should contain only relevant
text.

SPECIFICATIONS

To build this preview, all mail clients read the content of the email.
The only way to be able to customize the preview is to add an invisible
HTML element at the beginning of the email with the wanted preview text.

We add at the end of the preview `&amp;zwnj;` (zero-width non-joiner) to
fill the end of the preview in order to not have the beginning of the
mail at the end of the preview. It doesn't work with simple space as
the mail clients trim each HTML element content.

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

When displaying an email in a list the mail client (gmail, outlook...) computes
a preview based on the content. This preview is generally not well computed as
it contains a lot of garbage and tags while it should contain only relevant
text.

SPECIFICATIONS

To build this preview, all mail clients read the content of the email.
The only way to be able to customize the preview is to add an invisible
HTML element at the beginning of the email with the wanted preview text.

We add at the end of the preview `&amp;zwnj;` (zero-width non-joiner) to
fill the end of the preview in order to not have the beginning of the
mail at the end of the preview. It doesn't work with simple space as
the mail clients trim each HTML element content.

Task ID-2172125
PR #49886</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] mail: add first lightweight support of qweb in rendering mixin</title>
<updated>2020-06-04T15:19:25+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2020-05-28T13:28:56+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e1432afd9cfbd148e651fe13cb4459593e72e32d'/>
<id>e1432afd9cfbd148e651fe13cb4459593e72e32d</id>
<content type='text'>
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS

In this commit we simply add a first support of tools to render qweb templates
like rendering jinja. Instead of giving the template to render the xml id of
the view is passed.

This code is meant to be improved in a near future with new use cases that
will soon arise.

LINKS

Task ID 2197417
PR odoo/odoo#51619</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS

In this commit we simply add a first support of tools to render qweb templates
like rendering jinja. Instead of giving the template to render the xml id of
the view is passed.

This code is meant to be improved in a near future with new use cases that
will soon arise.

LINKS

Task ID 2197417
PR odoo/odoo#51619</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] *: useless parameter 'placeholder' on fields</title>
<updated>2020-04-07T09:25:08+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2019-02-20T12:37:19+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=4e95c9b99961261fd76cd10ca052ee68e8dc8044'/>
<id>4e95c9b99961261fd76cd10ca052ee68e8dc8044</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[MOV] mail, various: move replace_local_links to render mixin</title>
<updated>2020-03-24T10:24:44+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2020-03-11T11:29:46+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=3d86a29aeb21c7e5812c988866117a495f20ebed'/>
<id>3d86a29aeb21c7e5812c988866117a495f20ebed</id>
<content type='text'>
PURPOSE

Move links shortening tools on mail.render.mixin to have rendering and
post procesing tools available on that mixin.

LINKS

Task ID 1963529
Community PR odoo/odoo#32397</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

Move links shortening tools on mail.render.mixin to have rendering and
post procesing tools available on that mixin.

LINKS

Task ID 1963529
Community PR odoo/odoo#32397</pre>
</div>
</content>
</entry>
<entry>
<title>[MOV] mail, sms: move language computation in render mixin directly</title>
<updated>2020-03-24T10:24:42+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2020-03-06T13:17:20+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=2835e0ba38f67f76b7f43948290050dcc68cd9db'/>
<id>2835e0ba38f67f76b7f43948290050dcc68cd9db</id>
<content type='text'>
PURPOSE

Merge rendering tools used in mail and sms templates as well as partially
in mailings and move them directly in mail.render.mixin.

SPECIFICATIONS

Move tools related to language computation from mail.template model to the
mail.render.mixin. It allows to update both

  * mail.template: simply update calls accordingly;
  * sms.template: remove code doing what is now available through mail.render
    .mixin inherit;

Lang field is moved to mail.render.mixin as it is used notably for the language
computation. It therefore adds the field on mailing.mailing model although
not used currently.

LINKS

Task ID 1963529
Community PR odoo/odoo#32397</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

Merge rendering tools used in mail and sms templates as well as partially
in mailings and move them directly in mail.render.mixin.

SPECIFICATIONS

Move tools related to language computation from mail.template model to the
mail.render.mixin. It allows to update both

  * mail.template: simply update calls accordingly;
  * sms.template: remove code doing what is now available through mail.render
    .mixin inherit;

Lang field is moved to mail.render.mixin as it is used notably for the language
computation. It therefore adds the field on mailing.mailing model although
not used currently.

LINKS

Task ID 1963529
Community PR odoo/odoo#32397</pre>
</div>
</content>
</entry>
</feed>
