Commit Graph
3572 Commits
Author SHA1 Message Date
Sébastien Theys 2494c25ce7 [FIX] mail: don't crash on delete already deleted chatter
Since Owl 2 changes in compatibility layer, destroy hook is called from the
compatibility layer on a component already destroyed (from the documents mixin
in this case).

There is probably a fix to do in the compatibility layer, but the current PR is
an easy fix to avoid the crash on the documents app in the meantime.

task-2761082

closes odoo/odoo#84364

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-10 16:35:43 +00:00
Thanh Dodeur 6b88765dae [FIX] mail: prevents overflow in the discuss element
Before this commit* the flex parent of the discuss element
was no longer in the `column` direction, which caused an overflow in
some of its children elements, like the topBar and the composer.

This commit fixes this issue by setting the `flex-direction` of the
discuss parent to its former value.

* since https://github.com/odoo/odoo/commit/cbe1bc809538f690115e1632448258663e1f52e4

closes odoo/odoo#84290

X-original-commit: f902efa94baed8d0bf5aae6f4314891c5c2b57a1
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-10 11:41:59 +00:00
+2 edd79ff560 [REF] mail,*: adapt code to owl 2
*im_livechat,sms,snailmail

Owl 2 changelog: https://github.com/odoo/owl/blob/a9f29c4caad4f32d06be1ec4780572825781cd9b/CHANGELOG.md

Part-of: odoo/odoo#80156
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: luvi <luvi@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2022-02-10 07:46:13 +00:00
Anh Thao Pham (pta) e3dbb1b064 [FIX] mail: restore mention links after note edition
- Open any record with a chatter (i.e. a SO)
- Log a note with a mention to any res.partner
- Edit note and save
The mention is not a link anymore, but just plain text.

During edition the list of mentioned partners is not retrieved correctly,
preventing function that generates links from mentions to work properly.

On client-side, a variable named MentionedPartners is used to generate
mention links when posting a message.
It should contain the id and name (to match the mention text) of each
mentioned partners.
During edition, MentionedPartners is empty, leading to this issue.
As the list of mentioned partners is stored in message model in partner_ids
field, "id" and "name" of partner_ids will be retrieved and added to messages
data when requested by client side.
This will allowed to populate MentionedPartners with all required data.

Note that retrieving "name" from partner_ids will add an extra query,
as seen in the modified test.

opw-2739665

closes odoo/odoo#84152

X-original-commit: 510764730057b20a1706ae20d50549e280f7f9a7
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-09 16:22:32 +00:00
stefanorigano (SRI) 09f854a726 [REF] mail: rtc components, adapt to new navbar design
This commit is part of v16 overall restyle (task-2704984).

task-2712151

Part-of: odoo/odoo#82434
2022-02-09 13:47:20 +00:00
stefanorigano (SRI) ad64f56f6f [FIX] web, mail: systray 'disabled' state vs 'no-notification' design
Prior to this commit the 'disabled' state (eg. studio icon in a
not-editable view) and the 'no-notification' state (eg. messaging icon
without badge) shared the same design.

While the disabled state should be used for not-clickable elements only,
available systray items should always appear clickable, even
when there are no new notifications.

This commit moves the `o_disabled` class outside the burger_menu
component, making it generic and available for other components too.

Systray items without notification are now styled normally.
The simple presence of the badge communicates the user that a new
notification has been sent.

This commit is part of v16 overall restyle (task-2704984).

task-2712151

Part-of: odoo/odoo#82434
2022-02-09 13:47:20 +00:00
stefanorigano (SRI) 60fadfeaf6 [REF] web, mail, website: responsive navbar design
Prior to this commit the topbar responsiveness was exclusive to
enterprise.

This commit moves to community the mobile logic for navbar, burgermenu,
user_menu and company_switcher.

The design has been adapted to v16, reviewing font size/colors and
icons. This commit is part of v16 overall restyle (task-2704984).

task-2712151

Part-of: odoo/odoo#82434
2022-02-09 13:47:19 +00:00
stefanorigano (SRI) 4e53953756 [REF] web, mail: apply odoo icons
This commit is part of v16 overall restyle (task-2704984).

enterprise: https://github.com/odoo/enterprise/pull/23848
task-2745275

