Commit Graph
5042 Commits
Author SHA1 Message Date
Pierre Pulinckx (pipu) 60fe2e9b17 [REF] *: remove _lt()
In a previous commit 8bfa76a, _lt() returns _t().
So, in this commit, all usages of _lt() are replaced by _t().

task-3292454

closes odoo/odoo#130179

Related: odoo/enterprise#44906
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-08-01 13:51:17 +02:00
Leloup Loïc (lole) b3740bc5ce [FIX] mail : fix activitycell date
When on helpdesk app (or any app with an activity view), if you go on the
activity view while having activities due on a previous year it will
cause a traceback "TypeError: date.toLocaleDateString is not a function"

This happens because the function tries to call toLocaleDateString on a
datetime variable, not a date one.

opw-3432005

closes odoo/odoo#130090

X-original-commit: 81ec723b3956f198d5de99a5a4214359f67b8327
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-01 08:39:24 +02:00
Alexandre Kühn d1dbff25eb [FIX] mail: mention suggestions at bottom on editing chatter message
Before this commit, when editing a message in chatter and
typing `@` to display mention suggestions, the list changed
position between `top` and `bottom` based on content size of
suggestion list.

This happens because by default suggestion list in composer are
positioned `top`, as most composers are at the bottom of screen,
and message to be edited are recent messages, which are usually
at the bottom of screen.

Chatter is special in that composer is at the top of the screen,
and recent messages are shown at the top of screen too. The better
position in this configuration is `bottom`.

Condition was on composer being linked to chatter thread, which is
the case when posting a message for the 1st time. While editing a
message however, the composer is linked to a message and not a
thread, therefore the condition `thread?.type === 'chatter'` was
falsy and default position `top` was chosen. Due to position being
a recommendation and placement of composer at the top of screen,
with many mentions it was displayed at `bottom`, and with few
suggestions it changed to `top`.

This commit fixes the issue by relying on the context of the
composer with `env.inChatter`, which covers all chatter used in the
displaying of chatter with composer at the top, including when
editing a message.

closes odoo/odoo#130106

X-original-commit: a03705d0f55e887ec05cb41d7cf86db748f77955
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-08-01 04:32:07 +02:00
FrancoisGe 9d2656720c [REF] *: remove model.notify()
Since the relational model was rewritten (PR 114024), it is now reactive,
so it is no longer necessary to use model.notify() to render the view.

closes odoo/odoo#130058

Related: odoo/enterprise#44781
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-07-31 23:21:18 +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 95914ca844 [REF] mail: move ir.attachment/delete to new service
Part of task-3265211

closes odoo/odoo#129583

Related: odoo/enterprise#44583
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-27 20:32:33 +02:00
Sébastien Theys dd35678563 [REF] mail: move mail.message/notification_update to new service
Part of task-3265211

Part-of: odoo/odoo#129583
2023-07-27 20:32:33 +02:00
Sébastien Theys c3a73a1fdd [REF] mail: move mail.message/toggle_star to new service
Part of task-3265211

Part-of: odoo/odoo#129583
2023-07-27 20:32:33 +02:00
Sébastien Theys 3cbe9d46fc [REF] mail: move mail.message/mark_as_read to new service
Part of task-3265211

Part-of: odoo/odoo#129583
2023-07-27 20:32:32 +02:00
Sébastien Theys 83f8c0864d [REF] mail: move mail.message/delete to new services
Part of task-3265211

Part-of: odoo/odoo#129583
2023-07-27 20:32:32 +02:00
Sébastien Theys d04d64c5ca [REF] mail: move mail.message/inbox to new service
Part of task-3265211

Part-of: odoo/odoo#129583
2023-07-27 20:32:32 +02:00
Sébastien Theys bc2aacd7b6 [REF] mail: move mail.link.preview/delete to new service
Part of task-3265211

Part-of: odoo/odoo#129583
2023-07-27 20:32:32 +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
Sébastien Theys 3cfe5200b2 [REF] mail: move mail.activity/updated to new service
Part of task-3265211

Part-of: odoo/odoo#129583
2023-07-27 20:32:31 +02:00
tsm-odoo 48634b52b0 [FIX] mail, web: fix duplicate rpc when switching record
Since [1], switching from one record to another in a form view
would send two `/mail/messages` rpc. This is due to the
`onWillLoadRoot` hook that triggers a `MAIL:RELOAD-THREAD` event
while the thread is going to change. As a consequence, messages
are fetched for the currently active record and the one that will
be activated.

