Commit Graph
945 Commits
Author SHA1 Message Date
Sébastien Theys a7485e53d6 [REF] mail, *: clean click and contains API
* = test_mail, hr, im_livechat

- Allow only selectors
- Add `value` check to `contains`
- Remove return from `click`

closes odoo/odoo#132799

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-23 17:40:07 +02:00
Sébastien Theys be199cd923 [REF] mail: remove unused afterEvent
Remaining of last refactoring.

Part-of: odoo/odoo#132799
2023-08-23 17:40:06 +02:00
Sébastien Theys ed7621d726 [REF] mail, *: remove unnecessary makeFakeNotificationService
* = hr, im_livechat

The real service works just as well, gives more guarantee on what is
actually tested, and requires less lines of code.

closes odoo/odoo#132744

Related: odoo/enterprise#46108
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-22 20:01:17 +02:00
Didier (did) 479ba79182 [IMP] mail: fix contains typing to avoid lint error
closes odoo/odoo#132632

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-22 20:00:24 +02:00
Sébastien Theys d08a18b791 [IMP] mail, *: tests: use contains in click and insertText
* = account, calendar, im_livechat, mrp, project_todo, sms, snailmail,
    test_mail, web, website_livechat

`contains` is more efficient than `afterNextRender` as it does not wait
for several extra animation frames, and it is functionally more
meaningful.

closes odoo/odoo#130451

Related: odoo/enterprise#44999
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-21 21:00:03 +02:00
Sébastien Theys 9a1efcbde7 [REF] mail, im_livechat, mrp: rename waitUntil to contains
`await contains` is shorter and reads better than `await waitUntil`.

Part-of: odoo/odoo#130451
2023-08-21 21:00:02 +02:00
Sébastien Theys 3f8544d906 [IMP] mail, im_livechat: tests: add assert to waitUntil
`QUnit` tests require at least one `assert`. This change allows to write
tests that only contain `waitUntil` without extra `assert` in the test.

`waitUntil` is more efficient than `afterNextRender` as it does not wait
for several extra animation frames, and it is functionally more
meaningful.

Currently existing tests that contain `waitUntil` have been adapted
accordingly. More and more tests should make use of it in the future.

Part-of: odoo/odoo#130451
2023-08-21 21:00:00 +02:00
Alexandre Kühn 92d9b6d779 [FIX] mail: show chatter attachment loading after 1 second
Before this commit, when chatter data were fetched, it shows
spinner icon on attachments immediately until data are fetched.

This RPC is quite fast, so it's annoying to see spinner and then
no spinner whenever chatter is reloaded. This is even more
bothersome when most chatters have no attachments and some followers,
which gives the illusion loading affects followers rather than
attachments, as the spinner takes place of attachment counter that
is empty when no attachment.

This commit fixes the issue by having a 1 second delay for showing
the loading icon next to attachment. This prevents most flickers
when RPC is fast, while keeping it relevant when it's slow so it's
clear data are still loading.

Task-3356922

closes odoo/odoo#132463

X-original-commit: 96b00d25becdf2253975d1b427c30ee287cda98f
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-20 18:19:59 +02:00
lrizzi1 698e14a003 [FIX] mail: closing hidden chat window should not crash
Before this commit, closing a hidden chat window may crash.

This happens because closing a chat window was always treated as the
closing of a visible chat window, which should make the 1st hidden
chat window visible, if any. This code should not be called when
closing a hidden chat window, otherwise unexpected behaviour are
to be expected, e.g. closing 2nd hidden chat window swaps last visible
with 1st hidden chat window, or even a crash.

This commit makes sure auto-swapping of 1st hidden chat window only
occurs when closing a visible chat window.

opw-3460466

closes odoo/odoo#132458

X-original-commit: b49364b687757385a2a7356d17dc428edafd2767
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-20 14:43:56 +02:00
Alexandre Kühn 941e28cee1 [FIX] mail: show seconds in message datetime
Before this commit, when mouse hovering on relative time of the
message, it showed the datetime without the seconds.

