<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/mail, 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] account, mail: link attachments to invoice</title>
<updated>2021-05-31T07:21:02+00:00</updated>
<author>
<name>Adrien Widart</name>
<email>awt@odoo.com</email>
</author>
<published>2021-05-04T14:51:12+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e6c69a8cf00cd858a45ebf321a190666322c0897'/>
<id>e6c69a8cf00cd858a45ebf321a190666322c0897</id>
<content type='text'>
When using the "Send &amp; Print" functionality, if the user adds an
attachment, the latter won't be linked to the record.

To reproduce the error:
1. Open a posted invoice
2. Send &amp; Print
3. Attach a file &gt; Select a file on your device
4. Send the email

Error: The invoice's PDF is added to record's attachments, but not the
other file (from step 3).

When the module selects the attachments that need to be linked to the
invoice, it only keeps the ones currently linked to `mail.compose.message`:
https://github.com/odoo/odoo/blob/6441ab71cb68648aa735057952bf757677a20ee3/addons/mail/models/mail_thread.py#L1719-L1725
This is correct when the user creates a message directly in the chatter.
However, when the mail is created thanks to `Send &amp; Print` functionality,
the attachment is linked to `account.invoice.send`.

Another flow have a similar issue: from invoices list, select few ones,
Action &gt; Send &amp; Print: the generated PDF won't be attached to their
invoice. In such a situation, here is the source of the problem:
https://github.com/odoo/odoo/blob/05ad6c477f7da2a495e5baf5b4629323b9d11fa0/addons/mail/wizard/mail_compose_message.py#L363-L367
There isn't any information about the invoice, therefore it is not
possible to linked the attachment to it.

OPW-2438457

closes odoo/odoo#71425

X-original-commit: e87f599d4eb22250b628d650b9f59b54db8d043c
Signed-off-by: Adrien Widart &lt;adwid@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using the "Send &amp; Print" functionality, if the user adds an
attachment, the latter won't be linked to the record.

To reproduce the error:
1. Open a posted invoice
2. Send &amp; Print
3. Attach a file &gt; Select a file on your device
4. Send the email

Error: The invoice's PDF is added to record's attachments, but not the
other file (from step 3).

When the module selects the attachments that need to be linked to the
invoice, it only keeps the ones currently linked to `mail.compose.message`:
https://github.com/odoo/odoo/blob/6441ab71cb68648aa735057952bf757677a20ee3/addons/mail/models/mail_thread.py#L1719-L1725
This is correct when the user creates a message directly in the chatter.
However, when the mail is created thanks to `Send &amp; Print` functionality,
the attachment is linked to `account.invoice.send`.

Another flow have a similar issue: from invoices list, select few ones,
Action &gt; Send &amp; Print: the generated PDF won't be attached to their
invoice. In such a situation, here is the source of the problem:
https://github.com/odoo/odoo/blob/05ad6c477f7da2a495e5baf5b4629323b9d11fa0/addons/mail/wizard/mail_compose_message.py#L363-L367
There isn't any information about the invoice, therefore it is not
possible to linked the attachment to it.

OPW-2438457

closes odoo/odoo#71425

X-original-commit: e87f599d4eb22250b628d650b9f59b54db8d043c
Signed-off-by: Adrien Widart &lt;adwid@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[I18N] Update translation terms from Transifex</title>
<updated>2021-05-29T22:12:16+00:00</updated>
<author>
<name>Odoo Translation Bot</name>
<email>c3p@odoo.com</email>
</author>
<published>2021-05-29T22:12:16+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=1f1cf4029fde27eee7be75fc24fa9218cbfebd23'/>
<id>1f1cf4029fde27eee7be75fc24fa9218cbfebd23</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: use template lang on layout and display name</title>
<updated>2021-05-27T14:25:28+00:00</updated>
<author>
<name>nie</name>
<email>nie@odoo.com</email>
</author>
<published>2021-04-01T15:12:09+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=74da8e27c7e16fa92eb1547cec1a7ce82e15e0c6'/>
<id>74da8e27c7e16fa92eb1547cec1a7ce82e15e0c6</id>
<content type='text'>
Steps:
- Install sale
- Go to Settings / Translations / Languages
- Activate Dutch
- Go to Settings / Users &amp; Companies / Users
- Edit demo
  - Language: Dutch
- Go to Sales
- Create a quotation:
  - Customer: demo
