<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/mail/static/src/js/models/threads/mailbox.js, 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>[REF] mail, *: refactor messaging with OWL</title>
<updated>2020-06-15T18:12:21+00:00</updated>
<author>
<name>Sébastien Theys</name>
<email>seb@odoo.com</email>
</author>
<published>2020-06-15T18:12:21+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=3fea5b2136627c1d7e83b2a5e111952fe3eb10a1'/>
<id>3fea5b2136627c1d7e83b2a5e111952fe3eb10a1</id>
<content type='text'>
This commit is a significant rewriting of client-side discuss, chatter,
chat window, and messaging menu using OWL. The behavior should be broadly
the same, with some slight functional changes here and there.

From a technical standpoint, the code of messaging is mainly organized in 2
main groups of modules:

- models, which are logical entities that depict the client-side state of
  messaging as a whole.
- components, which are in charge of displaying information from models.

This refactoring also introduces new JS guidelines regarding folder structure
(/static) and naming rules for JS modules.

Community PR: https://github.com/odoo/odoo/pull/39023
Enterprise PR: https://github.com/odoo/enterprise/pull/6249

Task-1914207

This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier,
with the precious help of Lucas to speed it up towards the end.

closes odoo/odoo#39023

Related: odoo/enterprise#6249
Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
Co-authored-by: Alexandre Kühn &lt;aku@odoo.com&gt;
Co-authored-by: Julien Giannone &lt;jgi@odoo.com&gt;
Co-authored-by: Lucas Perais &lt;lpe@odoo.com&gt;
Co-authored-by: Sébastien Theys &lt;seb@odoo.com&gt;
Co-authored-by: Xavier Dubuc &lt;xdu@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit is a significant rewriting of client-side discuss, chatter,
chat window, and messaging menu using OWL. The behavior should be broadly
the same, with some slight functional changes here and there.

From a technical standpoint, the code of messaging is mainly organized in 2
main groups of modules:

- models, which are logical entities that depict the client-side state of
  messaging as a whole.
- components, which are in charge of displaying information from models.

This refactoring also introduces new JS guidelines regarding folder structure
(/static) and naming rules for JS modules.

Community PR: https://github.com/odoo/odoo/pull/39023
Enterprise PR: https://github.com/odoo/enterprise/pull/6249

Task-1914207

This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier,
with the precious help of Lucas to speed it up towards the end.

closes odoo/odoo#39023

Related: odoo/enterprise#6249
Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
Co-authored-by: Alexandre Kühn &lt;aku@odoo.com&gt;
Co-authored-by: Julien Giannone &lt;jgi@odoo.com&gt;
Co-authored-by: Lucas Perais &lt;lpe@odoo.com&gt;
Co-authored-by: Sébastien Theys &lt;seb@odoo.com&gt;
Co-authored-by: Xavier Dubuc &lt;xdu@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: no crash on receiving needaction on messaging not ready</title>
<updated>2020-02-18T10:03:01+00:00</updated>
<author>
<name>Alexandre Kühn</name>
<email>aku@odoo.com</email>
</author>
<published>2020-01-31T15:56:21+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=b1cee5cc668b929f4179d80e597195d2836de816'/>
<id>b1cee5cc668b929f4179d80e597195d2836de816</id>
<content type='text'>
Before this commit, when receiving a needaction message while messaging
was not ready (i.e. `/mail/init_messaging` not resolved), the web client
crashed with the following error message:

```
TypeError: Cannot read property 'incrementMailboxCounter' of undefined
```

This happens due to reception of needaction message incrementing counter
of mailbox Inbox, but this mailbox is only added after messaging is ready.

This commit fixes the issue by directly adding inbox mailbox on starting
the mail service.

closes odoo/odoo#45442

X-original-commit: 741acb9f48f2d3542549791a8fd7d6fb318bc862
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, when receiving a needaction message while messaging
was not ready (i.e. `/mail/init_messaging` not resolved), the web client
crashed with the following error message:

```
TypeError: Cannot read property 'incrementMailboxCounter' of undefined
```

This happens due to reception of needaction message incrementing counter
of mailbox Inbox, but this mailbox is only added after messaging is ready.

