Commit Graph
3623 Commits
Author SHA1 Message Date
Alexandre Kühn 1520a98d69 [IMP] mail: turn 'ChatWindow/shiftNextText' into field
Task-2793280

closes odoo/odoo#86374

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-15 13:22:03 +01:00
Lucas Lefèvre c5b28f5163 [REF] mail: turn 'Composer/placeholder' into field
This commit moves the logic associated with the composer placeholder for two
reasons:

- move business logic from components to models
- allow to easily override the placeholder in other module.
  This is uselfull for the feature allowing to leave comments on a spreadsheet.

Task 2638411 (spreadsheet comments)
Task 2793280

closes odoo/odoo#86381

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-14 17:29:00 +00:00
Alexandre Kühn aa879efef8 [IMP] mail: turn 'ChatWindow/newMessageFormInputPlaceholder' into field
Task-2793280

closes odoo/odoo#86373

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-14 17:28:50 +00:00
Alexandre Kühn 7269d9e4f8 [IMP] mail: turn 'AttachmentViewer/imageStyle' into field
Task-2793280

closes odoo/odoo#86371

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-14 17:28:47 +00:00
Alexandre Kühn 371c28a8ba [IMP] mail: turn Activity/noteAsMarkup as field
Task-2793280

closes odoo/odoo#86370

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-14 17:28:44 +00:00
Didier (did) 1b7fb828e0 [FIX] mail: allow user to delete other's attachments again
Before this PR, only author of the message and admin could delete attachments
inside the chatter.
This behavior is now restricted to the channels and allow users to delete
attachments inside the chatter.

task-2753295

closes odoo/odoo#86302

X-original-commit: 5934dc08b32b422a11324743148083d4daa34350
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-14 10:38:15 +00:00
Louis Wicket (wil) 24a19a10c9 [IMP] mail: delete time model, add clock and clock watcher models
The Time model is deleted and replaced with the new Clock model. The
differences are that there can be several clocks, whereas Time was a
singleton, and that a clock must define the frequency at which it
updates.

The new model ClockWatcher is added to model a record that makes use of
a clock. This is currently useful for the clocks to set or clear intervals
as needed.

closes odoo/odoo#86219

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-14 10:38:11 +00:00
Alexandre Kühn 94d0c266fd [IMP] mail: turn "RtcSession/connectionRecoveryTimeout" into field
Task-2734101

closes odoo/odoo#85027

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-14 10:37:57 +00:00
Alexandre Kühn 714854a9cb [IMP] mail: turn "RtcSession/broadcastTimeout" into field
Task-2734101

closes odoo/odoo#85020

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-11 17:04:50 +00:00
Alexandre Kühn afa782c689 [IMP] mail: turn "UserSetting/timeouts" into field
Task-2734101

closes odoo/odoo#85023

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-11 11:40:46 +00:00
Sébastien Theys 412c007e58 [FIX] mail: display icon for public channels
task-2789208

closes odoo/odoo#86221

X-original-commit: 8a6493db68a9156c0ed745b019749fcd97e64c1c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-10 19:10:56 +00:00
tsm-odoo 1e828a14ec [IMP] mail: get closer from python model definition in test setup
*: hr, hr_holidays, im_livechat, mail, snailmail, test_mail, website_livechat,
website_slides.

This commit will remove the need to duplicate models definition for
test purposes. Indeed, for now, we need to mock the model definitions
on the client side. Those models definitions are often very different
from the ones found on the server.

This approach will allow us :
	- to ease model definitions during tests
	- to get closer from the real models

task-2767820

closes odoo/odoo#84828

Related: odoo/enterprise#24486
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-10 18:19:59 +00:00
Ipsita Borisagar 2cd3484de9 [FIX] mail, test_discuss_full: add guests name into group dm name
Before this commit:

In discuss, the group DM default name does not contain any guest names in it.

After this commit:

Group DM default name will also take guest names along with other user names.

Task-2664859

closes odoo/odoo#86130

X-original-commit: 41f4c5741097b09c372406bbbd5364314bff6d1b
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-09 16:13:06 +00:00
Didier (did) 5a3cc5e307 [FIX] mail: include is_main inside the convertData
task-2783076

closes odoo/odoo#86119

X-original-commit: 0e4f074b9894ca528b3d1a719918f33c39fd6a6c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-09 15:19:00 +00:00
stefanorigano (SRI) b41f900bd8 [FIX] mail: remove oi classes leftovers
During 28f910f some `oi` utility-classes that were supposed to be
removed have been forgotten, causing `fa` icons to don't be rendered
properly.

This commit will remove the unnecessary classes solving the render
issues.

task-2790138

closes odoo/odoo#86102

