<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/mail/static/src/utils, 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] mail; hr: restore faster and more accurate mention suggestions</title>
<updated>2021-03-10T16:48:19+00:00</updated>
<author>
<name>Xavier Dubuc</name>
<email>xdu@odoo.com</email>
</author>
<published>2021-03-10T16:45:49+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=fbdec5fe29827b88ec0d1421f68716e1febefd89'/>
<id>fbdec5fe29827b88ec0d1421f68716e1febefd89</id>
<content type='text'>
The code from v13 used to look for partners in JS before making the RPC, which
was much faster, and also gave better results by returning partners that were
already known and therefore more likely to be selected.

The same logic is reintroduced here, and further improved to take into account
all known partners and sort them according to the likeliness they will be
selected based on various criteria.

task-2413776

closes odoo/odoo#64161

Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
Co-authored-by: Sébastien Theys &lt;seb@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The code from v13 used to look for partners in JS before making the RPC, which
was much faster, and also gave better results by returning partners that were
already known and therefore more likely to be selected.

The same logic is reintroduced here, and further improved to take into account
all known partners and sort them according to the likeliness they will be
selected based on various criteria.

task-2413776

closes odoo/odoo#64161

Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
Co-authored-by: Sébastien Theys &lt;seb@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail, im_livechat: avoid artificially delaying messaging</title>
<updated>2020-10-27T13:16:28+00:00</updated>
<author>
<name>Sébastien Theys</name>
<email>seb@odoo.com</email>
</author>
<published>2020-10-27T13:16:28+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e78805fc3ae9b5dbbf72667e5bd62e5c5346cc53'/>
<id>e78805fc3ae9b5dbbf72667e5bd62e5c5346cc53</id>
<content type='text'>
Don't delay the insert of partners or channels until it actually takes too much
time.

Don't await `_initMentionPartnerSuggestions` as it is just nice to have.

task-2371485

closes odoo/odoo#60826

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>
Don't delay the insert of partners or channels until it actually takes too much
time.

Don't await `_initMentionPartnerSuggestions` as it is just nice to have.

task-2371485

closes odoo/odoo#60826

Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: allow tests to await specific events</title>
<updated>2020-09-07T12:28:36+00:00</updated>
<author>
<name>Sébastien Theys</name>
<email>seb@odoo.com</email>
</author>
<published>2020-09-07T11:06:36+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=0e13ad22267e928a50fdc7d4f045f03b49385aa9'/>
<id>0e13ad22267e928a50fdc7d4f045f03b49385aa9</id>
<content type='text'>
task-2333915

closes odoo/odoo#57185

X-original-commit: 699106ce65a87f7a24f04e1d8f232b5a6b4e210a
Related: odoo/enterprise#13013
Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
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>
task-2333915

closes odoo/odoo#57185

X-original-commit: 699106ce65a87f7a24f04e1d8f232b5a6b4e210a
Related: odoo/enterprise#13013
Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
Signed-off-by: Sébastien Theys (seb) &lt;seb@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: 'Cannot read messagingMenu of undefined' traceback</title>
<updated>2020-08-27T15:26:33+00:00</updated>
<author>
<name>Alexandre Kühn</name>
<email>aku@odoo.com</email>
</author>
<published>2020-08-19T10:09:31+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=022fd7e1348b7f81eeaf1b122a063f2413369571'/>
<id>022fd7e1348b7f81eeaf1b122a063f2413369571</id>
<content type='text'>
Before this commit, on page reload, sometimes web client crashed with
`Cannot read 'messagingMenu' of undefined`.

This happens due to messaging components making use of `messaging` in
`env` as if it was always set. In some rare cases, this is false,
hence the crash. This happens on root components of messaging such as
the messaging menu.

Creation of `env.messaging` has to be async, in other to ensure all
JS module that patches messaging are applied. The mounting of
messaging root components depends on other parts of the web client
like the SystrayMenu. So the proper fix is to guard `env.messaging`
on these root components.

Task-2238245

closes odoo/odoo#56682

X-original-commit: d1483ff3c83bb3146e80e5d65a27915c5b2a2bf9
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, on page reload, sometimes web client crashed with
`Cannot read 'messagingMenu' of undefined`.