This commit fixes the issue by directly adding inbox mailbox on starting
the mail service.

closes odoo/odoo#45442

X-original-commit: 741acb9f48f2d3542549791a8fd7d6fb318bc862
Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] mail, test_mail: new 'History' mailbox in Discuss</title>
<updated>2019-08-05T11:50:19+00:00</updated>
<author>
<name>Nikunj Ladava</name>
<email>nla@odoo.com</email>
</author>
<published>2018-02-02T06:21:44+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=0c37b9fb39005eab70ee8b39da84f79c981b2695'/>
<id>0c37b9fb39005eab70ee8b39da84f79c981b2695</id>
<content type='text'>
This commit adds a new mailbox in the Discuss app called 'History'.
Messages that have been marked as read are moved to 'History'.

Notifications are required to link history messages to users. So
notifications are now deleted after they are more tha 6 months old.
This means History mailbox keeps less than 6 months old messages.

Note that this feature only works when user notifications are handled
in Odoo. This can be set in the user preferences, under the
"Notification Management" section.

Task-ID 402597</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds a new mailbox in the Discuss app called 'History'.
Messages that have been marked as read are moved to 'History'.

Notifications are required to link history messages to users. So
notifications are now deleted after they are more tha 6 months old.
This means History mailbox keeps less than 6 months old messages.

Note that this feature only works when user notifications are handled
in Odoo. This can be set in the user preferences, under the
"Notification Management" section.

Task-ID 402597</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] mail: adapt code after jQuery update</title>
<updated>2019-03-06T19:07:17+00:00</updated>
<author>
<name>Vincent Schippefilt</name>
<email>vsc@odoo.com</email>
</author>
<published>2019-03-06T13:02:19+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=1ae64793fa489b2c1d07408cd9671bc7126f78fa'/>
<id>1ae64793fa489b2c1d07408cd9671bc7126f78fa</id>
<content type='text'>
Part of task 1896658

Co-authored-by: Aaron Bohy &lt;aab@odoo.com&gt;
Co-authored-by: Christophe Matthieu &lt;chm@odoo.com&gt;
Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;
Co-authored-by: David Monjoie &lt;dmo@odoo.com&gt;
Co-authored-by: Martin Geubelle &lt;mge@odoo.com&gt;
Co-authored-by: svs-odoo &lt;svs@odoo.com&gt;
Co-authored-by: Vincent Schippefilt &lt;vsc@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Part of task 1896658

Co-authored-by: Aaron Bohy &lt;aab@odoo.com&gt;
Co-authored-by: Christophe Matthieu &lt;chm@odoo.com&gt;
Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;
Co-authored-by: David Monjoie &lt;dmo@odoo.com&gt;
Co-authored-by: Martin Geubelle &lt;mge@odoo.com&gt;
Co-authored-by: svs-odoo &lt;svs@odoo.com&gt;
Co-authored-by: Vincent Schippefilt &lt;vsc@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: reply message from inbox</title>
<updated>2018-11-26T14:12:50+00:00</updated>
<author>
<name>Alexandre Kühn</name>
<email>aku@odoo.com</email>
</author>
<published>2018-11-26T11:54:32+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6f7a04be0bbe870a33e85e3ff96f583206c30463'/>
<id>6f7a04be0bbe870a33e85e3ff96f583206c30463</id>
<content type='text'>
Revision on https://github.com/odoo/odoo/commit/cd34f6de727d5b3858420cff3c9d3c5995c4e75c

Before the commit above, it was possible to reply to a message
from Inbox. Those messages were linked to a document, and replying
to any of them put a response in the related document.

This feature has been broken since the commit above: the reply
icon was only shown on messages linked to a channel, instead of
message linked to a document. Also, it was erroneously prompting
that the message was sent to the channel, even though it was not
the case.

This commit fixes the issue by toggling the visibility of the
reply icon, so that it is shown only for messages that come from
a document. Also, since posting a message requires a thread, this
commit added the possibility to post a message from a mailbox,
which instead posts the message to the related document thread.

Task-ID 1912647

closes odoo/odoo#29028</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Revision on https://github.com/odoo/odoo/commit/cd34f6de727d5b3858420cff3c9d3c5995c4e75c