Related: odoo/enterprise#25128
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-09 14:08:41 +00:00
tsm-odoo 74f55ac035 [IMP] mail: change relation of partner_id field
This commit helps reducing the noise of the model definition PR. Indeed,
the partner_id field on the mail.follower model was mocked as an integer
field. The /mail/thread/data route returns an integer. But the search
read method returns an array for many2one fields [id, display_name]. Thus,
using the real server field will result in an incorrect behavior.

task-2767820

closes odoo/odoo#86096

Related: odoo/enterprise#25125
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-09 12:15:38 +00:00
Sébastien Theys 894a5a6c68 [FIX] mail: make default mode for channel 'groups', not 'public'
It's currently confusing: the default value is already 'groups', but the create
method is actually giving another default.

task-2749643

closes odoo/odoo#86075

X-original-commit: 31dfc797bc0fb163b6e32d3fe2195791b674f00c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-09 01:45:00 +00:00
Alexandre Kühn f7701221e0 [FIX] mail: make RTC work
Oversight of https://github.com/odoo/odoo/pull/85651
Commit above made changes to some icons from `oi-` to `fa-`.
Doing so, there was unfortunately a typo, and the template was not valid.
As a result, RTC did not work.

This commit fixes the typo, and make RTC work again.

closes odoo/odoo#85980

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-07 18:22:35 +00:00
Alexandre Kühn 2b71efac3e [FIX] mail: correct visual of popover view
Popover view were broken due to change in signature of
component hook `usePosition()` in this PR:
https://github.com/odoo/odoo/pull/85389

Task-2786868

closes odoo/odoo#85954

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-07 18:22:17 +00:00
Alexandre Kühn 1bc7976f95 [IMP] mail: turn "Chatter/isPreparingAttachmentsLoading" into field
Task-2734101

closes odoo/odoo#85015

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-07 18:22:13 +00:00
Alexandre Kühn 2115ca10af [IMP] mail: introduce 'ChatWindow/componentStyle' field
Task-2694206

closes odoo/odoo#85916

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-07 13:30:48 +00:00
Alexandre Kühn 2c550e22c5 [IMP] mail: turn "Rtc/disconnectAudioMonitor" into field
Task-2734101

closes odoo/odoo#85025

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-04 20:18:57 +00:00
Alexandre Kühn cc789f82d5 [IMP] mail: move rtc recover timeout in its own method
Task-2734101

closes odoo/odoo#85127

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-04 19:04:42 +00:00
tsm-odoo a6bb70c91a [MOV] mail, test_mail: move tracking value tests
task-2767820

This move is done to prepare the use of server side model definitions during tests.
Indeed, a model having all type of tracked fields will be needed to ease tracking
value testing. This model will be added to the test_mail module so the tracking
value tests need to be there as well.

closes odoo/odoo#85819

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-04 14:08:10 +00:00
stefanorigano (SRI) 28f910f5be [REF] *: odoo_ui_icons
Following new policies in terms of product design-language, this commit
will partially revert 546477d reducing the number of `oi` icons.

It will also improve rendering when icons are rendered at our default
font-size (13px), avoiding blur effects when icons use thin lines.

Since fontAwesome will coexists with `oi` longer than expected, the
commit will also review size utility-classes in order to get consistent
result when used in conjunction with fa's ones (notably `fa-lg`).

Part-of: odoo/odoo#85651
2022-03-03 14:19:44 +00:00
tsm-odoo cf96f69880 [IMP] mail: enable tracking values in mock server
task-2767820

closes odoo/odoo#85201

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-03 12:57:54 +00:00
Jorge Pinna Puissant cac3ba62e5 [IMP] test_lint, *: add caughtErrors option to no-unused-vars
All named arguments on the catch block must be used. If for some motive
the named argument on the catch block is not used, its name must begin
with '_'.

closes odoo/odoo#85569

Related: odoo/enterprise#24867
Related: odoo/design-themes#552
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-03-02 13:05:42 +00:00
Jorge Pinna Puissant bc20eb4790 [IMP] test_lint, *: enable no-unused-vars rule
Part-of: odoo/odoo#85569
2022-03-02 13:05:42 +00:00
Michael (mcm) b133f93213 [REF] mail, im_livechat: use LegacyComponent
This commit replaces Component by LegacyComponent when the component
uses removed features from owl 1 like getting its `el` or `trigger` an event.

Part-of: odoo/odoo#85389
2022-03-01 09:57:39 +00:00
Jorge Pinna Puissant df944e3f9c [REF] mail: remove the hook useShouldUpdateBasedOnProps
With the new fine-grained reactivity in owl 2, this hook is not
necessary any more.

Part-of: odoo/odoo#84314
2022-02-25 12:35:44 +00:00
Jorge Pinna PuissantandGéry Debongnie 09b4668c6b [REF] *: adapt code to owl2 with fine-grained reactivity
On most of the cases, the fine-grained reactivity is bypassed by:
- Setting the optional `deep` argument as `true` on the renderer
    function. This will force a render to update all child components.