This happens due to messaging components making use of `messaging` in
`env` as if it was always set. In some rare cases, this is false,
hence the crash. This happens on root components of messaging such as
the messaging menu.

Creation of `env.messaging` has to be async, in other to ensure all
JS module that patches messaging are applied. The mounting of
messaging root components depends on other parts of the web client
like the SystrayMenu. So the proper fix is to guard `env.messaging`
on these root components.

Task-2238245

closes odoo/odoo#56682

X-original-commit: d1483ff3c83bb3146e80e5d65a27915c5b2a2bf9
Signed-off-by: Sébastien Theys (seb) &lt;seb@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail, im_livechat: make livechat work properly</title>
<updated>2020-08-24T13:21:45+00:00</updated>
<author>
<name>Sébastien Theys</name>
<email>seb@odoo.com</email>
</author>
<published>2020-08-24T10:37:47+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=72b9335334c076d8deaa36e404feaa3f4d30c351'/>
<id>72b9335334c076d8deaa36e404feaa3f4d30c351</id>
<content type='text'>
- fix traceback on receiving first livechat message due to bad computation of
  correspondent
- fix missing [0] in return of country name_get in channel_info
- fix visitor/correspondent computation to work when chatting with oneself
- reintroduce livechat ordered by last message in discuss sidebar
- improve mock server to make these fixes possible to test
- introduce corresponding tests

PR: #56243
task-2323670

closes odoo/odoo#56414

X-original-commit: f623bfd2c8819604c709bc723153c071dca6e3cc
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>
- fix traceback on receiving first livechat message due to bad computation of
  correspondent
- fix missing [0] in return of country name_get in channel_info
- fix visitor/correspondent computation to work when chatting with oneself
- reintroduce livechat ordered by last message in discuss sidebar
- improve mock server to make these fixes possible to test
- introduce corresponding tests

PR: #56243
task-2323670

closes odoo/odoo#56414

X-original-commit: f623bfd2c8819604c709bc723153c071dca6e3cc
Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: prevent composer to send message if pending uploads</title>
<updated>2020-08-21T12:57:44+00:00</updated>
<author>
<name>Xavier Dubuc</name>
<email>xdu@odoo.com</email>
</author>
<published>2020-08-18T12:24:10+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=0263acee7f355e7367686a461c21f28ea34cfa9a'/>
<id>0263acee7f355e7367686a461c21f28ea34cfa9a</id>
<content type='text'>
task-2317862

closes odoo/odoo#56303

X-original-commit: 3b5cd048f1dfa18869e95b173b4232b4bb189025
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-2317862

closes odoo/odoo#56303

X-original-commit: 3b5cd048f1dfa18869e95b173b4232b4bb189025
Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web, *: improve mock server and replace most mail mockRPC</title>
<updated>2020-08-13T16:26:35+00:00</updated>
<author>
<name>Sébastien Theys</name>
<email>seb@odoo.com</email>
</author>
<published>2020-08-13T16:26:35+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c2918c139b8f1026b57a257fbb74570d7a224c98'/>
<id>c2918c139b8f1026b57a257fbb74570d7a224c98</id>
<content type='text'>
Improve mock server:

- add support for mocked `fetch`
- add support for `active_test`
- add support for x2m `in` in domains
- add support for default values computed from a function
- implement a more natural "next id" compute
- allow initial data without ids
- ensure write and x2m commands integrity
- improve bad data/bad commands error messages
- always warn for failing RPC, not only in debug mode
- fix all existing tests that had inconsistency data

Other changes done in mail (or dependents) that are not just related to tests:

- remove `direct_partner` from formatter result
  -&gt;`correspondent` can be computed from other keys, especially `members`

- fix `livechat_visitor` convertData
  -&gt; only process if there is value

- add `current_partner` and `current_user_id` as `init_messaging` result
  -&gt; easier to mock than session

- remove usage of `need_moderation`
  -&gt; that was just a search indirection to `moderation_status`

- adapt `partner_id` -&gt; `res_partner_id` key in `_notification_format`
  -&gt; to be consistent with field name

- add name in result of `mail_partner_format`
  -&gt; sometimes display_name is not the same

- remove usage of `is_moderator`
  -&gt; that was just an indirection to `moderation_channel_ids`