This PR fixes the issue by ensuring the thread won't change before
triggering this event.

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

closes odoo/odoo#129869

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-27 14:47:42 +02:00
Alexandre Kühn 1cc8f40d74 [FIX] mail: smooth scrolling in mobile messaging menu
Before this commit, scrolling inside the messaging menu in mobile
was stuttering.

This happens because the dropdown is in full screen, and whenever
there's a scroll inside this dropdown menu, the position is
recomputed from internal `usePosition()` hook of `Dropdown`.
The repaint of recomputing this position is costly because of
using `bottom: 0` and having images in notification items that
have transparent background (e.g. chatter notifications).

This commit fixes the issue by defining the height of the messaging
menu dropdown in mobile without `bottom-0`. This drastically eases
the repainting for fixed position. `ActivityMenu` had the exact same
problem, so it is also considered in this fix.

closes odoo/odoo#129859

X-original-commit: 67af0ac45dcea55f52ee7ffbc253827d665d7ac6
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-27 14:47:34 +02:00
Alexandre Kühn 6b2117049c [FIX] mail: no crash when closing chat window from barcode app
Steps to reproduce:
- Open barcodde app
- Go to Operations > Delivery Orders
- Click on avatar button to open chat
- Click on back button

Traceback:
```
Cannot read properties of null (reading 'click')
```

This happens because closing the chat window attempts to
open the messaging menu in mobile. This assumes chat
windows are working in `/web` and the systray is available.
Barcode app is special because it's in `/web` but the systray
is not available.

This commit fixes the issue by opening the messaging menu if it
can, otherwise it silently does nothing.

Task-3439660

closes odoo/odoo#129858

X-original-commit: 399f191dc1bb40d352890607413fa72462f1a99d
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-27 13:25:12 +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
tsm-odoo f2bd7ec027 [FIX] mail: fix link previews overflowing chat window
This PR fixes an issue were link previews could overflow
the chat window.

closes odoo/odoo#129829

X-original-commit: 24de4e1adc9ad427daa7319480fc8004cde626dc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-27 05:18:51 +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
Louis Wicket (wil) 8b5f022a51 [IMP] mail: don't convert iterables to arrays in t-foreach
As of Owl 2.2, it is now possible to use iterable directly in t-foreach
without having to convert it to array first.

This commit takes advantage of this new feature to remove the
unnecessary array conversions from the Discuss code.

closes odoo/odoo#129765

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-07-27 00:55:07 +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
Xavier Luyckx (xlu) 284a0ef4dc [FIX] Mail chatter: fix followers dropdown
Before this commit, the dropdown menu lacked spacing at the top and
bottom when a user clicked on "Followers" in the chatter.

This commit addresses the issue by adding the necessary spacing and also
adjusting the hover state background color (when hovering followers
details and actions) to improve the contrast with the text color.

task-3338438
part of task task-3326263

closes odoo/odoo#129760

X-original-commit: 8f65cd97cd0127e66d51537a5fce835012dca7f0
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-26 16:11:46 +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 2e15b640de [FIX] mail: no empty bubble on editing message with only attachments
Follow-up of https://github.com/odoo/odoo/pull/128650

The edited label is disabled because showing the label introduces
problems that have no good solution with the current implementation
to determine a message is edited.

The label was removed but the condition to determine whether a
message has some text content was not updated accordingly.
There was a special condition for showing "(edited)" label when
a message is edited to remove the text content but has some
attachments. Since the label is no more, the presence of text
content is the only thing that matters for this getter.

closes odoo/odoo#129692

X-original-commit: c53e3e73978f7c25c457a0ad19798566f59c7864
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-26 09:22:33 +02:00
Alexandre Kühn 9559b113dd [FIX] mail: show message action list next to attachment
Before this commit, when a message had no text, the action list was
placed above the message content, including attachments.

This made it hard to find the action list for these messages, as
all action lists of any messages are expected to always be next to
the 1st line of the message content.

This commit fixes the issue by placing action list next to text
content if there are any (same as before), but if there are no text,
then the actions are displayed next to attachments.

The template requiring defining a shared container for text content
and attachments, so that action list comes after. Also when the
message has some text and some attachments, the action list is still
expected to come inline of text content, which is why this commit
conditionally places the action list accordingly.

Part of Task-3340653

