Commit Graph
4030 Commits
Author SHA1 Message Date
Thanh Dodeur 663db10fe9 [IMP] mail: change the rtc layout system
This commit removes the layout menu, the layout is now automatically
adjusted based on the focused tile and uses a collapsable sidebar.

Layout variables are now located on the callView model instead of
messaging, which means that the presence of video tiles may depend on
multiple views with each their own layouts. It is therefore no longer
possible to rely on the previously global layout state to know if a
stream is viewed and should be downloaded.

closes odoo/odoo#82692

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-10 18:07:00 +02:00
Sébastien Theys e62942a568 [FIX] mail: fix broken attachment reload on upload
Follow up on a35c71690a

closes odoo/odoo#93295

X-original-commit: 28014c97191e28b9db3870cdf4460f4bf243feb5
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-10 14:58:20 +02:00
Sébastien Theys 1bc57cd96e [IMP] mail: move hasParentReloadOnMessagePosted to models
Remove code from legacy form in preparation of Owl form.

Part of task-2871070

Part-of: odoo/odoo#93273
2022-06-10 14:58:12 +02:00
Sébastien Theys 87dc6a035d [IMP] mail: move hasParentReloadOnFollowersUpdate code to models
Remove code from legacy form in preparation of Owl form.

Part of task-2871070

Part-of: odoo/odoo#93273
2022-06-10 14:58:11 +02:00
Sébastien Theys 910ac4caea [IMP] mail: move hasParentReloadOnAttachmentsChanged code in models
Remove code from legacy form in preparation of Owl form.

Part of task-2871070

Part-of: odoo/odoo#93273
2022-06-10 14:58:11 +02:00
Thanh Dodeur 307cec490a [REF] mail: move DOM function to view model
Since the addition of the CallParticipantVideoView model, it makes more
sense to have this view(DOM) related function in it.

closes odoo/odoo#93260

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-10 11:26:20 +02:00
Alexandre Kühn 83cc0b7d2b [IMP] mail: remove useless vars in ChatWindowManager/_computeVisual
Task-2871992

closes odoo/odoo#92913

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-08 18:59:56 +02:00
Nam Dao 01ad802c0b [FIX] mail: dialog create res.partner is not translated
Before this commit:
After the user checked the checkbox in the mail thread, a dialog create res.partner will be shown, the content of this dialog is not translated.
After this commit:
The content of dialog will be translated

closes odoo/odoo#93104

X-original-commit: 759275b913b599bedb2380ec3200671488bfc298
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-08 16:50:50 +02:00
abd-msyukyu-odoo d0f4043e8d [IMP] knowledge: allow to write messages with article read permissions
If a private article is shared with someone which is granted 'read' access, that
someone could not post messages in the chatter.

This commit adds _mail_post_access = 'read' to the model in order to allow
someone with read access to post chatter messages.

Before this change, mail_post_autofollow was always activated with "send
message" in the chatter, and it could cause errors in the following case:
- A user has read access on a record whose model has _mail_post_access = 'read'
  enabled. This means that he can post messages even if he can not edit the
  record.
- If the user sends a message while mentioning someone, if mail_post_autofollow
  is enabled, the server will try to subscribe the recipient to the thread even
  though the sender only has read access to the record, which results in an
  error.

After this change, the chatter will enable mail_post_autofollow only if the user
has write access on the thread.

Task-2858428

X-original-commit: 0c628d63b2d1b64c88c0e72513fad417070569d9
Part-of: odoo/odoo#93088
2022-06-08 15:46:03 +02:00
Alexandre Kühn 922e32b880 [FIX] mail: show popover in discuss public view
Follow-up of
https://github.com/odoo/odoo/pull/92896
Task-2871688

PR above introduced PopoverManager, but forgot to include it in the
public discuss view. As a result, no popover view were working.
For example, clicking on the Emoji button in the composer was not
showing the emoji list in a popover view.

closes odoo/odoo#92950

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-07 13:06:15 +02:00
Alexandre Kühn 315a0d6b5b [IMP] mail: introduce PopoverManager, and some code cleaning
1. Remove useless props category on component `ChannelMemberListCategory`
2. Make fields of model `DiscussSidebarCategory` more declarative,
   i.e. by defining values from compute of field rather than imperative
   code somewhere in the code of discuss.
3. Introduce a new model `PopoverManager`, which eases use of `PopoverView`s
   as they are automatically added in the DOM in a similar way than `Dialog`s
   with `DialogManager` or `ChatWindow`s with `ChatWindowManager`.
   Doing so also make these popover view no longer deep child in component tree:
   this fixes an issue in which popover views could be cut due to DOM tree.