Part-of: odoo/odoo#83501
2022-02-08 12:05:55 +00:00
stefanorigano (SRI) 4a5dbf6a57 [FIX] web, *: float utility-classes
'pull-[left/right]' classes are discontinued since Bootstrap v3 [1].
The reason why we never noticed is that we were unknowingly
relying on fontAwesome utility classes that are basically the same.

Since v3 we were supposed to use 'float-[left/right]' classes [2], but
these classes will be renamed again in v5 with 'float-[start/end]'[3].

This commit introduces "v5 ready" utility-classes and replaces v2 legacy
occurrences across the UI.
These classes definitions can be safely removed when v5 migration will
be completed.

Notes:
- this commit will *not* adapt frontend occurrences since its CSS
  already relies on a "migration table" [4]. 
- this commit will *not* adapt the few v3 'float-[left/right]'
  occurrences since are supposed to be handled in the v5 migration
  task (task-2704984).

This commit is part of v16 overall restyle (task-2704984).

enterprise: https://github.com/odoo/enterprise/pull/23848
task-2745275

[1] https://getbootstrap.com/docs/4.3/migration/#utilities
[2] https://getbootstrap.com/docs/4.3/utilities/float/#classes
[3] https://getbootstrap.com/docs/5.1/utilities/float/#overview
[4] https://github.com/odoo/odoo/blob/15.0/addons/website/static/src/scss/compatibility/bs3_for_12_0.scss#L49

Part-of: odoo/odoo#83501
2022-02-08 12:05:53 +00:00
Sébastien Theys cff09308cd [IMP] mail: rename composer view "hasFocus" to "isFocused"
Consistency in naming with other models.

Part of task-2694206, split from main PR to ease its diff

closes odoo/odoo#84130

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-07 19:04:03 +00:00
Sébastien Theys 2d5a144898 [IMP] mail: rename newItem/itemNew to addingItem
Consistency in naming. Remove CSS as a bonus.

Part of task-2694206, split from main PR to ease its diff

closes odoo/odoo#84127

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-07 19:03:56 +00:00
Sébastien Theys 96e355bcca [FIX] mail: prevent crash when destroying during attachment upload
File uploader might be deleted because it is linked to views, but the process of
upload should still happen for the related thread.

closes odoo/odoo#84085

X-original-commit: ddfcee8f35da4bcf16f258d1bdfd0cf08436d001
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-07 15:25:03 +00:00
std-odoo 36857cdf87 [IMP] mail: use Yes/No instead of True/False in the tracking messages
Purpose
=======
When the value of a tracked boolean field change, we can see in the
chatter "True -> False". It doesn't have that much sens for
non-technical people, and instead we want to use "Yes -> No".

Task-2648390

Part-of: odoo/odoo#79911
2022-02-04 09:28:11 +00:00
tsm-odoo dc7d71823d [IMP] mail: add browser key to messaging
closes odoo/odoo#83854

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-03 17:59:46 +00:00
Didier (did) 496c0f0d47 [IMP] mail: cleanup naming in attachmentList model
closes odoo/odoo#83557

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-03 17:59:42 +00:00
stefanorigano (SRI) 8c0d28c3db [FIX] mail: o_Activity, inline avatars alignment
Part of the overall v16 SCSS optimization/restyle (task-2704984).

task-2731819

closes odoo/odoo#82590

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-03 17:08:00 +00:00
stefanorigano (SRI) da5d9e745f [REF] mail: o_Activity, revamp scss
Review and simplify activities SCSS.
Part of the overall v16 SCSS optimization/restyle (task-2704984).

task-2731819

Part-of: odoo/odoo#82590
2022-02-03 17:07:59 +00:00
Louis Wicket (wil) 51a07724d9 [IMP] mail: add test for file upload activity type
Some recent changes have evidenced that the modification of the activity
type of an 'upload_file' activity was not properly covered by the tests.

This commit adds a new test for this specific case.

Part of task-2730667

closes odoo/odoo#82498

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-03 16:14:43 +00:00
Julien Giannone c4bbe13fdf [FIX] mail: click on link in a message preview while replying
When clicking on a mention (or a link) within the preview of the
message we're replying to, there was a traceback because we tried
to update a component which has already been deleted.

closes odoo/odoo#83912

