Commit Graph
4671 Commits
Author SHA1 Message Date
Alexandre Kühn fa6fe90ee7 [FIX] mail: padding at end of other bubble in discuss chat window
closes odoo/odoo#119092

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-04-19 21:58:52 +02:00
Mathieu Duckerts-AntoineandMichaël Mattiello ebf646b44f [IMP] *: ModelFieldSelector improvements
We refactor the ModelFieldSelector and ModelFieldSelectorPopover
components.

We also improve a bit ModelFieldSelectorPopover:
    - on first page, the button to go back is no longer available
      (so that it is now more difficult to produce an invalid path)
    - we always start with a page presenting the model where the last
      selected field name belongs to
    - the keyboard navigation is improved
    - click on model field selector opens the popover with the focus in
      the search input (if any)
    - for relational fields in popover: the user can either click on the
      relational field (and select it) or a special button that make him
      follow the relation to the field comodel

We also refactor the hook useDynamicPlaceholder to make it use a new
component DynamicPlaceholderPopover that uses ModelFieldSelectorPopover.

Task ID: 3272798

closes odoo/odoo#117951

Related: odoo/enterprise#39673
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
2023-04-19 21:58:34 +02:00
Didier (did) 6f12a849f6 [IMP] mail: link preview image as message
This PR hide the message body when the link preview is an image and the message
only contains the link to the image.

closes odoo/odoo#117772

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-19 20:58:14 +02:00
Alexandre Kühn 4fd9cfbe81 [FIX] mail: make chat window take whole height in mobile
Before this commit, chat window take at most 95% of global
height. This is ok in desktop, 5% room allow clicking on
systray menu. In mobile, however, the intend is for chat window
to take whole height.

This commit makes chat window take whole height in mobile, while
preserving the max-height 95% of global height in desktop.

Also fix an issue where chat window were foldable in mobile, when
this feature is desktop-only.

closes odoo/odoo#119058

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-19 19:14:47 +02:00
Didier (did) f5ff0b1b30 [FIX] mail: fix link preview overflow in the chat window
Before this PR, a link preview image would overflow out of the chat window. This
because the max-width on the image is bigger than the space dedicated to the
image inside the chat window.
This PR set the max-width to 100% inside a chat window, so the image cover the
space nicely.

closes odoo/odoo#119019

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-19 11:01:27 +02:00
tsm-odoo e55ba11a89 [FIX] mail: fix message separator appearing after showing composer
closes odoo/odoo#118875

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-18 19:28:50 +02:00
Pulinckx Pierre (PIPU) 800223ae7c [REF] *: Replace underscore _.each() by native JS
Replaced _.each() functions (average 235 occurences)

Description of the refactoring this PR addresses:

Current behavior before PR:

There are underscore.js function enumerated above used in odoo.

Desired behavior after PR is merged:

These functions has been replaced by native javascript
prototypes/methods/functions.

TaskId : 3246238

closes odoo/odoo#118565

Signed-off-by: Georis François (fge) <fge@odoo.com>
2023-04-18 15:38:54 +02:00
tsm-odoo a2a4cd56ec [FIX] mail: fix reply to author avatar
This PR fixes a bug where the author avatar of the parent message of
a reply had the wrong avatar (the one of the  of the reply
author instead of the one of the parent message author).

closes odoo/odoo#118878

Signed-off-by: Debondt Didier (did) <did@odoo.com>
2023-04-18 11:33:48 +02:00
Alexandre Kühn 79b30f13b8 [FIX] mail: border style of composer in edit message
closes odoo/odoo#118802

Signed-off-by: Debondt Didier (did) <did@odoo.com>
2023-04-17 18:01:24 +02:00
Didier (did) f11ab40c3e [IMP] mail: rename update function and cleanup dead code
closes odoo/odoo#118793

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-17 16:35:06 +02:00
Nemael f80e2aad37 [IMP] mail: add banner on archived channels
This PR adds a banner on archived channels in detailed view
It also adds a banner on archived channels in kaban view, and
reduces the space available for description in case of banner.

Task-2494469

closes odoo/odoo#117619

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-17 15:18:51 +02:00
Alexandre Kühn 4d5516774d [FIX] mail: im status online color in community
Before this commit, im status in community was blue instead
of green.

This commit makes im status green in all version, as it should.

closes odoo/odoo#118744

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-17 14:14:22 +02:00
Alexandre Kühn 41e0543932 [FIX] mail: no crash on receiving link preview of non-known message
This notification makes sense when we know this message. If we don't
know it yet, then we should just ignore and receive data of link
preview when fetching the message.