Forward-port-of: #128940
X-original-commit: 43699aea88adbdeca43150e9659fc5571de333e0
Part-of: odoo/odoo#129692
2023-07-26 09:22:33 +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
Sébastien Theys 11b6210c65 [FIX] mail: fix activity menu counter
Some groups don't have a total_count, ignore them to avoid NaN result.
This is the case of calendar meeting in particular.

closes odoo/odoo#129358

X-original-commit: f29c4f905a557bef1120ea6ea8af2edf3af93489
Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-24 21:27:27 +02:00
Aaron Bohy c80f76da56 [REF] web: specialize useModel for sample data
Before this commit, there was a hook, named useModel, which eases
the use of a model in views. The main (and almost only) role of the
hook was to deal with sample data (determine whether or not they
can be enabled, fallback on the sample orm when necessary, leave
sample mode at reload...). This hook is used by all views except
form and activity as they do not implement sample data.

This commit renames that hook into "useModelWithSampleData" and
introduces a new hook "useModel", which is a lot simpler that the
other one, as it's only goal is to do the plumbing between the
component using the hook and the model (i.e. spawning required
services and loading the data on willStart and willUpdateProps).
This new hook is used in form and activity views.

Note that useModel doesn't trigger deep renderings, as it is only
used on the RelationalModel which is based on fine-grained
reactivity.

Part-of: odoo/odoo#114024
2023-07-24 20:17:54 +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
Alexandre Kühn 8ed39b9244 [FIX] mail, im_livechat: show livechats in livechat tab in mobile
Before this commit, livechats in mobile were shown in the "Chat"
tab in both discuss app and messaging menu. This is alright, but
there's a dedicated tab for "Livechat", which was empty as a result.

The intended showing in mobile is to keep livechat away from "Chat",
and instead populate the "Livechat" filter.

Task-3430253

closes odoo/odoo#128934

X-original-commit: cf4b72582bbb52c7cd4bc17733f4dbbc84f9b321
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-19 01:54:28 +02:00
Thanh Dodeur 21aef5beb9 [FIX] mail: sets the push-to-talk key events of the call in capture mode
Before this commit, the `keydown` and `keyup` events of the call feature
were in bubble mode, which could prevent them from operating when some
other listeners would prevent the propagation of the event.

Since push-to-talk is supposed to always be usable, the listeners
are now in capture mode.

It was first made apparent with the addition of a `stopPropagation()` in
the `chatWindow` here: https://github.com/odoo/odoo/pull/127638

closes odoo/odoo#128897

X-original-commit: 1466a6bc471ed583966e959b47f10bdc64837732
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-18 19:28:18 +02:00
Sébastien Theys d0de0d19c9 [REF] mail: move createChannelThread to discuss folder
Part of task-3265211

closes odoo/odoo#128799

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-18 19:28:08 +02:00
Sébastien Theys 744cf53146 [REF] mail: move createGroupChat to discuss folder
Part of task-3265211

Part-of: odoo/odoo#128799
2023-07-18 19:28:08 +02:00
Sébastien Theys 397d1d1a53 [REF] mail: move startChat to discuss folder
Part of task-3265211

Part-of: odoo/odoo#128799
2023-07-18 19:28:08 +02:00
Sébastien Theys 1ad9fb496a [REF] mail: move createChannel to discuss folder
Part of task-3265211

Part-of: odoo/odoo#128799
2023-07-18 19:28:08 +02:00
Sébastien Theys d8dde5d425 [REF] mail, im_livechat: init channel and sidebar in new services
Part of task-3265211

Part-of: odoo/odoo#128799
2023-07-18 19:28:07 +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
Sébastien Theys 35aacc530a [REF] mail, im_livechat: remove messaging patch from gif picker
The opportunity is taken to make the feature reactive.

Also fix traceback if favorites can't be fetched from external API.

Part of task-3265211

Part-of: odoo/odoo#128799
2023-07-18 19:28:07 +02:00
tsm-odoo d94fd7ef27 [IMP] mail: introduce action panel
This commit uniformises the different discuss option
panel by introducing a dedicated component.

Before this change, every single discuss panel would
look different: font size/weight, text in lower/upper
case, margins...

Moreover, in the chat window, the close panel button
was absolute positionned which could overlap with the
content of the panel. Moreover, the cross icon looked
strange with the one of the chat window header.

This commit introduces the `ActionPanel` component in
order to solve those inconsistencies and replaces the
cross icon by an arrow left one.

part of task-3332872

closes odoo/odoo#128742

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-18 19:28:01 +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