- Changing some objects from reactive to non-reactive using `toRaw`
    function.

Part-of: odoo/odoo#84314
Co-authored-by: Géry Debongnie <ged@odoo.com>
2022-02-25 12:35:43 +00:00
Sébastien Theys 8ce96ac850 [IMP] mail: rename js Model to Record
Removes confusion in technical code. An instance of Thread is a thread, by
analogy a record should be an instance of Record.

closes odoo/odoo#85359

Related: odoo/enterprise#24731
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-02-24 18:42:13 +00:00
tsm-odoo a7835ff436 [IMP] mail: make m2x user tests use start instead of createWebClient
task-2767820

closes odoo/odoo#85066

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-02-23 16:07:55 +00:00
Samuel Degueldre 6daa2d01b7 [IMP] web, *: use MutationObserver to neutralize image src in tests
*: mail, mrp

Previously, to prevent images and iframes from making  GET requests in
tests, we would listen for the DOMNodeInserted event. This event is
deprecated and should not be used. Additionally, we weren't listening
for attiribute changes for performance reasons, which would result in
some GET requests still being made when an src attribute was changed.

This commit changes the mechanism that is used to do this from mutation
events to a MutationObserver which is not deprecated, and now also
listens for attribute modifications as MutationObservers can be
configured to only listen for changes to certain attributes, greatly
alleviating the performance impact of listening for those.

This mechanism has also been enabled globally by doing it once in the
test setup code, instead of requiring one to call a specific helper, as
we never want to make real requests during tests.

Some tests have been adapted to this new behaviour.

closes odoo/odoo#85216

Related: odoo/enterprise#24665
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-02-23 15:07:59 +00:00
Thanh Dodeur fb8f5169b2 [FIX] mail: prevent empty popover in the rtc call participant card
Before this commit, the popover containing the volume bar of the rtc
call participant card was rendered empty. This was because the `t-set`
was used instead of `t-set-slot`. This commit fixes this issue.

related to: https://github.com/odoo/odoo/commit/edd79ff560cf321ebd0488e4917abb7424fea1bb

closes odoo/odoo#85106

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-22 15:20:06 +00:00
tsm-odoo 609890eaa4 [IMP] mail: update notification_type to match server's default
task-2767820

closes odoo/odoo#85095

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-22 15:19:48 +00:00
Alexandre Kühn 9e515155a6 [IMP] mail: turn "Chatter/attachmentsLoaderTimeout" into field
Task-2734101

closes odoo/odoo#85012

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-21 20:11:59 +00:00
Alexandre Kühn dcef7d1f9c [IMP] mail: turn "ThreadView/loaderTimeout" into field
Task-2734101

closes odoo/odoo#85021

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-21 18:30:13 +00:00
Alexandre Kühn 6f95a4327b [IMP] mail: turn "RtcCallViewer/showOverlayTimeout" into field
Task-2734101

closes odoo/odoo#85018

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-21 18:30:09 +00:00
Priyanka Kakadiya 6fb5c3d82d [FIX] mail: fix back button issue to close channel
Before this commit:

When switching to mobile view and refreshing the channel in discuss than back
arrow button is not working

After this commit:

Back arrow button will close the channel

Task-2685187

closes odoo/odoo#85034

X-original-commit: ebe56aac6d11e967d3b2fc8b57031e1b0e8ea726
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-02-21 16:07:54 +00:00
tsm-odoo 0862f2fab0 [IMP] mail, *: make mail module's beforeEach functions async
*: calendar, hr, hr_holidays, im_livechat, note, sms, snailmail,
website_livechat, website_slides.

This commit prepares the ground for the model definitions PR.
In order to reduce the noise, all mail module's beforeEach
functions will be made async.

task-2767820

closes odoo/odoo#84845

Related: odoo/enterprise#24489
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-18 13:26:49 +00:00
Alexandre Kühn 932116ddfd [FIX] mail,web: fix typo for oi-large icons
Large icons should use `oi-large` instead of `oi-lg` or `oi-2x`.

closes odoo/odoo#84838

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-18 12:29:09 +00:00
roen-odoo dbdccd99c5 [FIX] mail: Onchange error after done & schedule next activity
Current behavior:
In any chatter, if you schedule an activity then use the "Done & schedule next" options you had an error if you try to modify some fields of the record linked to the chatter.
For example in CRM you couldn't modify the probability after using "Done & Schedule next"

Steps to reproduce:
-Go in CRM
-Go on a lead page
-In the chatter schedule an activity
-Click on mark done and then on Done & Schedule next
-Try to edit the probabilty field of the lead
-You get an error : Record does not exist or has been deleted. (Record: mail.activity(x,), User: xx)

opw-2648685

closes odoo/odoo#84841

X-original-commit: b45f024e96e17790427ad12e7f201567db0a249b
Signed-off-by: Anh Thao PHAM <pta@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-02-18 09:49:41 +00:00
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