Not showing the seconds can make it hard to determine chronological
order of 2 messages in different conversations.

This commit fixes the issue by showing the seconds in datetime format
of message when mouse hovering on relative datetime part.

opw-3423016

closes odoo/odoo#132376

X-original-commit: b0019f5b92b9cebab9f1162631cbf00be5101b6f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-19 12:02:15 +02:00
tsm-odoo 01fa22e0c9 [FIX] mail, *: fix suggestions after search/fetch returned no result
*: im_livechat.

Before this commit, suggestions were not showing anymore after
search/fetch returned no results. This commit fixes the issue
by resetting the search state when nothing is found.

task-3459933/3455060

closes odoo/odoo#132264

X-original-commit: 13b3f36a0d71bb55e2ca56fd207c7dfaba23aa86
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-18 21:45:11 +02:00
Gorash 0d99f4b9d9 [REF] base,all: Update modifier syntax: adapt JavaScript
closes odoo/odoo#104741

Related: odoo/enterprise#35255
Related: odoo/documentation#3523
Related: odoo/upgrade#4884
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-08-18 09:49:16 +02:00
Alexandre Kühn ace1c03600 [FIX] mail: chat notification body should not have author name
Before this commit, messaging menu items of type chat show the
author name in body part. This is redundant with name of
conversation that is usually the name of the correspondent.

This commit does not show the name of the author in notification
item body when it's the same as correspondent of conversation.

closes odoo/odoo#132210

X-original-commit: 4b146aa70c721162b3741486246936af74f77f36
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-17 18:43:33 +02:00
zel-odoo a1f949c8c3 [IMP] web,mail: Discuss app commands in command palette
This commit adds some discuss-related options in the command
palette.

- hotkeys to add channel (C) & chat (D), and start a meeting (M);
- namespaces `@` or `#` show mentionned and recent conversations
  in Discuss app when search is empty;

Items show optional badge with needaction counter.

Mentions/Recent categories are only visible when there are no
search term. Indeed, `@term` searches for users while `#channel`
searches for channels, so these categories are meant to quickly
jump to recent and important conversations. When typing some
search terms, the fuzzy search has precedence over mentions/recent
criteria.

task-3330218

closes odoo/odoo#128896

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-17 14:52:03 +02:00
FrancoisGe 41def9680a [FIX] mail: fix debounce onchangeOnKeydownMixin
UseDebounce to avoid executing debounced code when the component
is unmounted. This prevents crashes.

closes odoo/odoo#131782

X-original-commit: c81714a3eb5825758637cacaf830b63b2e5dfdd5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-08-12 20:05:48 +02:00
tsm-odoo 7131f7c626 [IMP] mail, *: add support for guests/dynamic users in tests
*: bus, calendar, im_livechat, web, website_livechat.

This PR adds the possibility to set the current user during tests as
well as the mail guest. This will be used to test mail guest page and
livechat once the visitors will be treated as guests.

part of task-3332628

closes odoo/odoo#130811

Related: odoo/enterprise#45331
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-08-09 14:36:12 +02:00
Maryam Kia 8d039cafe3 [IMP] mail: Send voice messages in discuss chats and channels
With this commit, users can send voice messages in channels and chat.
There's a new button in composer to record audio from the microphone,
up to 1 minute clip duration. This adds a voice attachment with its
dedicated voice player that shows waveforms and allows playback.

To ensure compatibility in all supported browsers, we choose to
encode voice recording with `audio/mp3` thanks to lib `lamejs`.

Task-3240168

closes odoo/odoo#117036

Related: odoo/enterprise#45482
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-08-09 13:20:46 +02:00
tsm-odoo 76bd362e34 [FIX] mail: no follower spinner on draft record
Before this commit, the follower loading spinner was shown
for draft records until it was saved. This is incorrect,
follower count should instead be 0. This commit fixes this
issue.

closes odoo/odoo#131224

