<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/mail/static/src/models/messaging_notification_handler, 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>[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: this.env.services.bus_service is undefined</title>
<updated>2021-02-25T11:18:27+00:00</updated>
<author>
<name>Alexandre Kühn</name>
<email>aku@odoo.com</email>
</author>
<published>2021-02-25T11:09:12+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a444f9c89bb8d5790b8a068a8f120f6ea9d1b17f'/>
<id>a444f9c89bb8d5790b8a068a8f120f6ea9d1b17f</id>
<content type='text'>
Before this commit, a page reload or a redirect could raise following
error:

```
Uncaught (in promise) TypeError: this.env.services.bus_service is undefined
```

This happens due to `Messaging` model relying on `bus_service` in its
teardown method `_willDelete`. This is sometimes unsafe because the
bus service may not have been deployed yet.

Task-2468469

closes odoo/odoo#66818

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>
Before this commit, a page reload or a redirect could raise following
error:

```
Uncaught (in promise) TypeError: this.env.services.bus_service is undefined
```

This happens due to `Messaging` model relying on `bus_service` in its
teardown method `_willDelete`. This is sometimes unsafe because the
bus service may not have been deployed yet.

Task-2468469

closes odoo/odoo#66818

Signed-off-by: Sébastien Theys (seb) &lt;seb@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: Don't log unhandled notification</title>
<updated>2021-02-23T09:58:10+00:00</updated>
<author>
<name>Lucas Lefèvre</name>
<email>lul@odoo.com</email>
</author>
<published>2021-02-23T09:05:27+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e0ae3c6270467985a4d56c902ef109ffc5513b13'/>
<id>e0ae3c6270467985a4d56c902ef109ffc5513b13</id>
<content type='text'>
The `mail` module logs bus notifications it does not handle. However, some
notifications are not meant to be handled by `mail` and it's perfectly fine.

This commit removes the log to avoid useless noise in the console.

closes odoo/odoo#66661

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>
The `mail` module logs bus notifications it does not handle. However, some
notifications are not meant to be handled by `mail` and it's perfectly fine.

This commit removes the log to avoid useless noise in the console.

closes odoo/odoo#66661

Signed-off-by: Sébastien Theys (seb) &lt;seb@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: (mobile) Prevent server sync for open/close state</title>
<updated>2021-02-12T10:08:57+00:00</updated>
<author>
<name>Julien Giannone</name>
<email>jgi@odoo.com</email>
</author>
<published>2021-01-15T10:32:52+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a257e0ede12ead06c0f8dba90c3868761da6ea71'/>
<id>a257e0ede12ead06c0f8dba90c3868761da6ea71</id>
<content type='text'>
This commit prevents the opening/closure of a channel on mobile when
the action is performed on desktop and reciprocally

closes odoo/odoo#64599

Tasks-id: 2267593
Related: odoo/enterprise#16296
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>
This commit prevents the opening/closure of a channel on mobile when
the action is performed on desktop and reciprocally

closes odoo/odoo#64599

Tasks-id: 2267593
Related: odoo/enterprise#16296
Signed-off-by: Sébastien Theys (seb) &lt;seb@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: make Inbox counters more reliable in mark as read flows</title>
<updated>2021-01-28T10:55:58+00:00</updated>
<author>
<name>Sébastien Theys</name>
<email>seb@odoo.com</email>
</author>
<published>2021-01-28T10:55:58+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=fa398ea291a72fa7752d382f85e6ef2ce7ac4c70'/>
<id>fa398ea291a72fa7752d382f85e6ef2ce7ac4c70</id>
<content type='text'>
- Send the new Inbox counter when marking as read, to guarantee the JS has the
  correct value (instead of having to guess it which was impossible when an
  arbitrary domain was given to the method).

  NOTE: Manual increment is kept on receiving a new Inbox message because that
  one was reliable and it would have been more tricky to compute the new counter
  for each target partner (mark as read is one user doing an action for himself,
  whereas new message is from another user to potentially many different users).
  Generic counter for threads is also not sent on every change for similar
  reasons.

- Refresh Inbox automatically when some messages are marked as read and there
  are more message on the server than currently loaded.

- Remove confusing (and impossible to maintain) counter on non-origin threads
  (in particular channel followers). This behavior in JS was not consistent with
  the server which always counted only origin thread (model/res_id).

task-2446302

closes odoo/odoo#65161

Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Send the new Inbox counter when marking as read, to guarantee the JS has the
  correct value (instead of having to guess it which was impossible when an
  arbitrary domain was given to the method).

  NOTE: Manual increment is kept on receiving a new Inbox message because that
  one was reliable and it would have been more tricky to compute the new counter
  for each target partner (mark as read is one user doing an action for himself,
  whereas new message is from another user to potentially many different users).
  Generic counter for threads is also not sent on every change for similar
  reasons.

- Refresh Inbox automatically when some messages are marked as read and there
  are more message on the server than currently loaded.

- Remove confusing (and impossible to maintain) counter on non-origin threads
  (in particular channel followers). This behavior in JS was not consistent with
  the server which always counted only origin thread (model/res_id).

task-2446302

closes odoo/odoo#65161

Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail, im_livechat, snailmail: use findFromIdentifyingData</title>
<updated>2021-01-18T16:59:02+00:00</updated>
<author>
<name>Sébastien Theys</name>
<email>seb@odoo.com</email>
</author>
<published>2021-01-18T16:49:01+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e995f03a9a55280b1e9173223cdfa619ae164cc3'/>
<id>e995f03a9a55280b1e9173223cdfa619ae164cc3</id>
<content type='text'>
find is O(n) and findFromIdentifyingData is O(1)

task-2440693

closes odoo/odoo#64712

Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
find is O(n) and findFromIdentifyingData is O(1)

task-2440693

closes odoo/odoo#64712

Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: adapt mail notification</title>
<updated>2020-12-21T04:45:58+00:00</updated>
<author>
<name>Thanh Dodeur</name>
<email>tso@odoo.com</email>
</author>
<published>2020-12-21T04:43:55+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=eabab5f20fe3ba79b3117b83af5c62453edc84a4'/>
<id>eabab5f20fe3ba79b3117b83af5c62453edc84a4</id>
<content type='text'>
Before this commit, some notifications in mail were not following the
changes made in odoo/odoo#52826 .

task-2278579

closes odoo/odoo#63614

Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit, some notifications in mail were not following the
changes made in odoo/odoo#52826 .

task-2278579

closes odoo/odoo#63614

Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: ignore partner notification with unsupported `type`</title>
<updated>2020-12-05T22:49:48+00:00</updated>
<author>
<name>Alexandre Kühn</name>
<email>aku@odoo.com</email>
</author>
<published>2020-12-03T13:32:50+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=37ebf84e6fe4647661207f1a9edc1578baf24931'/>
<id>37ebf84e6fe4647661207f1a9edc1578baf24931</id>
<content type='text'>
Task-2411800

closes odoo/odoo#62930

Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Task-2411800

closes odoo/odoo#62930

Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: remove html from new message notification</title>
<updated>2020-12-02T14:00:21+00:00</updated>
<author>
<name>Sébastien Theys</name>
<email>seb@odoo.com</email>
</author>
<published>2020-12-02T14:00:21+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=8af59b95b477b2eeddec118663e21b00a4e48801'/>
<id>8af59b95b477b2eeddec118663e21b00a4e48801</id>
<content type='text'>
task-2388659

closes odoo/odoo#62442

Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
task-2388659

closes odoo/odoo#62442

Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