- Go to Settings / Technical / Automation / Scheduled Actions
- Create a new action:
  - Model: Sales Order
  - Python code:
  ```python
  last_id = model.search([], order='id desc', limit=1)[0].id
  env.ref('sale.email_template_edi_sale').send_mail(last_id, notif_layout='mail.mail_notification_paynow')
  ```
- Click "Run Manually"
- Go to Settings / Technical / Email / Emails
- Open the last email you just sent

Bug:
Parts of the email are not in Dutch

Explanation:
This commit makes a template pass the rendering language to the layout
and the display name when calling `template.send_mail()`.

opw:2467640

closes odoo/odoo#68656

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Steps:
- Install sale
- Go to Settings / Translations / Languages
- Activate Dutch
- Go to Settings / Users &amp; Companies / Users
- Edit demo
  - Language: Dutch
- Go to Sales
- Create a quotation:
  - Customer: demo
- Go to Settings / Technical / Automation / Scheduled Actions
- Create a new action:
  - Model: Sales Order
  - Python code:
  ```python
  last_id = model.search([], order='id desc', limit=1)[0].id
  env.ref('sale.email_template_edi_sale').send_mail(last_id, notif_layout='mail.mail_notification_paynow')
  ```
- Click "Run Manually"
- Go to Settings / Technical / Email / Emails
- Open the last email you just sent

Bug:
Parts of the email are not in Dutch

Explanation:
This commit makes a template pass the rendering language to the layout
and the display name when calling `template.send_mail()`.

opw:2467640

closes odoo/odoo#68656

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail,test_mass_mailing: unblacklist with mass mailing</title>
<updated>2021-05-26T11:23:28+00:00</updated>
<author>
<name>Nicolas Lempereur</name>
<email>nle@odoo.com</email>
</author>
<published>2021-05-21T08:46:20+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=965c67cb16d2a4ac10d35a01da3af311867a47e6'/>
<id>965c67cb16d2a4ac10d35a01da3af311867a47e6</id>
<content type='text'>
The optimization 2ccf0bd0dc does not take into account that to
"unblacklist" a user, you have the archive the mail.blacklist record so
only mail.blacklist active records need to be taken into account.

Added test without the fix fails with:

    AssertionError: False is not true : MailTrace: email
    test.record.02@test.example.com (recipient res.partner(), state:
    sent, record: mailing.test.blacklist(166,)): found 0 records (1 expected)

opw-2536304

closes odoo/odoo#71239

X-original-commit: 8ffd82249728b79959cfa61490730991a2b339d6
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The optimization 2ccf0bd0dc does not take into account that to
"unblacklist" a user, you have the archive the mail.blacklist record so
only mail.blacklist active records need to be taken into account.

Added test without the fix fails with:

    AssertionError: False is not true : MailTrace: email
    test.record.02@test.example.com (recipient res.partner(), state:
    sent, record: mailing.test.blacklist(166,)): found 0 records (1 expected)

opw-2536304

closes odoo/odoo#71239

X-original-commit: 8ffd82249728b79959cfa61490730991a2b339d6
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[REV] mail: fix a traceback when sending a message in a "email channel"</title>
<updated>2021-05-26T07:36:03+00:00</updated>
<author>
<name>std-odoo</name>
<email>std@odoo.com</email>
</author>
<published>2021-01-26T14:11:57+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=123dce518a0ea44725c55a0719ea45f6d603ff66'/>
<id>123dce518a0ea44725c55a0719ea45f6d603ff66</id>
<content type='text'>
Bug
===
Since 4da64b3f3c8dff88d8e0e01c65374590cc0bf4f7 , if multiple users of
different companies are in the same channel, and if the type of the
channel is "email", a traceback is raised when sending a message.

Technical
=========
"with_user" drop the SU flag and is not enough to bypass the multi
company ACLs. Moreover, we do not want to send a "channel_seen" bus
notifications and we can mark the message as seen on the JS side
directly.

Changes
=======
So now, the traceback is not raised anymore in that case, and the
message is marked as seen if the receiver has the web client open.

But, if the receiver has not the web client open, when he will login,
the message will not be marked as seen. This can be improved but at the
moment we just want to revert the fix that cause the traceback and fix
the issue in most cases.

Task 2427790

closes odoo/odoo#65185

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug
===
Since 4da64b3f3c8dff88d8e0e01c65374590cc0bf4f7 , if multiple users of
different companies are in the same channel, and if the type of the
channel is "email", a traceback is raised when sending a message.

Technical
=========
"with_user" drop the SU flag and is not enough to bypass the multi
company ACLs. Moreover, we do not want to send a "channel_seen" bus
notifications and we can mark the message as seen on the JS side
directly.