Task-2871688

closes odoo/odoo#92896

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-03 18:34:53 +02:00
Nemael 9830406020 [IMP] mail: introduce EmojiView model
Task-2365687

closes odoo/odoo#92485

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-02 18:58:36 +02:00
Nemael 03dc1bed08 [IMP] mail: introduce Emoji model
Task-2365687

Part-of: odoo/odoo#92485
2022-06-02 18:58:36 +02:00
Alexandre Kühn 299138350d [IMP] mail: introduce ChannelMemberListCategoryView
Task-2831082

closes odoo/odoo#91699

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-02 18:58:31 +02:00
Sébastien Theys 22f52f3700 [IMP] mail: avoid storing model manager in scope that are not cleaned
This will reduce memory leak size in tests. But the proper fix should be lower
level in the code (probably in Owl according to the stack) to ensure unnecessary
references aren't kept anymore.

Part of task-2850875

closes odoo/odoo#90934

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-02 18:58:27 +02:00
Sébastien Theys 094df7528e [IMP] mail: completely clean records after deletion
This will reduce memory leaks.

Side-effect of this PR:

Accessing a field after the record is deleting is no longer supported. It was
never meant to be, but some async code relied on this behavior to check the
(non-)existence of relation fields, with an implicit check on the current record
existence.

-> After this PR, the existence check of current record needs to be explicit,
before accessing any field.

Part of task-2850875

Part-of: odoo/odoo#90934
2022-06-02 18:58:27 +02:00
Zelong Lin ef573c692d [IMP] mail: tracking_val changed display on systray
Display the content of the tracked changes that generate a notification under the systray

task-2369610

closes odoo/odoo#86437

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-02 16:53:59 +02:00
Sébastien Theys d4ad6b9ec1 [IMP] mail: adapt message tests to use real parent (discuss/chatter)
closes odoo/odoo#92327

Related: odoo/enterprise#27976
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-02 14:43:52 +02:00
Alexandre Kühn 106c76c236 [FIX] mail: allow use of raw field command inside FieldCommand
closes odoo/odoo#92644

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-01 15:23:14 +02:00
Alexandre Kühn 669dccddd9 [IMP] mail: introduce Throttle model
Task-2831082

closes odoo/odoo#91502

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-01 15:22:59 +02:00
Hiral Bhavsar a35c71690a [IMP] mail: chatter file drag and drop
PURPOSE

The attachment icon in the chatter is too discrete, a lot of users easily miss
it.

SPECIFICATIONS

- Allow for file upload through drag and drop and the whole chatter.
  It doesn't matter whether the file tray is unfolded.
  Hence, removed DropZone on attachmentBox as now have DropZone on
  the whole chatter.
- On the file tray, rename "Attachments" to "Files" and
  "Add attachments" to "Attach files".
- When there are files attached to the record, display "X files".
- when there is no file yet, display 'Attach files'. Although clicking on it
  opens the file explorer, but doesn't unfold the tray yet. Once the file is
  submitted, the file tray unfolds to show confirmed upload to the user.

Task-2413814

closes odoo/odoo#91335

Related: odoo/enterprise#27763
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-01 14:16:01 +02:00
Alexandre Kühn 7144d2fe7c [IMP] mail: remove useless min-height 0 on DiscussContainer
DiscussContainer is specific component for content of Discuss app
in "whole screen" client action. The parent is not flex, so
it needs `h-100` to take the whole screen.

Consequently, `min-height: 0` is useless, hence this commit
removes it.

closes odoo/odoo#92613

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-01 13:13:59 +02:00
tsm-odoo 7ddcf5d5b1 [FIX] mail: remove useless flex grow class from discuss container
The discuss container used to have a flex parent but hasn't anymore (its parent
is now the actionManagerContainer instead of the discussWidget). The flex-grow
class has now become useless. This PR removes it.

closes odoo/odoo#92597

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-01 12:14:09 +02:00
Rahul Prajapati 222ae02cea [IMP] mail: add hover download button on image attachments
PURPOSE

Improve how image attachments are downloaded from the chatter by adding the
`download` button when hovering image files

SPECIFICATIONS

add a `Download` button (icon) on the bottom right corner of image attachments
on hover

Task-2802810

closes odoo/odoo#92013

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-01 11:02:26 +02:00
Zelong Lin 947770ce7e [IMP] mail, *: display rating in systray
* = im_livechat, test_mail_full

