<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/mail/static/src/js/models/threads/dm_chat.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: 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>[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>[IMP] *: remove image_64 and clean views</title>
<updated>2019-09-19T10:23:39+00:00</updated>
<author>
<name>Sébastien Theys</name>
<email>seb@odoo.com</email>
</author>
<published>2019-09-19T10:23:39+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=b6288e54461426d7aac6cfc549cee3e90309a093'/>
<id>b6288e54461426d7aac6cfc549cee3e90309a093</id>
<content type='text'>
There are too many image sizes. Since they are stored resized this takes time to
generate when saving a new image, it's more rows on the attachment table, more
files on the disk, ...

64px is close enough to 128px that it can be removed without a big impact on
download size.

It will even reduce download and number of requests when both images are
displayed because now only one has to be downloaded and then benefit from cache.

The difference between the two is typically around 1.5kB which is negligible
these days, especially when the request overhead is around 0.5kB already, not
even taking into account other factors such as latency.

If a 64px image must absolutely be returned, it is still possible to pass the
size parameters to the image route. But the current guideline is to handle
resizing in the views when necessary.

Views
=====

- remove width and height attributes when existing CSS rules are overriding them
  (eg. `.oe_kanban_avatar` in the right context)
- add CSS rules instead of width and height attributes when possible
- use `object-fit: cover;` where width and height are forced to avoid distortion
  of non-square images
- for products, use `object-fit: contain;` instead, keep ratio but without crop
- add new CSS rules where the expected size was max 64px*64px before due to the
  image size itself
- remove `img-fluid` where using size classes to avoid conflicting rules

task-2060865

closes odoo/odoo#36147

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>
There are too many image sizes. Since they are stored resized this takes time to
generate when saving a new image, it's more rows on the attachment table, more
files on the disk, ...

64px is close enough to 128px that it can be removed without a big impact on
download size.

It will even reduce download and number of requests when both images are
displayed because now only one has to be downloaded and then benefit from cache.

The difference between the two is typically around 1.5kB which is negligible
these days, especially when the request overhead is around 0.5kB already, not
even taking into account other factors such as latency.

If a 64px image must absolutely be returned, it is still possible to pass the
size parameters to the image route. But the current guideline is to handle
resizing in the views when necessary.

Views
=====

- remove width and height attributes when existing CSS rules are overriding them
  (eg. `.oe_kanban_avatar` in the right context)
- add CSS rules instead of width and height attributes when possible
- use `object-fit: cover;` where width and height are forced to avoid distortion
  of non-square images
- for products, use `object-fit: contain;` instead, keep ratio but without crop
- add new CSS rules where the expected size was max 64px*64px before due to the
  image size itself
- remove `img-fluid` where using size classes to avoid conflicting rules

task-2060865

closes odoo/odoo#36147

Signed-off-by: Sébastien Theys (seb) &lt;seb@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] *: rename image fields</title>
<updated>2019-08-02T16:47:58+00:00</updated>
<author>
<name>Sébastien Theys</name>
<email>seb@odoo.com</email>
</author>
<published>2019-08-01T11:20:33+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=58a2ffa26f1a3b0f9630ce16d11b758d18e20a21'/>
<id>58a2ffa26f1a3b0f9630ce16d11b758d18e20a21</id>
<content type='text'>
image_original =&gt; image_1920 (now resized to 1920)
image_big =&gt; image_1024
image_large =&gt; image_256
image_medium =&gt; image_128
image_small  =&gt; image_64
image replaced by image_1920 (when writing) or by image_1024 (when displaying
	what was previously the big size)

+ add new intermediate format:
image_512

PR: #34925</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
image_original =&gt; image_1920 (now resized to 1920)
image_big =&gt; image_1024
image_large =&gt; image_256
image_medium =&gt; image_128
image_small  =&gt; image_64
image replaced by image_1920 (when writing) or by image_1024 (when displaying
	what was previously the big size)

+ add new intermediate format:
image_512