Task-id: 2747321
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-03 15:22:14 +00:00
Sébastien Theys 7d905c232b [IMP] mail: pass classname as props in components (follow up)
Part of task-2694196

closes odoo/odoo#83904

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-03 15:21:55 +00:00
Sébastien Theys 092864b5dd [IMP] mail: use useComponent instead of Component.current
Part of task-2694208

closes odoo/odoo#83898

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-03 14:22:58 +00:00
Alexandre Kühn 0df4b0029b [IMP] mail, snailmail: convert legacy dialog with t-ref to model
In preparation to using Owl 2 in discuss code.

task-2738648

closes odoo/odoo#83598

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-02 19:50:45 +00:00
stefanorigano (SRI) f17b3aaaec [FIX] mail: AttachmentImage, remove unused div
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2731819

closes odoo/odoo#83108

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-01 12:45:06 +00:00
stefanorigano (SRI) 8b1cdef47e [FIX] mail: AttachmentImage, remove unused class
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2731819

Part-of: odoo/odoo#83108
2022-02-01 12:45:05 +00:00
stefanorigano (SRI) cf42d54653 [REF] mail: AttachmentImage, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2731819

Part-of: odoo/odoo#83108
2022-02-01 12:45:05 +00:00
stefanorigano (SRI) e9d284bbdd [FIX] mail: AttachmentImage, remove unused css class
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2731819

Part-of: odoo/odoo#83108
2022-02-01 12:45:04 +00:00
stefanorigano (SRI) 20a71db401 [REF] mail: ActivityMarkDonePopover review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2731819

closes odoo/odoo#83041

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-01 12:44:55 +00:00
Didier (did) 6f76d9c5fb [IMP] mail: move isLastScrollProgramatic to model messageListView
closes odoo/odoo#83650

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-31 17:47:46 +00:00
Didier (did) 45b6c0b1d0 [IMP] mail: remove unused variable
closes odoo/odoo#83652

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-31 11:04:50 +00:00
Ricardo Gomes Rodrigues (rigr) 993acf8761 [FIX] mail: ensures that rtc cards have the right aspect ratio
Before this commit, the call participant cards in the sidebar of the
call viewer didn't respect the 16:9 aspect ratio on some browsers like
chrome. This commit fixes the issue.

task-2738622

closes odoo/odoo#83406

X-original-commit: 1f9ea3a1ef3832ed339337063f321c1bc2eacaf3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-01-28 18:08:07 +00:00
Alexandre Kühn cbe1bc8095 [IMP] mail, website_livechat: introduce Discuss View
Task-2694206

closes odoo/odoo#83246

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-28 16:09:26 +00:00
Alexandre Kühn 48700416c1 [IMP] mail: clean dialog modelling of discuss
Properly define relational fields as owner/owning/content.
For instance, with viewing attachment in a dialog, the modelling
looked roughly like this before the commit:

```
attachment_viewer -----> dialog
```
- where attachment viewer owns dialog

This commit changes it to:

```
attachment (image/card) ------> dialog -------> attachment_viewer
```
- where attachment (image/card) owns the dialog, and dialog has
  attachment viewer as content

These changes should make modelling of dialog feels more natural.

Task-2738648

closes odoo/odoo#83519

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-28 14:10:07 +00:00
Didier (did) 55d5fbc73e [IMP] mail: compute the messageViewList scroll position inside the model
task-2579306

closes odoo/odoo#83042

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-28 13:13:38 +00:00
Alexandre Kühn f2fc9a6fd3 [IMP] mail: load mail failures in another RPC
Task-2746116

closes odoo/odoo#83523

X-original-commit: 8e9cbf94f3e5e928f66dca78c278d555162278e6
Related: odoo/enterprise#23799
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-27 18:03:43 +00:00
Alexandre Kühn 51c0dff6d5 [IMP] mail: rename discuss legacy dialog component in code
Code part of renaming discuss legacy dialog.
In preparation to using dialog modelling.

Task-2738648

Part-of: odoo/odoo#83522
2022-01-27 18:03:36 +00:00
Alexandre Kühn d35946e845 [IMP] mail: rename discuss legacy dialog component files
File part of renaming discuss legacy dialog.
In preparation to using dialog modelling.

Task-2738648

