Commit Graph
4641 Commits
Author SHA1 Message Date
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
Louis Wicket (wil) 418159b716 [IMP] mail: sync activities data between tabs
Task-2714099.

closes odoo/odoo#115986

Related: odoo/enterprise#38537
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-31 17:02:30 +02:00
Romain Estievenart fb8112a06b [IMP] mail,hr,web: change the UX of the Many2ManyAvatarFieldPopover
The commit change the design of the Many2ManyAvatarFieldPopover the goal
is to remove the m2m dropdown and fill the dropdown content directly
inside the popover.

It also reverses the order of the displayed tags inside the m2m avatar
field in the kanban view and inside the popover.

It removes the possibility to unassign users on mouse hover in kanban
view.

Note:
It's still possible to remove users inside an m2m_avatar_field popover.

Task ID: 3229888

closes odoo/odoo#117194

X-original-commit: f0d71e98743421318a798ef9d4f1e75d11a23334
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2023-03-31 10:53:08 +02:00
Thanh Dodeur 560243aefa [FIX] mail: prevent attachmentViewer crash when clicking a video
In the last refactoring*, the click event handler from the old code
was missed, calling an undefined function, which can cause a crash
on some browsers.

This commit fixes this issue and implements the expected behavior of
preventing the propagation of the click to the parent handler that
closes the attachmentViewer.

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

closes odoo/odoo#117288

Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-03-31 08:51:05 +02:00
Alexandre Kühn 96ebb86201 [FIX] mail: CTRL-C content in chat window from home menu
Before this commit, when in home menu with a chat window,
it was not possible to copy content in conversation with
CTRL-C.

This was due to keydown event being intercepted by the hidden
home menu input.

This commit solves the issue by not propagating keydown events
above chat window, so it's not intercepted by the home menu for
his input.