Signed-off-by: Didier Debondt (did) <did@odoo.com>
2023-08-09 03:08:18 +02:00
Didier (did) 1113272d56 [FIX] mail: discuss search results should match input
Before this PR, RPC made by input inside the discuss sidebar could
resolve in the wrong order, witch display outdated results.
This PR ensure that only the most recent RPC is sent to the server,
cancelling irrelevant RPC.

Note: This PR also remove the support for Promise inside the
NavigableList component since it's not compatible with useSequential.

closes odoo/odoo#130767

X-original-commit: ba2d029d876f9acd7c869cc3d345cc4ed7cab00a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-04 15:02:23 +02:00
Aaron Bohy 850427e4ba [REF] web,mail: remove legacy MockServer and related utils
This commit removes the legacy implementation of the MockServer
and test utils making it available in the test environment (e.g.
addMockEnvironment).

Part of task~3439226

closes odoo/odoo#130671

Related: odoo/enterprise#45141
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-08-04 09:43:08 +02:00
tsm-odoo 7c932aa6c8 [FIX] im_livechat: use public user during tests instead of admin
Before this PR, the user during livechat embed tests was the admin partner while
it should be the public partner. This commit fixes the issue.

part of task-3332628

closes odoo/odoo#130429

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-08-03 10:43:01 +02:00
Michael (mcm) 06adb79b1e [REF] hr_expense, lunch, mail: change patch to mixin
Before this commit, a patch was used to modify some classes in place
but these classes were declared some lines just before the patch.
This commit replaces those patches by mixins, it's a better way to
provide a same extension to multiple classes as the extension is
done by the language.

Task: 3410198
Part-of: odoo/odoo#125716
2023-08-02 17:29:05 +02:00
Michael (mcm) 9d6b380a24 [REF] *: adapt patches after new patch function
In the commit [1], the patch has been refactored to support the
native keyword `super`. The current commit just adapts the codebase
to that change.

task 3410198

[1]: 19ea1ac08043e22a811630968e44715cc3bfc495

Part-of: odoo/odoo#125716
2023-08-02 17:29:05 +02:00
tsm-odoo e11612afbb [FIX] mail: fix setup manager copy registry
Before this commit, an event listener was added on
several registries to copy the required registry for
mail tests. The registries should be copied once when
the test suite begin to avoid side effects in tests.

closes odoo/odoo#130461

Related: odoo/enterprise#45014
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-02 16:00:10 +02:00
Julien Carion (juca) 7e6dd0e7c0 [FIX] mail, hr: fix avatar card popover
This commit introduces various fixes regarding the avatar card.
First one makes sure that the avatar card popover won't launch when
there is no user image associated with the many2one_avatar_user_field.
Second one prevents the card from opening when the related model is not
"res.users".
Third one allows to display the phone number of users even without hr
installed and makes sure that the work_phone and work_email are shown
in priority if available when hr is installed.

Direct fix to Task-3167110

closes odoo/odoo#129876

Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-08-02 15:59:50 +02:00
Aaron Bohy c10b5d0b1b [REF] web,*: tests: remove legacyExtraNextTick
Now that most of the webclient codebase (fields, views, client
actions...) has been converted to owl, the legacy extra next tick
used in a lot of tests is no longer necessary. This commit removes
the helper and its usage. At some places, a real tick was needed,
but we didn't see it because of the use of the legacy extra next
tick.

Part of task~3439226

closes odoo/odoo#130236

Related: odoo/enterprise#44869
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-01 23:52:30 +02:00
Sébastien Theys f9aedceb9f [REF] mail, im_livechat, *: move code and remove patches from sidebar
* = hr_holidays

Part of task-3265211

closes odoo/odoo#130003

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-01 22:30:47 +02:00
Pierre Pulinckx (pipu) 3bc94e52ce [REF] *:Replace moment usages with luxon
luxon and moment are both used in the solution,
but these two libraries facilitate the manipulation
of dates. It was decided to replace all uses of
moment with luxon so we can then remove
moment.js from the code and lighten the assets.

task-3391739

closes odoo/odoo#128752

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-07-31 19:02:45 +02:00
tsm-odoo 577f0b3471 [IMP] mail, *: remove setup manager patches in test
*: im_livechat, website_livechat.