Part-of: odoo/odoo#83522
2022-01-27 18:03:35 +00:00
Didier (did) e0560d3266 [IMP] mail: AttachmentBoxView should own the attachmentList
Before this PR, AttachmentBoxView required a Chatter to have an
AttachmentList. This model is wrong since the attachmentBoxView can direcly own
the AttachmentList.

task-2740183

closes odoo/odoo#83337

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-27 16:17:06 +00:00
stefanorigano (SRI) 3c8576e221 [REF] mail: o_ActivityBox review and simplify scss
Simplify SCSS and use direction-relative margins to handle RTL layouts.
Part of the overall v16 SCSS optimization/restyle (task-2704984).

task-2731819

closes odoo/odoo#83036

Related: odoo/enterprise#23605
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-27 11:07:21 +00:00
stefanorigano (SRI) 8bf5c66616 [REF] mail: AttachmentList, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2731819

closes odoo/odoo#83092

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-26 13:10:56 +00:00
Aaron Bohy ca28cff17d [FIX] web,mail: fix wrong assertions in tests
This is not a big deal, but by passing a widget instance or a DOM
node as message to a QUnit.assert function, QUnit keeps a reference
to that instance or DOM element, and it can never be garbage
collected (nor its bound handlers in the case of a DOM element).

For the mail case, this was a bit more critical as we didn't check
what the author of the test actually wanted to check.

closes odoo/odoo#83384

X-original-commit: 692fd6ecee602f7ceaae093b855aff65d50ca797
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-26 08:49:09 +00:00
Sébastien Theys e0913197ac [IMP] mail: batch and avoid duplicate chatter data rpc
task-2742754

closes odoo/odoo#83189

Related: odoo/enterprise#23666
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-01-25 20:39:19 +00:00
Alexandre Kühn 0b7ff0bafe [FIX] mail: no infinite loop with useXToModel hooks
Before this commit, implementation of `useXToModel` performed
essentially 2 updates in succession, even when ref or component
hasn't changed.

This is a problem, especially when 2 components in hierarchy make
use of `useXToComponents`, as this could lead to infinite loops.

closes odoo/odoo#83344

X-original-commit: 95cb2648484f8529947e2bed14d86a20e6ad37b6
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-01-25 15:41:21 +00:00
FrancoisGe 6daa9188cb [IMP] web: highlight searchValue in CommandItem
With this commit, when you perform a search in the command palette,
the part of the commandItem's name that matches the searchValue will
be highlighted.

closes odoo/odoo#82407

Task-id: 2741837
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-21 09:40:50 +00:00
stefanorigano (SRI) 7638bada9c [REF] mail: AttachmentBox, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2731819

closes odoo/odoo#83117

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-20 19:25:51 +00:00
stefanorigano (SRI) 505f03a0b7 [FIX] mail: o_AttachmentBox, remove unused css class
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2731819

Part-of: odoo/odoo#83117
2022-01-20 19:25:50 +00:00
Sébastien Theys 611046040b [IMP] mail, *: avoid repetition in inverse relation type (js)
* = hr, im_livechat, website_livechat

task-2741386

closes odoo/odoo#83059

Related: odoo/enterprise#23616
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-01-20 13:29:04 +00:00
Julien Mougenot db63ff2259 [REF] web: Owl imports adaptation
In the next version of Owl, all exported terms are directly available
from the top level `owl` object. This commit aims to adapt existing
imports to this new system. This is done by importing any Owl property
used in files at the top, right after the `import` or `require`
statements.

closes odoo/odoo#82736

Related: odoo/enterprise#23609
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-01-20 11:03:01 +00:00
stefanorigano (SRI) a2dcdf35cb [FIX] mail, web: activities, 'dl-horizontal' class is now discontinued
Prior to this commit the 'o_Activity_details' element was using a
discontinued bootstrap class, causing the layout to brake.

task#2731819.

closes odoo/odoo#82893

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-18 16:17:39 +00:00
Alexandre Kühn 416ea42516 [IMP] mail: remove unused t-ref
closes odoo/odoo#82965

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-18 11:57:04 +00:00
Alexandre Kühn 0970b1fad6 [IMP] mail: remove comp t-ref on components ChatWindow/MessageList
In preparation to use OWL 2 in discuss code.

Task-2694206

closes odoo/odoo#82031

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-14 13:05:55 +00:00