closes odoo/odoo#117211

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-30 18:59:05 +02:00
Alexandre Kühn 43bc9897e3 [FIX] mail: read more/less link on message of type notification
Read more/less requires content being `t-ref="body".
It was not properly set for messages of type notification, thus
skipping the read more/less insertion in the content.

closes odoo/odoo#117203

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-30 17:58:07 +02:00
Didier (did) bb8017707c [FIX] mail: restore the ability to disable link preview
Before this PR it was not possible to disable the link preview by setting
`mail.link_preview_throttle` to 0. This feature was lost in the refactoring.

This PR reintroduce this feature.

closes odoo/odoo#117101

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-30 17:57:53 +02:00
zel-odoo fa006f2bbe [IMP] mail: ChannelSelector improvements
1. Display no result when having no matched results.
2. Hidden when clicking outside of the field.
3. Be visible when clicking inside the field.
4. Add related tests

task-3208033

closes odoo/odoo#116214

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-30 15:09:20 +02:00
Didier (did) 312dfc3731 [FIX] mail: remove now useless comment
Since the rename of partnerRoot to odoobot (https://github.com/odoo/odoo/pull/116823), this comment is now irrelevant.

closes odoo/odoo#117102

Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-03-30 10:54:10 +02:00
Alexandre Kühn e4537f7fc6 [IMP] mail: several emoji picker improvements
- Bigger and centered emojis in grid
- Better visual clue of focused input from search icon
- No search screen with icon + text
- Consistent sizing of emoji picker in case of failure
- Added basic test for active highlighted category

closes odoo/odoo#117001

Signed-off-by: Debondt Didier (did) <did@odoo.com>
2023-03-30 09:49:52 +02:00
tsm-odoo ce135776be [FIX] mail: make thread topbar icons reflect active state
task-3251550

closes odoo/odoo#116863

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-29 13:06:49 +02:00
Alexandre Kühn e4bd98a4a5 [FIX] mail: do not crash on failing loading emoji in tests
Before this commit, tour may end before emojis are loaded.
This results in following crash:

```
Trying to set result to failed (AssetsLoadingError: The loading of /web/assets/3949-d14fea7/mail.assets_emoji.min.js failed
    at HTMLScriptElement.<anonymous> (http://127.0.0.1:8069/web/assets/3709-a5ab371/mail.assets_public.min.js:7008:270)) but found the future settled (<Future at 0x7fee7552a410 state=finished returned bool>)
```

This commit hides the crash in case the loading of emoji fail,
and instead show emoji picker without any emoji.

Fix runbot issue 19877

closes odoo/odoo#116845

Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-03-28 18:45:59 +02:00
Didier (did) a5ca1895ac [IMP] mail: rename partnerRoot to odoobot
`PartnerRoot` is a confusing name for what is in fact what everyone call `odoobot`

closes odoo/odoo#116823

Signed-off-by: Debondt Didier (did) <did@odoo.com>
2023-03-28 17:49:01 +02:00
Alexandre Kühn 72ccd229e9 [IMP] mail: improve message options
- Message options always compact by default
- when compact: "reaction", "reply", "favorite", "more"
- "delete" is shown after "edit"
- dropdown for "more"

Task-2362261

closes odoo/odoo#116029

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-28 16:44:07 +02:00
Alexandre Kühn a99aa4a868 [FIX] mail: allow scroll in activity menu
Before this commit, it was not possible to scroll
inside long activity menu.

Dropdown already manage scroll, so the content should not put
overflow management, to the risk of introducing scrollbar twice
or making content non-scrollable.

Task-3249174

closes odoo/odoo#116815

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-03-28 13:44:06 +02:00
Thanh Dodeur 5f82fc4cc6 [IMP] mail: add the "raise hand" feature to calls
This commit adds a button to the `CallActionList` to signal to the
other participants of the call that one is raising a hand.

This will add a hand icon to the `CallParticipantCard` of the people
with a raised hand and send a notification that is displayed in the
`Call` view (only when in discuss, not in chat windows).

task-3229507

closes odoo/odoo#116658

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-28 13:43:40 +02:00
Géry Debongnie 3db0ad01a1 [REF] web, *: rework webclient cache invalidation system
The web client has a mechanism to invalidate the action and the view
cache: in the basic model (and the relationalmodel), some code is
looking for updates to some specific models (such as ir.actions) and
trigger a `CLEAR-CACHE` event. This event is then listened by the action
and view services to properly clear the caches.  This mechanism was also
used to reload the page after editing a company, or reloading the
currencies after editing some currency.

With this commit, we modify the orm service to trigger an event after
each rpc. This event can then be used by the action/view service, and
also by the currency/company services to perform their specific cleanup.
This work is one step in the future refactoring of the relational model.

closes odoo/odoo#115655

Related: odoo/enterprise#38814
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-27 16:04:58 +02:00
Thanh Dodeur 49ff78711e [FIX] mail: prevents crash in some channelMember inserts
Before this commit, we were trying to access
`channelMember.thread.channelMembers` when inserting a member, but
some inserts come without this key.

A traceback could occur when inserts of `rtcSession` records came
with a `channelMember` with little information on their thread.

closes odoo/odoo#116656

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-27 12:47:23 +02:00
tsm-odoo 89a76ab5aa [FIX] mail: do not return when processing notifications
Before this commit, the `mail.channel/seen` notification handler
would have returned if the channel was unknown.

This is incorrect since it would prevent other notifications from
the same batch from being processed. This commit fixes the issue.

closes odoo/odoo#116518

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-24 19:21:28 +01:00
Pierre Paridans f949217256 [FIX] web,mail,web_tour,test_main_flows,tests: no hardcoded user agent
Main Flow Tour Mobile shouldn't require a specific `user_agent` as it
targets a small screen and not a mobile platform (iOS, Android...).

Actually, during refactoring of the tours (odoo/odoo@3a798039d6),
a confusion was made between the legacy `isMobile`, which represents a
small screen (cf. `env.isSmall`) and `isMobileOS`, which targets
"mobile" platforms (ie. iOS, Android...) independently of the screen size.

This commit applies the proper condition (isSmall) for the tours
management and removes the useless `user_agent` property. It also
removes the logic added to support custom user_agent in the Chrome
automation for testing.

closes odoo/odoo#116186

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-24 09:05:13 +01:00
tsm-odoo b34d0fd7c9 [FIX] mail: fix temporary_id not supported as message_post parameter
Since [1], the `temporary_id` of a message is passed to the
`message_post` route in order to renconciliate the temporary
message on the client side and the real message created by the
server.

This led to crashes when sending message on the chatter because
this parameter was not allowed as a `_notify_thread` parameter.

Since this parameter is highly specific and isn't linked to any
business/model code, this parameter is now passed via the context
thus solving this issue.

[1]: https://github.com/odoo/odoo/pull/116085

closes odoo/odoo#116333

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-24 07:45:01 +01:00
tsm-odoo a6c7739191 [FIX] mail: fix message unread counter
This PR fixes several issues with the unread counter:
- Notifications being considered as unread messages (which is not
the case on the server side which resulted in inconsistencies).
- Counter greater than it should be when the last seen message is
not loaded.
- Messages not marked as read on first thread opening.

task-3239957

closes odoo/odoo#116208

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-24 06:45:56 +01:00
FrancoisGe 2ecfed335d [REF] *: extractProps receive dynamicInfo
Before this commit, the use of multiple <field> with the same name in a
view was not well supported.

Why was this?
Some Field components need to know information related to the <field>
such as context, domain, required and readonly. The solution used before
this commit to access this information is to use the getFieldContext,
getFieldDomain, isReadonly, isRequired functions of the model.
Unfortunately, these only take into account the last occurrence of the
<field> because the model is not aware that the same field is present
several times on the view. The information must therefore not come from
the model. For example, it was not possible to have the same field
twice with 2 different domains. It will use the domain of the last
field for both.

Solution:
We will add the object "dynamicInfo" to the fieldInfo passed to the Fields
extractProps function. This object will contain a getter to get the value
of required, readonly, domain and context for the current <field>.
If a Field needs one of its information, it will just have to get it
from extractProps.

Part of Task: 3179751

closes odoo/odoo#115197

Related: odoo/enterprise#38151
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-24 01:24:48 +01:00
tsm-odoo 08278d582b [FIX] mail: crash when message has no author
This commit fixes a crash that occured when a message has
no author. The author avatar url was assuming an author
would always be given while it is not the case.

closes odoo/odoo#116306

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-23 21:13:05 +01:00
Alexandre Kühn d07f29613d [FIX] mail: emoji picker category selection should not cut emoji
closes odoo/odoo#116254

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-22 21:47:49 +01:00
Alexandre Kühn 9f61697411 [FIX] mail: smaller follower subtype dialog
closes odoo/odoo#116251

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-22 21:47:46 +01:00
Alexandre Kühn 8a2a7f2dd4 [FIX] mail: chatter takes whole width in marketing app
closes odoo/odoo#116249

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-22 20:46:57 +01:00
Alexandre Kühn 5bc42ddc32 [FIX] mail: no member-list and settings buttons on folded chat window
They make sense when the chat window is unfolded,
as it changes the content. But when folded, the buttons have no
visible affect. Better hide them in that case.

closes odoo/odoo#116242

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-22 19:44:44 +01:00
Alexandre Kühn e9db06c106 [FIX] mail: use 24-hour format for squashed message timestamp
closes odoo/odoo#116216

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-22 18:08:59 +01:00
tsm-odoo 7eab007771 [FIX] mail: do not allow click on message delete dialog
Since the discuss refactoring, clicks are not disabled in the message delete dialog.

This commit fixes the issue.

closes odoo/odoo#116215

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-22 17:03:52 +01:00
Alexandre Kühn fb34115b81 [FIX] mail: less spacing in composer suggested recipient
closes odoo/odoo#116213

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-03-22 17:03:49 +01:00