Before this PR, services has to be added to the setup manager in order to be loaded in tests. This was cumbersome because the setup manager was patched by each sub-feature to add feature related services to the registry. The same had to be done for systray/main components registries.

This PR automates this process in order to remove the patches.

closes odoo/odoo#129705

Related: odoo/enterprise#44596
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-28 16:28:52 +02:00
Sébastien Theys b76db01aec [REF] mail: move mail.record/insert to new services
Part of task-3265211

Part-of: odoo/odoo#129583
2023-07-27 20:32:31 +02:00
Bastien PIERRE 65242e31e9 [IMP] *: Remove alias in JS files
Rename all imports with alias old system to the new js module system
Task ID: 3266759

closes odoo/odoo#127414

Related: odoo/design-themes#671
Related: odoo/enterprise#43716
Signed-off-by: Bastien Pierre (ipb) <ipb@odoo.com>
2023-07-27 11:58:34 +02:00
Alexandre Kühn 29ca8f806a [FIX] mail: chat window state should sync crosstab
Before this commit, chat windows state (open/close/folded) was not
syncing between browser tabs. This lack of feature makes using chat
in crosstab quite inconvenient.

This feature exist in 16.2 and was mistakenly removed from rewritting
of Discuss code in 16.3. This commit reimplements as it was in 16.2.

Task-3435120

closes odoo/odoo#129812

X-original-commit: 8f27d1f254e79becf6886cdb90a1af14b28e9946
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-27 05:18:49 +02:00
Julien Carion (juca) 3af4bffeee [IMP] web, mail, hr: Avatar card preview
This commit adds the possibility to see additional information about a
user with a card that appears when hovering avatar user fields for a
set amount of time. This card contains the following information:
- Avatar
- Chat status
- Name
- Email
- Button to send message
and with HR installed:
- View profile Button
- Job position
- Department
- Phone number
- Advanced chat status (when hr_holidays is installed)

Task-3167110

closes odoo/odoo#121943

Related: odoo/enterprise#44563
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-26 19:18:49 +02:00
tsm-odoo 405a3a4d62 [IMP] im_livechat, mail: add user from member list
This PR focuses on partner invitations for livechat channels:
- Add "invite a user" button to the member list
- Sort partners by availibility (partner is a livechat operator
and connected) then most invited users (by the current partner)
- Display partner lang of suggested partners

part of task-3332872

closes odoo/odoo#128834

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-26 12:00:22 +02:00
Alexandre Kühn 4a92dfa3ba [FIX] mail: open chat on very narrow devices
Before this commit, when opening a chat on a very narrow mobile
device (e.g. 300px width), there was the following crash:

```
TypeError: Cannot set properties of undefined (setting 'hidden')
```

This happens because the computed maximum amount of visible chat
windows was 0, which prevented the good opening of chat window.
Indeed, the code relied on at least a `CHAT_WINDOW_WIDTH`, which
is 360px.

This commit fixes the issue by guaranteeing that it is always
possible to make 1 chat window on the screen, regardless of the width
of the device.

closes odoo/odoo#129474

X-original-commit: 1c9289fffe2a8d0936a1afa99255777ff275c712
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-25 17:36:10 +02:00
Alexandre Kühn 513a95ef9f [FIX] mail: no crash on link preview deletion of unknown message
Before this commit, when receiving a link preview deletion
notification of an unknown message, there was a crash.

This happens because the handling of the link preview deletion
notification assumes that the message linked to the link preview
is known by the JS code. But this might be wrong in the case that
the message was not loaded.

closes odoo/odoo#129460

X-original-commit: 28beec42ac8b731170517a6aa5d7c99623a5a87c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-25 17:35:57 +02:00
Alexandre Kühn 5bf6a84e4f [FIX] mail: edit follower subtype should close dropdown
Before this commit, when editing subtype of a follower
(click on pencil icon to edit), the subtype dialog was
displayed while keeping the follower list dropdown open.