Changes
=======
So now, the traceback is not raised anymore in that case, and the
message is marked as seen if the receiver has the web client open.

But, if the receiver has not the web client open, when he will login,
the message will not be marked as seen. This can be improved but at the
moment we just want to revert the fix that cause the traceback and fix
the issue in most cases.

Task 2427790

closes odoo/odoo#65185

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: chat window should remain folded on new message</title>
<updated>2021-05-21T04:38:56+00:00</updated>
<author>
<name>Dhruv Patel</name>
<email>dhp@odoo.com</email>
</author>
<published>2021-05-12T11:17:51+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=cf3bf892c9833cd38a8269c8948d845dd3652403'/>
<id>cf3bf892c9833cd38a8269c8948d845dd3652403</id>
<content type='text'>
If the chat window was initially folded and when a new message is received
the chat window automatically unfolds. it is annoying having a window that
pops up each time a new message is coming while having folded it once.
So, It should remain folded when a new message is received if the chat
window is already folded.

Task : 2522141

closes odoo/odoo#70737

Signed-off-by: Sébastien Theys (seb) &lt;seb@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the chat window was initially folded and when a new message is received
the chat window automatically unfolds. it is annoying having a window that
pops up each time a new message is coming while having folded it once.
So, It should remain folded when a new message is received if the chat
window is already folded.

Task : 2522141

closes odoo/odoo#70737

Signed-off-by: Sébastien Theys (seb) &lt;seb@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: prevent useless write</title>
<updated>2021-05-17T11:11:34+00:00</updated>
<author>
<name>Florent de Labarre</name>
<email>florent.mirieu@gmail.com</email>
</author>
<published>2021-05-17T11:11:34+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=36a9e761c8d6c1c6e9611cc410ecca82ff2b1659'/>
<id>36a9e761c8d6c1c6e9611cc410ecca82ff2b1659</id>
<content type='text'>
In database with frontend and live chat there are lot of bad query error.
bad query: UPDATE "mail_channel_partner" SET "write_uid"=5,"write_date"=(now() at time zone 'UTC') WHERE id IN (328111)

closes odoo/odoo#70506

Error: Could not serialize access due to concurrent update
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In database with frontend and live chat there are lot of bad query error.
bad query: UPDATE "mail_channel_partner" SET "write_uid"=5,"write_date"=(now() at time zone 'UTC') WHERE id IN (328111)

closes odoo/odoo#70506

Error: Could not serialize access due to concurrent update
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[I18N] Update translation terms from Transifex</title>
<updated>2021-05-22T22:12:59+00:00</updated>
<author>
<name>Odoo Translation Bot</name>
<email>c3p@odoo.com</email>
</author>
<published>2021-05-22T22:12:59+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=3780fa2af5d5f6cac91e419bcab69a253db280bd'/>
<id>3780fa2af5d5f6cac91e419bcab69a253db280bd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] *: update documentation links Following the recent reorganisation of the documentation in 12.0+, the majority of the documents have been moved and their old links are no longer valid. Some redirection rules will soon be deployed, but those rules might be dropped in some years and we want the links to still work, which is why we still replace the links to the new ones.</title>
<updated>2021-05-17T08:25:31+00:00</updated>
<author>
<name>Victor Feyens</name>
<email>vfe@odoo.com</email>
</author>
<published>2021-05-12T14:07:43+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=598dda32f48ffeb64cbd398c6ffb1fe7577468f2'/>
<id>598dda32f48ffeb64cbd398c6ffb1fe7577468f2</id>
<content type='text'>
FW-Port of odoo/odoo#70675 (13.0)

closes odoo/odoo#70728

X-original-commit: 85c24961ab9ff5c1c79eb7415c97c46d9a77cca3
Related: odoo/enterprise#18283
Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FW-Port of odoo/odoo#70675 (13.0)

closes odoo/odoo#70728

X-original-commit: 85c24961ab9ff5c1c79eb7415c97c46d9a77cca3
Related: odoo/enterprise#18283
Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[I18N] Update translation terms from Transifex</title>
<updated>2021-05-15T22:14:02+00:00</updated>
<author>
<name>Odoo Translation Bot</name>
<email>c3p@odoo.com</email>
</author>
<published>2021-05-15T22:14:02+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=068bf17499ff00e4245cb1f471a16a06f0bdc903'/>
<id>068bf17499ff00e4245cb1f471a16a06f0bdc903</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