PR: #34925</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: auto-update out-of-office info on im_status change</title>
<updated>2019-07-16T14:36:44+00:00</updated>
<author>
<name>Alexandre Kühn</name>
<email>aku@odoo.com</email>
</author>
<published>2019-06-13T13:53:01+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=bdf45dca506f9938bfcd3a7acc8757a16d701d05'/>
<id>bdf45dca506f9938bfcd3a7acc8757a16d701d05</id>
<content type='text'>
Before this commit, chat window's out-of-office info did not change
when direct partner's `im_status` is/was on 'leave'.

Users had to reload page to see updated out-of-office info.

Task-ID 2007663</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit, chat window's out-of-office info did not change
when direct partner's `im_status` is/was on 'leave'.

Users had to reload page to see updated out-of-office info.

Task-ID 2007663</pre>
</div>
</content>
</entry>
<entry>
<title>[MERGE] forward port branch saas-12.1 up to 0f4abc5c228</title>
<updated>2019-02-22T15:25:02+00:00</updated>
<author>
<name>Christophe Simonis</name>
<email>chs@odoo.com</email>
</author>
<published>2019-02-22T15:25:02+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=0e7675847f05a63cf013210dabac82c94845217f'/>
<id>0e7675847f05a63cf013210dabac82c94845217f</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: enable seen feature only on direct chats</title>
<updated>2019-02-14T12:55:24+00:00</updated>
<author>
<name>Alexandre Kühn</name>
<email>aku@odoo.com</email>
</author>
<published>2019-02-13T14:15:42+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=62294921b81325131f6c1d4c6cf757c7da457ebc'/>
<id>62294921b81325131f6c1d4c6cf757c7da457ebc</id>
<content type='text'>
Revision on https://github.com/odoo/odoo/commit/844fb2b51ea7cfa557b19466c0a53dde19433e7a

There were performance issue with the seen feature in multi-
user channnels, therefore it has been disabled for them.
As a result, only direct chats have this feature.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Revision on https://github.com/odoo/odoo/commit/844fb2b51ea7cfa557b19466c0a53dde19433e7a

There were performance issue with the seen feature in multi-
user channnels, therefore it has been disabled for them.
As a result, only direct chats have this feature.</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] mail, hr_holidays: use leaves to compute im_status</title>
<updated>2019-02-07T12:53:03+00:00</updated>
<author>
<name>XavierDo</name>
<email>xdo@odoo.com</email>
</author>
<published>2019-01-07T10:56:19+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=086405344e7302d9f7b243ba0c30d55131aeb3fe'/>
<id>086405344e7302d9f7b243ba0c30d55131aeb3fe</id>
<content type='text'>
When on leave, the im_status can be either leave_online or leave_offline.
This will allow to display a specific icon and a default message when the user
is not at the office.
The leave can have an out of office message. This message will be displayed
in the chat window instead of the user ooo message, and the end date of the leave will be displayed too.

Technical details.
Right now the im_status access leaves directly to know if a user is on leave or not.
An index has been added to optimise this request (thanks to rco).
A solution to optimise this would be to compute part of the information in a cron.

Task: 1856205</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When on leave, the im_status can be either leave_online or leave_offline.
This will allow to display a specific icon and a default message when the user
is not at the office.
The leave can have an out of office message. This message will be displayed
in the chat window instead of the user ooo message, and the end date of the leave will be displayed too.

Technical details.
Right now the im_status access leaves directly to know if a user is on leave or not.
An index has been added to optimise this request (thanks to rco).
A solution to optimise this would be to compute part of the information in a cron.

Task: 1856205</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] mail: add ooo status in chats windows.</title>
<updated>2019-02-07T08:54:33+00:00</updated>
<author>
<name>XavierDo</name>
<email>xdo@odoo.com</email>
</author>
<published>2019-01-07T12:31:18+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c21d200285ebeb646b8e5be6ba233f96d9714c6f'/>
<id>c21d200285ebeb646b8e5be6ba233f96d9714c6f</id>
<content type='text'>
In a chat window with a single usert (dm_chat) the ooo status of the
other user is displayed on the top when set.

Task: 1856205</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a chat window with a single usert (dm_chat) the ooo status of the
other user is displayed on the top when set.

Task: 1856205</pre>
</div>
</content>
</entry>
</feed>