This happens because `FollowerList` makes use of
`Dropdown` and `DropdownItem`, and by default they manage
closing of dropdown item when clicking away of when clicking
on the dropdown item. However, when there are specific clickable
elements on the `DropdownItem`, the clicks do not auto-close the
dropdown menu.

This commit fixes the issue by specifically close the dropdown menu
when clicking on edit button of a follower in follower list.

Task-3435443

closes odoo/odoo#129413

X-original-commit: a33f60356ba7c12bd854eb0efe5c653ff1559495
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-24 23:04:00 +02:00
Alexandre Kühn 5787b40c06 [FIX] mail: do not show out-of-focus notif on receiving self messages
Before this commit, when using Odoo with many tabs and when posting
a message in a DM chat, the other tabs had an alert as if we received
a new message from someone else.

This happens because the condition to trigger a new message alert
were not considering the author of message, thus any new message in a
chat where triggering the sound. This only happens when many tabs
were open, because somehow the tab is sometimes not considered in
focus.

There are likely some corner-cases with `isOdooFocused` where it's
not properly syncing among tabs are wrongly considered as
out-of-focus. This bug of out-of-focus, while more delicate to
understand and fix it, is not critical and thankfully is not a
necessity to fix this problem on receiving self-messages in chats.

opw-3425658

closes odoo/odoo#129361

X-original-commit: f59805825c55663f7381204da8f0bdfe63ccd1d8
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-24 21:27:34 +02:00
thsh-odoo 80af1c3d65 [FIX] mail: add more menu for rtc buttons
This commit revert the changes from this PR https://github.com/odoo/odoo/pull/127377

Before this commit:

Chat window shows all 7 rtc buttons due to this the alignment of the button
is not set because there are way too many buttons.

After this commit:

This commit fixes the issue by showing only 5 buttons Mute,Deafen,Video,More,
Close call and other 3 buttons will moved in expandable More menu.

The testcases were changed accordingly.

Task-3346085

closes odoo/odoo#129360

X-original-commit: 909fb073eada42ff22c4ef4b20b44dc5536b250e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-24 21:27:32 +02:00
Alexandre Kühn a48fa4fe40 [FIX] mail: no favorite/unread on messages in public page as guest
Before this commit, the message actions "Add to Favorite" and
"Mark as Unread" were shown in the Discuss public page For guests.

These buttons should not be present in public page for guests,
as they both require at least the user being authenticated.

This commit fixes the issue by not showing these 2 actions
"Add to Favorite" and "Mark as Unread" on messages in the Discuss
public page as guests. Internal users can still see both features
in the public page

Task-3430586

closes odoo/odoo#129359

X-original-commit: b551f8799ccee443fc0c6a1e8d4a5e2b8e673c57
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-24 21:27:29 +02:00
218ad8456a [REF] *: adapt codebase to new RelationalModel
This commit adapts the code in addons w.r.t. the introduction of
the RelationalModel.

Main changes that were requested are:
 - record datapoints no longer always have an "id" key in their
 data (they still do if the id field is in the view), so we use
 record.resId instead
 - the new model is based on fined-grained reactivity, so several
 components that previously relied on onWillUpdateProps to update
 their internal state no longer worked. Typically, using the hook
 "observeRecord" is the way to go now.
 - specialdata are no longer handled in the model, so the components
 needing specialData can use the hook "useSpecialData"
 - more generally, all overrides of models (RelationalModel or
 KanbanModel) needed to be reworked.

Part of task~3179751

Part-of: odoo/odoo#114024
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: FrancoisGe <fge@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: Pierre Rousseau <pro@odoo.com>
2023-07-24 20:17:50 +02:00
Pierre Pulinckx (pipu) 8bfa76a842 [REF] *: Unify _t and _lt
The goal of this commit is to prepare ground to remove
lazytranslate function _lt() and keep only _t()
for a better understanding of the use of the translation function.

In this commit,

the translate function _t() has been updated to return the translation
if they are loaded. If not, it throws an error.
the lazytranslate function _lt() returns _t() function.
Corollaries :
Steps in test tours are now a function that returns an array of steps
to avoid any interpolation of _t in this ones before translations has
been loaded.