Display the rating changes that generate a notification under the systray.
Using the rating faces to represent the result.

task-2794182

closes odoo/odoo#89537

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-01 11:02:22 +02:00
Alexandre Kühn 18e9076a8f [MOV] mail: rename RTC models (step 2)
- rename 'RtcCallViewer' to 'CallView' (files)
- rename 'RtcActivityNotice' to 'CallSystrayMenu' (files)
- rename 'RtcCallParticipantCard' to 'CallParticipantCard' (files)
- rename 'RtcLayoutMenu' to 'CallLayoutMenu' (files)
- rename 'RtcConfigurationMenu' to 'CallSettingsMenu' (files)

Task-2868876

closes odoo/odoo#92552

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-31 22:56:43 +02:00
Alexandre Kühn 4d14ba8a00 [IMP] mail: rename RTC models (step 2)
- rename 'RtcCallViewer' to 'CallView'
- rename 'RtcActivityNotice' to 'CallSystrayMenu'
- rename 'RtcCallParticipantCard' to 'CallParticipantCard'
- rename 'RtcLayoutMenu' to 'CallLayoutMenu'
- rename 'RtcConfigurationMenu' to 'CallSettingsMenu'

Task-2868876

Part-of: odoo/odoo#92552
2022-05-31 22:56:42 +02:00
tsm-odoo 889eed4a7a [IMP] mail: stop registering chatter container as messaging component
No container should be registered as messaging component. ChatterContainer is the
last one registering itself as such. This PR solves this issue.

closes odoo/odoo#92541

Related: odoo/enterprise#27905
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-31 19:17:49 +02:00
tsm-odoo 89c8abce53 [FIX] mail: correct mistakes introduced with new environment
Some mistakes slipped into the PR introducing the new environment in the discuss
app. This PR fixes those mistakes :

- triggers on this.env.bus that were listen on core.bus
- inconsistent service names between discuss_public_boot/main
- call to Component.env.services.messaging while messaging was available in this.env
- remaining useSubEnv in container that were not needed anymore

closes odoo/odoo#92533

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-31 19:17:45 +02:00
Alexandre Kühn 6da3e22926 [IMP] mail: consistent default visual of thread topbar icon buttons
- Consistent icon color by default (dark grey)
- Hover feedback visual for all buttons
- Rounded border on hover

Task-2860749

closes odoo/odoo#92209

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-31 19:17:41 +02:00
Carlos Valverde 37af093d2a [REF] o-autogrow scss refactoring
This commit deletes the class `o-autogrow` and replaces each instance of
it with a global Bootstrap class.

Task-2833725

closes odoo/odoo#89714

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-30 21:45:13 +02:00
Alexandre Kühn 71d56c9ffe [MOV] mail: rename RTC models (step 1)
- rename 'RtcController' to 'CallActionListView'
- rename 'RtcOptionList' to 'CallOptionMenu'
- rename 'RtcInvitationCard' to 'CallInviteRequestPopup'
- rename 'RtcInvitations' to 'CallInviteRequestPopupList'
- rename 'RtcVideo' to 'CallParticipantVideo'

Task-2867786

closes odoo/odoo#92463

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-30 20:43:48 +02:00
Alexandre Kühn cb53260afb [IMP] mail: rename RTC models (step 1)
- rename 'RtcController' to 'CallActionListView'
- rename 'RtcOptionList' to 'CallOptionMenu'
- rename 'RtcInvitationCard' to 'CallInviteRequestPopup'
- rename 'RtcInvitations' to 'CallInviteRequestPopupList'
- rename 'RtcVideo' to 'CallParticipantVideo'

Task-2867786

Part-of: odoo/odoo#92463
2022-05-30 20:43:48 +02:00
tsm-odoo 3573a7fef4 [IMP] mail, *: use wowlEnv instead of the legacy one
*: bus, calendar, hr, hr_holidays, im_livechat, mail, mail_bot, note, project,
sms, snailmail, test_mail, web, website_livechat, website_slides.

task-2582313

closes odoo/odoo#83774

Related: odoo/enterprise#26493
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-30 19:40:53 +02:00
Brieuc-brd 6c654f774b [IMP] mail: RtcLayoutMenu, adjust indentation
The commit related to the scss revamp
(356c51876e7ad649e0ea89920000e695fe58a2a5) added new elements to the DOM
but without the correct indentation.

This commit adjusts the indentation of the file.