closes odoo/odoo#118647

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-14 19:45:52 +02:00
zel-odoo 61cdeed774 [FIX] web,mail: wrong positon when content change
1. specify the Position for the usePosition();
2. fix chatter navigable list position;
3. usePosition() change;

closes odoo/odoo#118438

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-13 17:57:24 +02:00
Bruno Boi b4b834c0a9 [REF] web: simplify popover hook usage
**Before this commit**
Almost all of the use cases of the `usePopover` hook are dealing
with an abnormal amount of complexity:
- they have to store the closing function of the popover, and sometimes
  keep track to its opening state,
- you can find a duplication of a useUniquePopover hook, which is
  anyway the behavior that is always wanted for popover users.

This is due to the fact that usePopover is just some kind of wrapper
to the lower level popover service.

**After the commit**
- The usePopover now has a new API, which simplifies its usage.
- The useUniquePopover hook implementations have been removed and
  this "unique" behavior is now merged into usePopover
  and has become the standard one (not configurable).
- All of the use cases have been adapted, even the cases where
  components used directly the popover service (through `useService()`).

See the adapted jsDoc around the hook in popover_hook.js

closes odoo/odoo#118066

Related: odoo/enterprise#39654
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2023-04-13 16:40:19 +02:00
Bruno Boi e9aced9d53 [FIX] web: close popover on mousedown away
**Before this commit**
The popovers will close on click away.
This makes impossible to start selecting text within a popover
using the mouse and finishing the move outside of the popover
(as it will get closed).

**After this commit**
Popovers will close on mousedown away instead, which is a general
standard for user interfaces anyway.

Part-of: odoo/odoo#118066
2023-04-13 16:40:18 +02:00
Thanh Dodeur 945f3cce9c [IMP] mail: add rtc information to the member list
This commit adds call icons to the channel member list and
sorts this list as well as the call participant cards of the call view
based on call state (in call, raising hand, invited).

task-3251025

closes odoo/odoo#117995

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-13 15:26:27 +02:00
Jorge Pinna Puissant 38acd9f7d4 [FIX] mail, test_mail: Keep track of last update images
Since [1], a unique id is used for fieldNodes, therefore, the code to
keep track of last update images on the activity view needs to change
also.

Before this commit, we search the write_date on the fieldModes using the
id, and if it's not present, a new one is created using as id
"write_date".

Now, as a unique id is needed, we search using the name, and if it's not
present, a new one is created using as id "write_date_0".

Note that this is already the behavior on kanbanParse.

[1]: https://github.com/odoo/odoo/commit/baebb6a5b05ac8d59501a6071a5513e31a4ca047

closes odoo/odoo#118320

Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-04-13 04:08:53 +02:00
Louis Wicket (wil) c16bef413f [FIX] mail: adjusts member list separator to the locale
Prior to this commit, the separator used to separate the names of the
members of a group DM could not be translated. This is because the
string being translated is too short to be considered by the translation
system.

This commit fixes the problem by no longer relying on the Odoo
translation system and instead using the ECMAScript Internationalization
API.

closes odoo/odoo#118306

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-13 04:08:45 +02:00
Alexandre Kühn 1a6c04211e [FIX] mail: emoji picker add() should not useRef
`useRef()` hook should only be used in `setup()` of component.
The `add()` function of emoji picker can be used anywhere.

This commit fixes the issue by limiting use of `add()` to pass
Object whose `el` is an element. We should pass the ref immediately
rather than the refName.

closes odoo/odoo#118293

Related: odoo/enterprise#39626
Signed-off-by: Debondt Didier (did) <did@odoo.com>
2023-04-13 04:08:30 +02:00
tsm-odoo 1c1604466f [IMP] mail, im_livechat: add pin messages feature to channels
With this commit, messages can be pinned on a channel and
chat conversation. There's a new menu listing all pinned
messages on a conversation, and we can jump to these messages
in the current conversation.

As this feature incentives to see older messages, this commit
also adds a "Jump to Present" button when looking at old messages.

closes odoo/odoo#116666

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-13 04:08:11 +02:00
Alexandre Kühn fc9d46f3b9 [REF] mail: clean message fetch code
Adapt code of message fetch so that fetching of
(needaction) messages are controlled in a way to
keep continuous sequence of messages at all time.

This code design solves the "holes" problem in a message
list by not allowing holes. This fixes many scenario that
generated these holes, resulting in unfetchable messages.

Example of such a scenario:
- post 40 messages
- post a new message that is reply of the oldest message
- page reload and scroll up until load more
=> 10 messages are missing in-between replied message and
 following message (that should have been 11 messages apart)