Example :

registry.category("web_tour.tours").add("example", {
    test: true,
    steps: () => [
        {...},
        {...},
    ],
});

task-3292454

closes odoo/odoo#124157

Related: odoo/enterprise#43153
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-07-19 13:13:16 +02:00
Sébastien Theys 64b1d9d4f2 [REF] mail, im_livechat: remove messaging patch from mail/core/web
Part of task-3265211

Part-of: odoo/odoo#128799
2023-07-18 19:28:07 +02:00
Alexandre Kühn 8c249f3376 [FIX] mail: chatter notif opens view even when discuss app is open
Clicking on chatter notification from the messaging menu should
either open chat window or form view, depending on whether the
discuss app is closed or open respectively.

Before this commit, when discuss app was open and user clicks on
messaging menu item related to chatter notification, it was opening
the chatter in discuss app. Although it works, some features seem
missing, such as lack of chatter-specific features, and missing
entry in the app sidebar. The discuss app is designed to work
only on `discuss.channel` threads, therefore chatter threads should
never be shown inside this app.

This commit fixes the issue by ensuring that all opening of chatters
from the discuss app opens the form view.

closes odoo/odoo#128809

X-original-commit: 94c12dd231212e2e52b626a380344623c8627d7c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-18 14:30:11 +02:00
miad-odoo eabc74b6fd [IMP] mail: add new field StatusBarDurationField
This commit implements a new widget in mail, `StatusBarDurationField`. Purpose:
seeing how long a record has spent in each stage in a form view.

It is implemented for records with a `many2one` status field and gets the data
from the `duration_tracking` field of the record. `duration_tracking` is computed
by adding the `mail.tracking.duration.mixin` to a model.

Time is shown using a luxon Duration object. "narrow" specifies that time is
expressed with one character and luxon takes care of translations.

Task-3032773

Part-of: odoo/odoo#108554
2023-07-18 13:07:41 +02:00
Didier (did) 1e12962743 [FIX] mail: suggested recipients are checked by default in chatter
Before this PR, suggested recipients without partner where not
checked and needed to be manually created. This is prone to mistakes
when sending an email to the suggested recipient.

This PR checks all the suggested recipients by default and create
the missing partners when a message is posted, and when full composer
is open. That way, there's far less risk to not send the email to
suggested recipient, and instead the user should manually uncheck
to not send the email.

closes odoo/odoo#128647

X-original-commit: 258b2420676fb1a0d7e834ab79f6bf1ec0f73254
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-17 20:36:07 +02:00
Sébastien Theys adae210696 [REF] mail: move discuss.channel/new_message to discuss folder
Part of task-3265211

Part-of: odoo/odoo#128593
2023-07-17 18:13:38 +02:00
Sébastien Theys bcc420e5d4 [REF] mail: move command palette to discuss folder
Part of task-3265211

Part-of: odoo/odoo#128593
2023-07-17 18:13:37 +02:00
Alexandre Kühn 8dc9d12905 [FIX] mail: fetch followers 100 at a time
Before this commit, the data of all followers of a chatter were
fetched whenever `mail/thread/data` was called. This route is
called when loading the chatter for the first time, and whenever
the chatter must be reloaded.

When there are at most dozens of followers, it's not a big deal.
However, with thousand of followers, the route `mail/thread/data`
may become quite long, which made chatter barely usable with a
long loading.

This commit fixes the issue by showing only 100 followers at once
when opening the follower menu. When scrolling down the list,
it loads data of more followers.

Task-3293718

closes odoo/odoo#127966

Signed-off-by: Didier Debondt (did) <did@odoo.com>
2023-07-17 18:13:11 +02:00
Thanh Dodeur 000bf53251 [FIX] mail: add a missing mock of the browser media api in tests
Before this commit, a test of call was using the real web media API
and would request micrphone access to the brower. This commit fixes
this issue by using the mocked version for this test.

closes odoo/odoo#128722

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-17 16:46:02 +02:00