task-2855553

closes odoo/odoo#91551

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-30 15:32:05 +02:00
Brieuc-brd ca4d72bf14 [REF] mail: RtcLayoutMenu, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2855553

Part-of: odoo/odoo#91551
2022-05-30 15:32:04 +02:00
Brieuc-brd db716a54eb [REF] mail: WelcomeView, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2852562

closes odoo/odoo#91285

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-30 14:28:00 +02:00
Thanh Dodeur 15696599a8 [IMP] mail: hide the overlay of the call viewer on mouse leave
part of task-2692836

closes odoo/odoo#92343

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-30 13:24:10 +02:00
Brieuc-brd 6a9b896219 [REF] mail: Emoji, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

This commit also uses padding instead of margin to select emojis more
easily.

task-2856230

closes odoo/odoo#91618

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-30 13:24:06 +02:00
Brieuc-brd 5b80114b63 [IMP] mail: RtcConfigurationMenu, css cross-browser compatibility
This commit improves cross-browser compatibility for the `user-select`
property by adapting the css statement to Safari's Webkit syntax.

task-2853292

closes odoo/odoo#91483

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-30 13:24:02 +02:00
Brieuc-brd b8a888c6b5 [REF] mail: RtcConfigurationMenu, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2853292

Part-of: odoo/odoo#91483
2022-05-30 13:24:02 +02:00
Brieuc-brd 9cf57935e4 [REF] mail: ThreadPreview, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2843449

closes odoo/odoo#90529

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-30 13:23:56 +02:00
Brieuc-brd f6afa8d336 [REF] mail: MobileMessagingNavbar, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2837311

closes odoo/odoo#90162

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-30 13:23:53 +02:00
Alexandre Kühn 4c95e5f753 [FIX] mail: no traceback on change checkbox of suggested recipient
Follow-up of #91671 (Task-2817547)

Changes above fixed an issue with composer suggested recipient
feature not properly prompting a dialog to create new partners.

The fix was correct before #90678 (Task-2831082/Task-2849934), but
it needs to be slightly adapted for this small technical changes.
By omiting them, any change of checkbox state results in a crash.

This commit properly adapt code in `_onChangeCheckbox` to take
into account both changes.

closes odoo/odoo#92408

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-30 12:11:44 +02:00
tsm-odoo a4dc7a3d8e [IMP] mail: wrap top level components into containers
Top level components should always be wrapped in containers since they have to receive
a record comming from messaging. To do that, we need to wait for messaging to be initialized.
In the PR introducing the new environment in the discuss app, some of those components will
be passed to the main_component registry, messaging won't be ready yet. In order to ease the
transition, the last components missing a wrapper have been wrapped.

task-2582313

closes odoo/odoo#92402

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-30 12:11:40 +02:00
Brieuc-brd 255510d10d [IMP] mail: NotificationListItem, css cross-browser compatibility
This commit improves cross-browser compatibility for the `user-select`
property by adapting the css statement to Safari's Webkit syntax.

task-2838625

closes odoo/odoo#90476

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-25 18:00:58 +02:00
Brieuc-brd 105c9dcad6 [IMP] mail: NotificationGroup remove design inconsistencies in mobile
Prior to this commit, there was no mobile layout adaptation on
`NotificationGroup` and this creates some design inconsistencies with
the other components (`ThreadPreview`, `ThreadNeedactionPreview` and
`NotificationRequest`).

This commit fixes these inconsistencies.

task-2838625

Part-of: odoo/odoo#90476
2022-05-25 18:00:58 +02:00
Brieuc-brd 7841e07a57 [IMP] mail: NotificationGroup, ThreadPreview, remove useless css
Prior to this commit, there was still some unnecessary css that was
creating conflicts since the revamp of mixins in `NotificationListItem`
(commit: 7760c54ec09f93488ccb89d2925b6655fdb0092f).

This commit removes this unnecessary css.

task-2838625

Part-of: odoo/odoo#90476
2022-05-25 18:00:58 +02:00
Brieuc-brd b0081b0233 [REF] mail: NotificationListItem, review and simplify mixins
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2838625

Part-of: odoo/odoo#90476
2022-05-25 18:00:58 +02:00
Carlos Valverde 5f8a8838f8 [REF] mail: discuss_sidebar_mailbox scss refactoring
Current SCSS is replaced with global Bootstrap classes, in
order to reduce code lines and to increase performance.

Task-2834810

closes odoo/odoo#90174

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-25 15:53:13 +02:00