Before the commit above, it was possible to reply to a message
from Inbox. Those messages were linked to a document, and replying
to any of them put a response in the related document.

This feature has been broken since the commit above: the reply
icon was only shown on messages linked to a channel, instead of
message linked to a document. Also, it was erroneously prompting
that the message was sent to the channel, even though it was not
the case.

This commit fixes the issue by toggling the visibility of the
reply icon, so that it is shown only for messages that come from
a document. Also, since posting a message requires a thread, this
commit added the possibility to post a message from a mailbox,
which instead posts the message to the related document thread.

Task-ID 1912647

closes odoo/odoo#29028</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: no crash on grouped inbox messages previews</title>
<updated>2018-11-14T20:29:29+00:00</updated>
<author>
<name>Alexandre Kühn</name>
<email>aku@odoo.com</email>
</author>
<published>2018-11-14T20:19:59+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=2b245ebb436a6880f05e25c65470bd48c3eea4a5'/>
<id>2b245ebb436a6880f05e25c65470bd48c3eea4a5</id>
<content type='text'>
Revision on https://github.com/odoo/odoo/commit/5f8d3c61bee40d027efc5041cdc4bca5e67c42d7

Before this commit, there was a traceback when you had two needaction
notifications related to the same document.

This is caused by a typo in the commit above: the object `similarItem`
has a property `messageIDs`, but the code wrongly access the property
`messagesIDs` (see the extra "s").

Steps to reproduce:

- Set notification management to 'Handle with Odoo' for Admin
- Demo mention Admin twice on a specific project task
- Admin opens messaging menu

Display error `Cannot read property 'concat' of undefined`

Issue reported on this PR comment: https://github.com/odoo/odoo/pull/28462#pullrequestreview-175001349

Task-ID 1909521

closes odoo/odoo#28703</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Revision on https://github.com/odoo/odoo/commit/5f8d3c61bee40d027efc5041cdc4bca5e67c42d7

Before this commit, there was a traceback when you had two needaction
notifications related to the same document.

This is caused by a typo in the commit above: the object `similarItem`
has a property `messageIDs`, but the code wrongly access the property
`messagesIDs` (see the extra "s").

Steps to reproduce:

- Set notification management to 'Handle with Odoo' for Admin
- Demo mention Admin twice on a specific project task
- Admin opens messaging menu

Display error `Cannot read property 'concat' of undefined`

Issue reported on this PR comment: https://github.com/odoo/odoo/pull/28462#pullrequestreview-175001349

Task-ID 1909521

closes odoo/odoo#28703</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: mark as read per preview</title>
<updated>2018-11-07T10:20:49+00:00</updated>
<author>
<name>Alexandre Kühn</name>
<email>aku@odoo.com</email>
</author>
<published>2018-11-07T10:20:48+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=8af392865deac628b1ff57627fa116131547bea1'/>
<id>8af392865deac628b1ff57627fa116131547bea1</id>
<content type='text'>
Before this commit, when there was several previews
on the messaging menu that were not linked to any
document, marking one of them as read had the unintended
behaviour to mark all of them as read.

Steps to reproduce:

- Admin with notification management as 'Handle with Odoo'
- Demo assign Admin to two different tasks
- Admin mark one preview as read
&gt; Both previews notifying assignment to a task have been
  marked as read

This is caused by the fact that messages of those previews
are not related to any document. As a result, when marking
one preview as read, it maps related messages to mark as
read, which was taking into account all messages that are
not related to any document.

With this commit, previews now tracks message IDs, so that
marking one preview as read only mark the related messages
as read.

Task-ID 1907159</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit, when there was several previews
on the messaging menu that were not linked to any
document, marking one of them as read had the unintended
behaviour to mark all of them as read.

Steps to reproduce:

- Admin with notification management as 'Handle with Odoo'
- Demo assign Admin to two different tasks
- Admin mark one preview as read
&gt; Both previews notifying assignment to a task have been
  marked as read

This is caused by the fact that messages of those previews
are not related to any document. As a result, when marking
one preview as read, it maps related messages to mark as
read, which was taking into account all messages that are
not related to any document.

With this commit, previews now tracks message IDs, so that
marking one preview as read only mark the related messages
as read.

