<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/mail/static/src/js/models, 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>[REM] im_support: remove im_support module</title>
<updated>2020-06-09T10:58:52+00:00</updated>
<author>
<name>Sébastien Theys</name>
<email>seb@odoo.com</email>
</author>
<published>2020-06-09T10:58:52+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=87f49b0616d67ea00e4e15db81459ed33310abec'/>
<id>87f49b0616d67ea00e4e15db81459ed33310abec</id>
<content type='text'>
The goal of the module was to communicate with livechat operators on our
production server, except the feature is disabled on our prod and we don't plan
to reactivate it any time soon.

closes odoo/odoo#52691

Related: odoo/upgrade#1313
Signed-off-by: Christophe Simonis &lt;chs@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The goal of the module was to communicate with livechat operators on our
production server, except the feature is disabled on our prod and we don't plan
to reactivate it any time soon.

closes odoo/odoo#52691

Related: odoo/upgrade#1313
Signed-off-by: Christophe Simonis &lt;chs@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] mail: display user avatar in chat-box header</title>
<updated>2020-05-20T10:55:05+00:00</updated>
<author>
<name>Hiral Bhavsar</name>
<email>hbh@odoo.com</email>
</author>
<published>2020-05-13T13:13:38+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9f3a12b9f0c3ecfbeb58212a04e264ddc4e6f602'/>
<id>9f3a12b9f0c3ecfbeb58212a04e264ddc4e6f602</id>
<content type='text'>
PURPOSE

We are currently working toward turning every user avatar (i.e. the round
picture of the user) in a shortcut to open the chatbox to that user. It only
makes sense to also have the user avatar in the header of the chatbox
(like in Facebook)

SPECIFICATION

Replace the current IM status colored dot of the chatbox header by the same
avatar/im_status compound currently used in the chatter.

LINKS

Closes https://github.com/odoo/odoo/pull/51258
Task-2256061

closes odoo/odoo#51258

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>
PURPOSE

We are currently working toward turning every user avatar (i.e. the round
picture of the user) in a shortcut to open the chatbox to that user. It only
makes sense to also have the user avatar in the header of the chatbox
(like in Facebook)

SPECIFICATION

Replace the current IM status colored dot of the chatbox header by the same
avatar/im_status compound currently used in the chatter.

LINKS

Closes https://github.com/odoo/odoo/pull/51258
Task-2256061

closes odoo/odoo#51258

Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] mail, sms, snailmail, test_mail_full: adapt mail.notification</title>
<updated>2020-04-17T12:17:57+00:00</updated>
<author>
<name>Sébastien Theys</name>
<email>seb@odoo.com</email>
</author>
<published>2020-04-17T09:53:05+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=dea52493b819939ae16391d8b19c2f404c7ec143'/>
<id>dea52493b819939ae16391d8b19c2f404c7ec143</id>
<content type='text'>
The purpose is to have more common code for failure and notifications, with less
override in `sms` and `snailmail`.

task-2176017

closes odoo/odoo#44170

Related: odoo/enterprise#9140
Related: odoo/upgrade#918
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>
The purpose is to have more common code for failure and notifications, with less
override in `sms` and `snailmail`.

task-2176017

closes odoo/odoo#44170

Related: odoo/enterprise#9140
Related: odoo/upgrade#918
Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: correctly parse datetime returned from server</title>
<updated>2020-03-19T09:38:07+00:00</updated>
<author>
<name>Pierre Paridans</name>
<email>app@odoo.com</email>
</author>
<published>2020-03-18T17:18:44+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=eb724d9add2c2752c7f9ded245aae7ba6bb2aca5'/>
<id>eb724d9add2c2752c7f9ded245aae7ba6bb2aca5</id>
<content type='text'>
When a user is Out-of-Office, the return date is displayed as "Invalid
date" on Safari (both iOS &amp; macOS).

The parsing of the date returned by the server was done using the Date
constructor and passing the string as-is. This constructor delegates the
parsing to the `Date.parse` method. But the DateTime format used to
stringify dates in Odoo doesn't fully follow the ISO 8601, as required
by `Date.parse()`:

expected format: "YYYY-MM-DDTHH:mm:ss.sssZ"
actual format: "YYYY-MM-DD HH:mm:ss"

Also, Safari applies more strictly to this requirement than Chrome &amp;
Firefox, resulting in a parsing error in the former browser.

This commit fixes it by using the utility function `str_to_datetime`
from `web.time` to correctly parse this date, independently of the
browser used.

NB: as this issue is browser dependent, no test has been added.

References:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse
https://tc39.es/ecma262/#sec-date-time-string-format

Task ID: 2198486

closes odoo/odoo#47987

X-original-commit: b85a44aea9617b9018dd80d5f8159354bbc88f09
Signed-off-by: Adrien Dieudonné (adr) &lt;adr@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a user is Out-of-Office, the return date is displayed as "Invalid
date" on Safari (both iOS &amp; macOS).

The parsing of the date returned by the server was done using the Date
constructor and passing the string as-is. This constructor delegates the
parsing to the `Date.parse` method. But the DateTime format used to
stringify dates in Odoo doesn't fully follow the ISO 8601, as required
by `Date.parse()`:

expected format: "YYYY-MM-DDTHH:mm:ss.sssZ"
actual format: "YYYY-MM-DD HH:mm:ss"

Also, Safari applies more strictly to this requirement than Chrome &amp;
Firefox, resulting in a parsing error in the former browser.

This commit fixes it by using the utility function `str_to_datetime`
from `web.time` to correctly parse this date, independently of the
browser used.

NB: as this issue is browser dependent, no test has been added.

References:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse
https://tc39.es/ecma262/#sec-date-time-string-format

Task ID: 2198486

closes odoo/odoo#47987

X-original-commit: b85a44aea9617b9018dd80d5f8159354bbc88f09
Signed-off-by: Adrien Dieudonné (adr) &lt;adr@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, hr_holidays: remove obsolete out of office</title>
<updated>2020-02-10T13:05:04+00:00</updated>
<author>
<name>Sébastien Theys</name>
<email>seb@odoo.com</email>
</author>
<published>2020-02-10T12:38:52+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=5018b01dc7e0e5f2c2198367f13ec41b1ed402c7'/>
<id>5018b01dc7e0e5f2c2198367f13ec41b1ed402c7</id>
<content type='text'>
The customizable "out of office" text was removed from the editable views as
part of task-2053585, but some places in the code were still using it, even
though it was never set anymore.

This commit removes the obsolete code.

Part of task-2171864

closes odoo/odoo#44968

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>
The customizable "out of office" text was removed from the editable views as
part of task-2053585, but some places in the code were still using it, even
though it was never set anymore.

This commit removes the obsolete code.

Part of task-2171864

closes odoo/odoo#44968

Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: abstract getAvatarSource has default</title>
<updated>2020-01-31T15:27:19+00:00</updated>
<author>
<name>jerome hanke (jhk)</name>
<email>jhk@odoo.com</email>
</author>
<published>2020-01-31T12:19:35+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=17f62f6441577be8c056686043893dd70ef04489'/>
<id>17f62f6441577be8c056686043893dd70ef04489</id>
<content type='text'>
Steps to reproduce:
- install sales
- create a new quotation

Previous behavior:
the avatar next to the author's name is empty in the mailthread

Current behavior:
avatar is displayed as expected

opw-2187231

closes odoo/odoo#44407

X-original-commit: 24ba9f9954a71eba46d44fe242cd2e6dba125da6
Signed-off-by: mightyjol &lt;jhk-odoo@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Steps to reproduce:
- install sales
- create a new quotation

Previous behavior:
the avatar next to the author's name is empty in the mailthread

Current behavior:
avatar is displayed as expected

opw-2187231

closes odoo/odoo#44407

X-original-commit: 24ba9f9954a71eba46d44fe242cd2e6dba125da6
Signed-off-by: mightyjol &lt;jhk-odoo@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: faster opening of messaging menu</title>
<updated>2020-01-08T14:08:14+00:00</updated>
<author>
<name>Alexandre Kühn</name>
<email>aku@odoo.com</email>
</author>
<published>2020-01-08T09:54:37+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e4850c1bb579c440e4c6716b170a3ad4c33531e3'/>
<id>e4850c1bb579c440e4c6716b170a3ad4c33531e3</id>
<content type='text'>
Before this commit, opening the messaging menu might be slow.

This was caused by the parsing of bodies of messages with lots of
HTML nodes. Indeed, the body of a message is linkified and inlined,
and both processes were quite slow due to their implementation: each
node in the HTML were recursively parsed and re-assigning
`innerHTML`. As a result, each node was triggering an HTML parse,
which is very slow on complex nodes.

This commit fixes this performance issue by speeding up inlining and
linkifying of html strings. In the case of linkify, it now triggers
an HTML parse only when necessary, while inlining now relies on its
textContent value.

These changes should drastically improve the speed of opening and
rendering messaging menu, almost ten times faster.

Task-Id 2076299

closes odoo/odoo#42949

X-original-commit: 8db0afb50ce0853a6a8ab7ee11dd5ed876abab64
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, opening the messaging menu might be slow.

This was caused by the parsing of bodies of messages with lots of
HTML nodes. Indeed, the body of a message is linkified and inlined,
and both processes were quite slow due to their implementation: each
node in the HTML were recursively parsed and re-assigning
`innerHTML`. As a result, each node was triggering an HTML parse,
which is very slow on complex nodes.

This commit fixes this performance issue by speeding up inlining and
linkifying of html strings. In the case of linkify, it now triggers
an HTML parse only when necessary, while inlining now relies on its
textContent value.

These changes should drastically improve the speed of opening and
rendering messaging menu, almost ten times faster.

Task-Id 2076299

closes odoo/odoo#42949

X-original-commit: 8db0afb50ce0853a6a8ab7ee11dd5ed876abab64
Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: Timer(s) tests nondeterministic behavior</title>
<updated>2019-12-12T13:22:20+00:00</updated>
<author>
<name>Vincent Schippefilt</name>
<email>vsc@odoo.com</email>
</author>
<published>2019-12-12T09:44:51+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6cbfdbce2d0f1b567b6a6d6f637fe2a476980acc'/>
<id>6cbfdbce2d0f1b567b6a6d6f637fe2a476980acc</id>
<content type='text'>
Timer test relies on setTimeout(..., 0) for its execution and its
verification. However it seems that in the browser there is *not always*
a guarantee that 2 setTimeout(...,0) will execute in a specific order.

Delaying the verification by 1 ms : setTimeout(..., 1) should force the
order of execution.

closes odoo/odoo#41732

Signed-off-by: VincentSchippefilt &lt;VincentSchippefilt@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Timer test relies on setTimeout(..., 0) for its execution and its
verification. However it seems that in the browser there is *not always*
a guarantee that 2 setTimeout(...,0) will execute in a specific order.

Delaying the verification by 1 ms : setTimeout(..., 1) should force the
order of execution.

closes odoo/odoo#41732

Signed-off-by: VincentSchippefilt &lt;VincentSchippefilt@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
