Commit Graph
3580 Commits
Author SHA1 Message Date
FrancoisGe 62ebc97bd8 [IMP] web: Command Palette Config Debounce
This commit is intended to make command palette faster. To improve this,
we decided to make the debounce delay configurable by namespace.
We also decided to limit the number of Command displays to 100.

closes odoo/odoo#84227

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-02-17 12:51:43 +00:00
Alexandre Kühn 00e9c934cb [IMP] mail: adjust sound effect volume
Sounds were too loud and inconsistent.

closes odoo/odoo#82337

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-02-16 15:01:13 +00:00
Thanh Dodeur da9681696b [IMP] mail: add and update sound effects of rtc call interactions
task-2692600

Part-of: odoo/odoo#82337
2022-02-16 15:01:13 +00:00
Thanh Dodeur 73961202fe [FIX] mail: prevent empty popover in the rtc controller
Before this commit, the popover containing the options of the rtc
controller was rendered empty. This was because the `t-set` was used
instead of `t-set-slot`. This commit fixes this issue.

closes odoo/odoo#84595

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-02-15 11:24:04 +00:00
Samuel Degueldre 07bbe4e8dc [IMP] test_lint, *: activate no-duplicate-imports eslint rule
*: base_automation, hr, mail, web, web_tour, website_payment

Previously, some modules were imported twice, this increases duplication
and can make refactoring more difficult. This commit enables the
no-duplicate-imports eslint rule and fixes offending modules to remove
duplicates.

closes odoo/odoo#84530

Related: odoo/enterprise#24319
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-02-15 09:26:54 +00:00
Xavier BOL (xbo) 4099571e24 [REV] project,mail: disable click on avatar
This reverts commit 0e1961b1dd because the
`no_open_chat` option is removed, this commit becomes useless, that's
why the commit is revert.

task-2633229

Closes #82379
2022-02-14 13:22:54 +01:00
Fabien Pinckaers 10a5796d4b [IMP] speed up load_menus() by using SVG icons instead of png
Reduces load_menus answer size by 32% (between 20kb and 200kb savings
for the initial loading of the backend, depending on the number of apps
installed). Support for SVG icons in the web client for menus/apps.

Reduced PNG icons for apps list (8 bits PNG instead of 24 as our icons
don't need more colors as they are flat designs)

closes odoo/odoo#84280

Related: odoo/enterprise#24200
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-02-12 08:55:18 +00:00
Aaron Bohy 11cc762d7a [FIX] mail,project: remove chatter flickering
Before this commit, when a form view was re-rendered (e.g. when
switching to "edit" or "readonly" modes, when using the pager...),
the chatter briefly disappeared and then reappeared, which produced
a flickering. This has been introduced by the adaptation of the JS
codebase to owl 2 [1]: when the form view had to be re-rendered,
we reused the DOM element containing the chatter in the new
rendering (done in memory), which was thus detached from the DOM.
That element was re-inserted into the DOM later on, alongside the
rest of the newly rendered elements.

This commit fixes the issue by using a specific "hook" element when
rendering the form view, and replacing that hook by the actual
(unchanged) chatter container element when the rendering is done
and the DOM is patched.

This commit also removes unnecessary overrides in project:
- _renderNode was dead code, classname "oe_project_sharing_chatter"
 no longer exists in the codebase since [2]
- _makeChatterContainerTarget replicated what was originally
 already done in the mail FormRenderer (for appearently no valid
 reason), so obviously, that override wasn't synchronized with
 this fix.

[1] edd79ff560
[2] a28cc6333a

closes odoo/odoo#84429

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-11 18:19:57 +00:00
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