Task-ID 1907159</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: filter messages in thread (Discuss)</title>
<updated>2018-09-12T13:02:22+00:00</updated>
<author>
<name>Alexandre Kühn</name>
<email>aku@odoo.com</email>
</author>
<published>2018-09-11T15:34:30+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=611b42409e426f64948499d92a95f5621e053dce'/>
<id>611b42409e426f64948499d92a95f5621e053dce</id>
<content type='text'>
Revision on https://github.com/odoo/odoo/commit/ec8c505bc1c9ec21939e9ffef53a9cc6f63f30c7

The commit above changes the way threads are rendered: the template
now uses a thread object, instead of a list of messages.

However, it was not handling messages that have been filtered from
the searchview. As a result, it was not possible to filter messages
at all.

This commit re-adds the possibility to filter messages, by providing
information on the domain of the thread in the template.

Task-ID 1877502
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Revision on https://github.com/odoo/odoo/commit/ec8c505bc1c9ec21939e9ffef53a9cc6f63f30c7

The commit above changes the way threads are rendered: the template
now uses a thread object, instead of a list of messages.

However, it was not handling messages that have been filtered from
the searchview. As a result, it was not possible to filter messages
at all.

This commit re-adds the possibility to filter messages, by providing
information on the domain of the thread in the template.

Task-ID 1877502
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] mail: clean some JS code</title>
<updated>2018-08-30T11:26:07+00:00</updated>
<author>
<name>Alexandre Kühn</name>
<email>aku@odoo.com</email>
</author>
<published>2018-08-29T11:56:53+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=be44efe852e96840ff6db139ea66952cbad74e1a'/>
<id>be44efe852e96840ff6db139ea66952cbad74e1a</id>
<content type='text'>
1. Removed `getLocalMessages` method in mailbox, and replaced
   with an override on `getMessages`.

   (This method was used before the distinction was made
   between `getMessages` and `fetchMessages`)

2. Removed unused method `_warnUpdatedUnreadCounter` in
   abstract thread window.

   (Leftover from an early POC)

3. Set the default value `''` for the status of a thread.

   (The method `getStatus` should always return a string)

4. Enforce default value `false` for detached status of channel.

   (The method `isDetached` should always return a boolean)

5. Improve readability of some tests.

   (removed useless variables and/or redundant code)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. Removed `getLocalMessages` method in mailbox, and replaced
   with an override on `getMessages`.

   (This method was used before the distinction was made
   between `getMessages` and `fetchMessages`)

2. Removed unused method `_warnUpdatedUnreadCounter` in
   abstract thread window.

   (Leftover from an early POC)

3. Set the default value `''` for the status of a thread.

   (The method `getStatus` should always return a string)

4. Enforce default value `false` for detached status of channel.

   (The method `isDetached` should always return a boolean)

5. Improve readability of some tests.

   (removed useless variables and/or redundant code)
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] doc building and warnings</title>
<updated>2018-08-27T10:55:21+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2018-08-27T10:55:21+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=0e307f8280eda4343a63c7faa2d52e33d46c9c0c'/>
<id>0e307f8280eda4343a63c7faa2d52e33d46c9c0c</id>
<content type='text'>
doc:

* fix incorrect doc comments (documenting params which don't exist)
* correctly quote non-refs
* fix role label syntax (backticks must be escaped)
* add newline to fix warning

JS doc parser:

* fix handling of already-resolved objects
* fix handling of non-string properties (e.g. foo[0] at module toplevel)
* don't blow up if subject of .include call can't be resolved (just ignore)

Others:

* add translator support for ``problematic`` node (apparently used for
  some refs by recent Sphinx)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
doc:

* fix incorrect doc comments (documenting params which don't exist)
* correctly quote non-refs
* fix role label syntax (backticks must be escaped)
* add newline to fix warning

JS doc parser:

* fix handling of already-resolved objects
* fix handling of non-string properties (e.g. foo[0] at module toplevel)
* don't blow up if subject of .include call can't be resolved (just ignore)

Others:

* add translator support for ``problematic`` node (apparently used for
  some refs by recent Sphinx)
</pre>
</div>
</content>
</entry>
</feed>