This code also prepares for allowing jumps in a conversation.

Part-of: odoo/odoo#116666
2023-04-13 04:08:11 +02:00
damr bceab17e68 [FIX] mail: prevent a traceback when an onclick is triggered on an empty
m2o avater user widget

This commit's purpose is to prevent a traceback when the user click on
an empty avatar user icon.

task-3254564

closes odoo/odoo#117374

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-12 14:02:27 +02:00
Alexandre Kühn 5293827949 [FIX] mail: no white leak on rounded border of chat window
Before this commit, in white theme, chat window rounded borders
had some white color leak.

This comes from background color of chat window, which is white,
while the header background color is purple.

This commit fixes the issue by setting the chat window background
color to purple. The content now defines its own color, and the
header just inherit from the chat window background color.

This commit also fixes a bug where the chat window hidden menu
items were below visible chat windows.

closes odoo/odoo#118242

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-11 18:49:43 +02:00
Alexandre Kühn c1ad2a6f18 [FIX] mail: chat window adapts height to global height
Before this commit, when global height was below height
of a chat window, the chat window was overflowing.

This commit fixes the issue by ceiling the height of chat
window to the global height.

closes odoo/odoo#118229

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-11 18:49:29 +02:00
Zelong Lin 6705c2f4fd [IMP] mail,im_livechat: no canned reply in mail
Canned response should only enabled in livechat thread.
task-3208438

closes odoo/odoo#116388

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-11 18:49:24 +02:00
Alexandre Kühn fbb909b24b [FIX] mail: improved visibility of other bubbles
closes odoo/odoo#117520

Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-04-11 16:53:44 +02:00
Didier (did) 1ea917278f [IMP] mail: type suggestion service
closes odoo/odoo#118212

Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-04-11 15:17:40 +02:00
Didier (did) c184c2d78d [FIX] mail: remove outdated /new in type path
closes odoo/odoo#118200

Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-04-11 15:17:38 +02:00
Jorge Pinna Puissant baebb6a5b0 [REF] web, *: Unique id for field nodes
Before this commit, the field node id (`field_id`) uses the field name
for the first occurrence on the arch, and add an underscore and a number
for the rest of the occurrences. This can create inconsistencies when
sombody assumes that the field_id is equal to the name, and don't take
into account the possibility of multiple occurrences.

Now, a unique id is created since the first occurrence, this remove all
ambiguity between the id and the name.

Part-of task-id 3179751

closes odoo/odoo#117799

Related: odoo/enterprise#39511
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-11 15:17:20 +02:00
Alexandre Kühn d9bb64f1e9 [FIX] mail: show email_from if message has no author
closes odoo/odoo#118038

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-07 19:43:28 +02:00
Alexandre Kühn 804d3786e8 [FIX] mail: do not auto-open chat window with odoobot on login
closes odoo/odoo#117978

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-07 19:43:25 +02:00
zel-odoo 21b6ef38cf [IMP] mail: activity visual update
1. always show the name of the assignee.
2. replace the icon with avatar
3. bold the time info.

task-3142628

closes odoo/odoo#116349

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-07 19:43:13 +02:00
Maryam Kia 7248178d19 [IMP] mail: Add message reaction menu
This commit adds a menu to see reaction on a message.
It can be accessed from message options or from long press in mobile.

Task-2641441

closes odoo/odoo#116022

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-07 19:43:10 +02:00
tsm-odoo d2e5969e3e [FIX] mail: indeterministic guest tour
This PR fixes the `19916` issue on the `test_mail_channel_public_page_as_guest`
test.

The messaging service subscribes to bus notifications before it is fully
initialized. This test is composed of two tours. In the first one, the guest joins
the channel and receives the "guest has joined the channel" message. Then, the second
tour starts and the local storage is cleared. Since the local storage has been cleared,
the guest receives this message again, potentially before messaging has been initialized
which leads to a `channel_pin` rpc. This RPC fails with `SessionExpired` error and the tour
is stuck and eventually, fails.

closes odoo/odoo#118000

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-07 11:37:30 +02:00
Alexandre Kühn 260e5de3df [FIX] mail: better border visual of chat window
closes odoo/odoo#117969

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-06 19:16:56 +02:00
Alexandre Kühn 104ad53516 [FIX] mail: correct orientation of self bubble in chat window
closes odoo/odoo#117965

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-06 19:16:53 +02:00
Didier (did) e208b56280 [FIX] mail: fix traceback when deleting a link preview
closes odoo/odoo#117908

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-06 16:12:21 +02:00
Thanh Dodeur 4d1e6481db [IMP] mail: improve handling of HTMLMediaElement errors
This commit improves the overlay icon that appears on call participant
cards when an error in the media players occur. The icon is now
clickable, which restarts an attempt to play all the `HTMLMediaElement`s
of the call as a recoverable error can occur when the browser does not
allow `HTMLMediaElement`s being played outside a user interaction.