Enterprise counterpart: https://github.com/odoo/enterprise/pull/11523
task-2287171

closes odoo/odoo#55854

X-original-commit: 7ba3fecb3377a720d1eb70e7515a0c45da73836d
Related: odoo/enterprise#12391
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>
Improve mock server:

- add support for mocked `fetch`
- add support for `active_test`
- add support for x2m `in` in domains
- add support for default values computed from a function
- implement a more natural "next id" compute
- allow initial data without ids
- ensure write and x2m commands integrity
- improve bad data/bad commands error messages
- always warn for failing RPC, not only in debug mode
- fix all existing tests that had inconsistency data

Other changes done in mail (or dependents) that are not just related to tests:

- remove `direct_partner` from formatter result
  -&gt;`correspondent` can be computed from other keys, especially `members`

- fix `livechat_visitor` convertData
  -&gt; only process if there is value

- add `current_partner` and `current_user_id` as `init_messaging` result
  -&gt; easier to mock than session

- remove usage of `need_moderation`
  -&gt; that was just a search indirection to `moderation_status`

- adapt `partner_id` -&gt; `res_partner_id` key in `_notification_format`
  -&gt; to be consistent with field name

- add name in result of `mail_partner_format`
  -&gt; sometimes display_name is not the same

- remove usage of `is_moderator`
  -&gt; that was just an indirection to `moderation_channel_ids`

Enterprise counterpart: https://github.com/odoo/enterprise/pull/11523
task-2287171

closes odoo/odoo#55854

X-original-commit: 7ba3fecb3377a720d1eb70e7515a0c45da73836d
Related: odoo/enterprise#12391
Signed-off-by: Sébastien Theys (seb) &lt;seb@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: fix full composer opening with attachments</title>
<updated>2020-08-13T10:23:25+00:00</updated>
<author>
<name>Xavier Dubuc</name>
<email>xdu@odoo.com</email>
</author>
<published>2020-08-04T14:38:02+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a17725e99899ff1e06996f7c9ab93704c840131e'/>
<id>a17725e99899ff1e06996f7c9ab93704c840131e</id>
<content type='text'>
task-2307201

closes odoo/odoo#55678

X-original-commit: 9c47bb0b0034a3419a0c6e3267d90cb520a59535
Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
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>
task-2307201

closes odoo/odoo#55678

X-original-commit: 9c47bb0b0034a3419a0c6e3267d90cb520a59535
Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
Signed-off-by: Sébastien Theys (seb) &lt;seb@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: clean up JS relations by storing records</title>
<updated>2020-08-05T15:09:34+00:00</updated>
<author>
<name>Sébastien Theys</name>
<email>seb@odoo.com</email>
</author>
<published>2020-08-05T14:03:05+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9216bdcb6f0bbb20900a33bbf7283e6e4fda1b2c'/>
<id>9216bdcb6f0bbb20900a33bbf7283e6e4fda1b2c</id>
<content type='text'>
Remove the support and the conversion from record to localId and back from
localId to record.

Part of task-2308312

closes odoo/odoo#55481

X-original-commit: fc5e8be4e65518770a281f0dffae07854d20073a
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>
Remove the support and the conversion from record to localId and back from
localId to record.

Part of task-2308312

closes odoo/odoo#55481

X-original-commit: fc5e8be4e65518770a281f0dffae07854d20073a
Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: process result of init messaging asynchronously</title>
<updated>2020-08-06T13:27:38+00:00</updated>
<author>
<name>Sébastien Theys</name>
<email>seb@odoo.com</email>
</author>
<published>2020-08-06T09:28:57+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=bab20931099beda872aa17e5bb0ddd18cffd83ed'/>
<id>bab20931099beda872aa17e5bb0ddd18cffd83ed</id>
<content type='text'>
Part of task-2308312

closes odoo/odoo#55562

X-original-commit: bdc2a9f516562c854837248e7d0898e5cfc8dec1
Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
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>
Part of task-2308312

closes odoo/odoo#55562

X-original-commit: bdc2a9f516562c854837248e7d0898e5cfc8dec1
Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
Signed-off-by: Sébastien Theys (seb) &lt;seb@odoo.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