other related changes:

* removing the `pointer-event:none` from the overlay as it was preventing
hover events, and the title tooltip from appearing.

* removing the try/catch around the `srcObject` assignment, as it should
only crash on old browsers without support for `srcObject` for which the
support of using the alternative (`URL.createObjectUrl` with
`src`) is being dropped.

closes odoo/odoo#117446

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-06 16:12:10 +02:00
Julien Carion (juca) 41a7af5ba6 [IMP] web, webclient: Add autoOpen prop to Dropdown
This commit adds a new prop to the Dropdown component: autoOpen.
It is true by default and follows the current behavior of all
current dropdowns (automatically open the dropdown when it is
hovered and a sibling is already opened) when set to true and
disable this feature for the dropdown when set to false.
The commit also applies this new property and set it to false on
all small icon dropdowns that are present by default in the
enterprise navbar to facilitate navigation with these (debug,
 messaging and activity)

opw-3259473

closes odoo/odoo#117622

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-04-06 14:58:53 +02:00
Sébastien Theys e477c5d71b [FIX] mail: keep mentions when toggling composer or editing message
closes odoo/odoo#117786

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-05 16:26:26 +02:00
Sébastien Theys b7dd007396 [FIX] mail: allow click on suggested recipient input
closes odoo/odoo#117681

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-04 19:11:48 +02:00
Sébastien Theys 4e33fc4816 [FIX] mail: add recipients as follower when sending message
Part-of: odoo/odoo#117681
2023-04-04 19:11:47 +02:00
Alexandre Kühn 7b21be10fd [FIX] mail: handle notification for guests not users
Some code in handle notification wrongly assumes `store.user`
is set, as it reads `user.id`. This is correct when the user
is authenticated as an internal user, but for guests this is
incorrect.

This commit adapt code of handling notifications so that
`store.user` can be undefined for guests.

Fix runbot issue 19978

closes odoo/odoo#117647

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-04 16:02:28 +02:00
Alexandre Kühn 24e5b5afcf [FIX] mail: do not console warn when cannot load emoji picker
This happens intentionally on tours that finishes successfully
before the emojis are fully loaded. Notably short tours like
public discuss page show this case.

The console.warn still trigger unhappy runbot. Functionally
the emoji picker shows "Failed to load emoji", so this warning
becomes useless.

Fix runbot issue 20081

closes odoo/odoo#117642

Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-04-04 16:02:25 +02:00
Alexandre Kühn a61ce3491a [FIX] mail: fix public discuss crash on isSelfAuthored
This may happen when receiving a new message without setting
the self persona yet.

Fix runbot issue 19975

closes odoo/odoo#117633

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-04 16:02:22 +02:00
Michael (mcm) ff0d6dd580 [REF] *: replace odoo module by native one
This commit converts almost all odoo module by native module.
The goal is to deprecate odoo.define in favor of native module and then
simplify boot.js by removing the regexp that finds module dependencies.

task id: 3162300

closes odoo/odoo#117305

Related: odoo/enterprise#39118
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-03 17:07:24 +02:00
Thanh Dodeur 6c8439ce43 [FIX] mail: add missing call icon in the discuss sidebar
Following the discuss refactoring* the call icon in the discuss sidebar
has not been reimplemented.

This commit fixes this issue.

\* https://github.com/odoo/odoo/pull/110188

closes odoo/odoo#117464

Signed-off-by: Debondt Didier (did) <did@odoo.com>
2023-04-03 15:59:52 +02:00
luvi 129fa3f150 [MOV] web, *: move TagsList to core components
Since this component is imported and used in many places, it is more
convenient to move this component a core component instead of a
component made exclusively for the Many2ManyTagsField component.

This change makes the usage of TagsList possible by SelectMenu, which
would create issues as the fields folder should not be imported in
other modules.

Part-of: odoo/odoo#115799
2023-04-03 13:55:17 +02:00
Lucas Perais 91000641f1 [FIX] mail: tests helpers: export mail setup registries
This commit exports the function responsible for setting up the mail registries in tests.

This is usefull if one doesn't want to instanciate a full webClient in tests and still have mail features.

Part-of: odoo/odoo#115799
2023-04-03 13:55:16 +02:00