Commit Graph
11490 Commits
Author SHA1 Message Date
Thibault Delavallée 94dc448577 [IMP] mass_mailing: improve some test tools and logs
Move '_create_mailing_list' as a base mass mailing tool to make it easily
usable by most mail-related test addons.

Improve '_filter_mail' tool by allowing to give an additional 'email_from'
used to filter emails produced under a mock. When having similar records
mailed several times (e.g. several mailings triggered at the same time which
may happen for marketing automation tests) it eases finding the right email
linked to a given mailing / recipient.

Improve some logs to ease debugging, notably for marketing automation.

Task-3506681 (MA: Test cleanup)
Prepares Task-2981581 (MA: Fix trace duplication and various issues)

X-original-commit: aad84dda189e13d76a87e349a7d56d84e584879c
Part-of: odoo/odoo#143088
2023-11-30 10:13:15 +00:00
Sébastien Theys 766226df0b [FIX] mail: load data and message only once per chatter load
Basing RPC purely on OWL rendering cycle is a bad idea, as anything can
happen at any time, outside of our control in a complex application.

Controls to (re)load is completely moved up to the form controller,
which is closer to functional changes.

This will fix an issue where `register_as_main_attachment` is called
multiple times, sending the same invoice to OCR multiple times.

closes odoo/odoo#143867

Related: odoo/enterprise#51670
Signed-off-by: Didier Debondt (did) <did@odoo.com>
2023-11-30 07:37:12 +00:00
Alexandre Kühn 0c998ef1cd [PERF] mail: faster load of discuss at init messaging
- Messaging menu was slow when there are many mail failures
- Discuss app is slow whenever there are many pinned threads
- Initial page load was slow when pinned threads were group chats
  with hundreds of members

All these performance issue come from aggressively eager call
to reactive callbacks, which `onChange()` and `compute()` were
relying on.

This commits fixes the performance issue with:
- Update cycle in `@mail/record`, which calls eager computed fields
  and onChange at the end of an update transaction in discuss models,
  so that computation is called only once rather than many times
  (while only the later value matter)
- Add support for lazy computed fields (which they are by default),
  so that computed fields are only computed when needed.
- Add support for sorted many fields, which also follow the update
  cycle and eager/lazy mode of field. This makes sorting operation
  on many fields efficient and preserves eventual correctness of
  expected order of items in these relational fields.

With module `contacts` installed and populate `--size="medium"`,
init_messaging and mail_failures took 12sec. for Mitchell Admin.
With this commit, this has been reduced to 1sec.

closes odoo/odoo#143382

Related: odoo/enterprise#51410
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-11-28 21:21:04 +00:00
maad-odoo 706f329f55 [FIX] mail: traceback on disabling the subscription
Before this commit:
When a user removes Discussion subtypes, the thread is automatically
deleted and also its relational field. Subsequently, a getter
method responsible for retrieving the name to generate the title
fetches it from the 'partner' _field, which is now undefined,
leading to a traceback.

Desired behaviour after this commit:
Saving the 'name' in the state will enable the getter to retrieve the name
even after the record is deleted.

task-3590756

closes odoo/odoo#142643

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-28 21:20:55 +00:00
Kartik Chavda 20ddb74a8a [FIX] mail: fix activity view domain on reload
Steps:
- Install project app.
- Go to task view from specific project.
- Open activity view.
- Set an activity on any task.
- Click on "Schedule Activity" button.

Issue:
- User able to select all tasks instead of tasks from
that specific project as it is working for first time
user opens that view.

Cause:
- Domain of `SelectCreateDialog` became empty when
load calls from other activity view actions.

Fix:
- Pass props in load method call to have default data as
it is when calling load method.

task-3293310

closes odoo/odoo#143721

X-original-commit: fd96a43af96ef6706680a97d19a184c6e4aad6fb
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Kartik Chavda (kcv) <kcv@odoo.com>
2023-11-27 09:51:12 +00:00
tsm-odoo 8e52f40f59 [FIX] test_discuss_full, *: decouple tests from demo data dependency
*: website_livechat.

closes odoo/odoo#143645

X-original-commit: 9643717d911c31f150adab5b699ec7b9219f8981
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-11-27 08:39:49 +00:00
Odoo Translation Bot 3ffba892de [I18N] Update translation terms from Transifex 2023-11-26 00:20:02 +01:00
Sébastien Theys 1c7b149aa7 [FIX] mail: fix load older/newer init value and preview fetch
The issue is that "load older" was called every time the thread was made
visible, in particular after chat window unfold.

The load more button will naturally be visible when first loading a
thread, it only makes sense to check its final visibility and not
intermediate steps.

But there was a bug where the loading mechanism was relying on the
initial "load older" to fetch messages, because the messaging menu
preview was incorrectly setting the thread as already loaded, when it
just fetched the last message.

Moreover, the "last message" displayed in the preview was not correctly
computed, and it could end up being the last "currently fetched" message
and not the last of all messages (when jumping in the past), and it
could also be a non-persistent message.

runbot-35533

closes odoo/odoo#143129

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-25 01:23:19 +00:00
Jorge Pinna Puissant ee0b81b06d [FIX] mail: scroll-down to older messages
- Open a record with the chatter (a task for instance);
- Zoom your browser until the chatter is inline with the task (as it is
  the case on mobile)
- Write a big message.

Before this commit, the composer takes all the allowed place on the
screen, and we cannot see or scroll-down to the older messages.

Now, the behavior is the same as is done in mobile, the composer stays
sticky, but it will not take all the allowed place, and leave place to
see and scroll-down the older messages.

opw-3593032

closes odoo/odoo#143427

X-original-commit: 26e8c0a74b9f0adb728c1d76ec7f45ec12623f6c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-24 23:57:31 +00:00
tsm-odoo 999277cafb [FIX] mail: do not fold chat window when hiding it
Currently, a chat window is folded when hidden and the server is
notified. This is incorrect and leads to useless rpc calls/undesirable
fold state. A chat window is only hidden when space is lacking to display
them all. Only a user interaction should be able to fold a chat window.

Since folding the chat window when hidden is an implementation detail
only used to show the chat window header in the hidden windows dropdown,
this PR removes this behavior and adapt the hidden windows menu to
achieve the same result.

Steps to reproduce the issue:
- Go to Odoo, resize your browser so that it can only fit 2 chat windows.
- Open two chat windows, server is notified twice: so far so good.
- Open another chat window: server is notified twice: this is not correct,
the server should only be notified of the newly opened chat window.
- Reload the page: the server is notified once for each window not fitting
in the screen, this is incorrect as well.

task-3600480

closes odoo/odoo#143438

X-original-commit: 27f09bfc5049b1350b7e940a7beef92f63799771
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-11-24 06:53:36 +00:00
tsm-odoo 2eac72adca [IMP] mail: add ptt extension for chromium-based browsers
Currently, discuss push-to-talk only works when the browser has focus
because key events are not fired otherwise.

This commit adds an extension for chromium-based browsers that allows
to register a system-wide push-to-talk shortcut and adapts the rtc
service in order to listen to the extension events.

closes odoo/odoo#140752

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-11-24 06:53:28 +00:00
Zelong Lin 5d99de10ec [FIX] mail: do not reload chatter when not needed
This RPC /mail/thread/data is called on every
form view change, even when not saved.
It comes from the chatter onWillUpdateProps
and calling `load` then `fetchData`
We don't want to reload chatter when every time props updates.
Do it when the record `onWillLoadRoot`

closes odoo/odoo#140662

Task: 3569123
Related: odoo/enterprise#50607
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-11-23 17:50:37 +00:00
Sébastien Theys 544e094384 [IMP] mail: improve existing populate, add mail.notification
- add populate for mail.notification
- add batch processing and logging for a more pleasant waiting
- adapt existing numbers to find a better balance between usefulness of
  data and waiting time

closes odoo/odoo#142734

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-22 11:44:46 +00:00
Sébastien Theys c7b53b8f68 [FIX] mail: batch _inverse_notification_type
This makes the "medium" populate of `res.users` take few seconds rather
than 2min30 on my machine.

The issue was that `write` (not in batch) is calling
`_subscribe_users_automatically` not in batch, which is particularly
slow.

`discuss_channel_nosubscribe` is removed because it was uneffective. The
condition was only on create, but the group change in
`_inverse_notification_type` was systematically triggering the
auto-subscribe outside of create anyway, which is what we want.

Part-of: odoo/odoo#142734
2023-11-22 11:44:46 +00:00
Sébastien Theys b316f9fc9a [FIX] mail: can open messaging menu if messaging is not initialized
closes odoo/odoo#142970

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-22 00:46:21 +00:00
Sébastien Theys 2120485e27 [FIX] mail: fix all known scroll issues
Completely rewrite the 3 scroll hooks into a unified version that
doesn't have conflicting and overriding conditions.

- re-apply scroll (bottom in particular) when images are loaded
- restore auto-scrolling to newly posted message
- don't do any scroll save/restore before the thread is loaded
- don't snapshot before the thread is loaded
- don't snapshot after patch
- fix condition for detecting when to restore snapshot
- don't apply scroll multiple times for highlight

Follow up of https://github.com/odoo/odoo/pull/141999/
Only breaking after https://github.com/odoo/odoo/pull/136539
Also follow-up fix of https://github.com/odoo/odoo/pull/127889/

runbot-39172

closes odoo/odoo#142308

Related: odoo/enterprise#50931
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-20 17:14:20 +00:00
Odoo Translation Bot f6fe982853 [I18N] Update translation terms from Transifex 2023-11-19 00:28:08 +01:00
Alexandre Kühn fbcab1fccc [FIX] mail: missing spacing in Messaging Menu 'New Message'
Follow-up of [1]

PR above made several improvements to Messaging Menu, especially
in mobile.

By mistake, it removes the spacing between "All"|"Chats"|"Channels"
and "New Message" in desktop.

This commit re-adds this spacing with `div.flex-grow-1`.

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

closes odoo/odoo#142186

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-11-15 15:03:58 +00:00
tsm-odoo c9b72f09d8 [FIX] bus: fix im status not updating
Odoo periodically updates the user online status. This is
done every minute and is throttled in order to ensure it won't
be triggered more than it should.

Since [1], the underscore `throttle` function has been replaced
by the `throttleForAnimation` function. This is not equivalent:
the function won't be triggered if there is no animation which
result in an outdated user status.

This issue was highlighted by the live chat: the button does
not show up when there is no available operator.

Steps to reproduce the issue:
- Log in on Odoo with live chat installed
- Go to a web page that uses the live chat widget
- Wait more that one minute and refresh the page
- The live chat button is not shown anymore: the only
operator is considered as disconnected.

This PR fixes that issue by re-introducing the underscore
throttle function: it is robust and can be needed, not all
throttles are linked to animations.

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

opw-3578517

closes odoo/odoo#142160

X-original-commit: f64a7cbad3dee3ffc365b931306b1c13c8bff536
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-11-15 13:56:35 +00:00
tsm-odoo f5e0ca51de [FIX] mail: fix dropzone background for live chat
Before this PR, the dropzone background was not showing on
the embed live chat. The dropzone is displayed as a `main
component`. In the Odoo frontend, the main component container
is displayed outside of the live chat shadow dom, where the
`bg-view` class is not available. This commit replaces this
class by the `bg-100` one that is almost the same and available
in the frontend.

task-3595537

closes odoo/odoo#142055

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-15 11:26:07 +00:00
Nasreddin Boulif (bon) 4c38507c03 [FIX] mail: don't apply system timezone on tracked date value in chatter
Steps to reproduce:

  - Add a date field in a model with `tracking=True`
  - Log with a user with timezone set to UTC+2
  - Create a record and set the date field to any date.
  - Update the date value to another date
    (Should have logged a message in the chatter with changes)
  - Log with a user with timezone set to `America/Los Angeles`
  - Check the chatter of the record created above

Issue:

  New date value displayed in the chatter is wrong (set to one day
  before).

Cause:

  The value displayed in the chatter is the date value converted first
  as datetime (with Luxon library), then the system timezone is set on
  it and therefore might change the day.

Solution:

  Use `deserializeDate` instead, who has the same computation as
  `deserializeDatetime` (with the sole difference of date vs datetime)
  and therefore will not apply a timezone on the date.

opw-3427502

closes odoo/odoo#142034

X-original-commit: ca3254f8c7700fe78053072710f0c57fee60af5b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2023-11-15 09:07:59 +00:00
Sébastien Theys d3b7ff500b [FIX] mail: fix race condition in load_message_order
- adapt test to ensure consistent (scroll) state at each step

The issue is hard to reproduce, so the complete resolution of the issue
is not guaranteed, but the current change should do the job, and if it
doesn't, it will help to pinpoint the issue.

Estimated issue: the thread doesn't load more messages when scrolling to
bottom because the scroll to bottom is overriden by the auto-scroll top
when clicking on pin. Adding extra wait point should solve the issue.

runbot-24512

closes odoo/odoo#141999

X-original-commit: 477b1c3aa1da7261273341338f3d37ee828715f8
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-11-14 15:16:08 +00:00
Didier (did) cfeef1472f [FIX] mail: cache online and offline getter
Before this PR online and offline cache getter where called when not needed.
This PR move the code inside the onWillRender hook to cache the results and
avoid useless computation of getters.

task-3572093

closes odoo/odoo#141750

X-original-commit: 57aa00893cc47456d5eb39f429c83c4069ab0d7e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-13 13:20:11 +00:00
Odoo Translation Bot b61c1ac0b3 [I18N] Update translation terms from Transifex 2023-11-12 00:21:23 +01:00
Odoo Translation Bot 593ac17031 [I18N] Update translation terms from Transifex 2023-11-09 11:30:34 +01:00
Louis (wil) 68b4dfc2bb [I18N] *: import translations
closes odoo/odoo#141655

Related: odoo/enterprise#50484
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-11-08 20:48:14 +00:00
Didier (did) bcf64fa885 [FIX] mail: mark as read can ignore 404 error
404 means that the thread was deleted

Task-3577083

closes odoo/odoo#141372

X-original-commit: 6aeb00d7e3b60f9eb0cb968fe16ba1a333076ec3
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Didier Debondt (did) <did@odoo.com>
2023-11-08 01:21:58 +00:00
Didier (did) b160005840 [FIX] mail: reset bus notification before testing
Before this PR, bus notification was not reset before testing the bus
notification of link previews.

https://runbot.odoo.com/web/#id=28333&view_type=form&model=runbot.build.error&menu_id=405&cids=1

closes odoo/odoo#141419

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-11-07 23:57:47 +00:00
Didier (did) 4064508af5 [IMP] mail: send cache control header on avatars
Before this PR cache control header for avatar was set to no-cache which is not
the right value.
This PR mark the avatar routes response as immutable when a unique string is
present. We also use the partner write_date as unique string when possible.

task-3551636

closes odoo/odoo#141326

X-original-commit: 3de4f1f1225229cbdb0512df5790ce491f04ea7e
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-11-07 21:02:27 +00:00
Maryam Kia 546f77d1ca [IMP] mail: sharing both screen and camera tests
This commit contains the tests related to the screen sharing at the same time with camera sharing on call

closes odoo/odoo#141275

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-07 21:02:21 +00:00
FrancoisGe 5674e221c4 [FIX] web, *: clicking on a button that crashes does not enabled buttons
In many situations, when you click on a button, you want to disable all
the other buttons while it is running.
Currently, in each of these situations, we duplicate the same code that
disabled all the buttons and enabled them afterwards. Unfortunately, in
many cases, if the code executed crashes, the buttons are not enabled.
In this commit, we're going to create a helper so that we have a single
version of the code that correctly handles crashes. This helper will
disabled all the buttons, then execute the click code and enabled all the
buttons afterwards. If the code crashes, it will also enbaled them.

The problem has been reported for the Settings Form view:
When you edit this view and click save, if an error occurs in the save,
all the buttons remain disabled.

closes odoo/odoo#140938

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-11-07 19:32:17 +00:00
Alexandre Kühn d68488db7d [FIX] mail: several slight messaging menu improvements
Before this commit, the Messaging Menu had the following issues:

- Header is too large;
- Header color in dark theme is too white;
- Important notifications (= needactions) are not highlighted enough
  compared to muted notifications;
- Notification body and title looked too alike;
  => title should be more visible than content
- Mouse-hovering on notification items breaks background-inherit
  style of avatar and IM status;
  => side-effect of `list-group-item-action`
- Desktop: Header items slightly move when changing selection;
  => comes from `fw-bolder`
- Desktop: mark as read button was too small and not visible enough;
- Mobile: too many borders, and they are too strong;
  => undesirable dropdown style
- Mobile: Messaging Menu had poor "New message" button link whereas
  Discuss app has nice "Start a conversation" button;
- Mobile: "Start a conversation" button is not shown on livechat tab;
- Mobile: when menu is open while Discuss app is open in background,
  it's unclear whether the messaging menu is open or not;
  => missing background highlight on Messaging Menu toggler
- Mobile: State of Mobile Discuss App was not synced properly when
  using Messaging Menu at the same time;
  => e.g. unselected tab
- Mobile: Discuss app and Messaging Menu were not properly aligned;
  => Messaging Menu did not offset position based on systray navbar
  height
- Mobile: active navbar item was not highlighted enough, especially
  in white theme;
- "OdooBot has a suggestion" is shown on all tabs instead of only
  in "All" tab like "OdooBot has a request";

This commit fixes all the above issues.
Some styling issues were also affecting the Activity Menu, such as
borders and highlighted open state. This commit applies these
few improvements on the Activity Menu too.

closes odoo/odoo#140405

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-11-07 19:32:15 +00:00
Pierre Rousseau e4b66668e0 [FIX] web: do not use command "set"
In a many2many_tags field with onchange and on a slow network, quickly
add or remove tags several times. Each call to update sends a command 6
(SET) based on the current state of the record (typically here,
the very initial state). For example, if there're 2 tags [1, 2] in the
relation and I add 3, a command 6 with ids [1, 2, 3] is sent. If I
quickly add 4 before the onchange returns, another command 6 with ids
[1, 2, 4] is sent. At the end, 3 would not have been added to the
relation.

With this commit, we don't use the command "set" anymore. Instead, we
use a combinaison of commands "link" and "unlink" to add and remove
records from the relation. This way, we don't need to know the current
state of the record, and we can be sure that the final state of the
relation is the one we expect.

Task-id 3522153

closes odoo/odoo#140644

Related: odoo/enterprise#49995
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-11-07 17:57:14 +00:00
Pierre-Yves Dufays 5415953b21 [IMP] mail: add fallback for not deployed action/view
To avoid crash on possibly not deployed action and related views
(mail.mail_activity_without_access_action), we temporary add a fallback on
existing action and views.

Task-3562098

Part-of: odoo/odoo#139917
2023-11-07 09:19:03 +00:00
Pierre-Yves Dufays bbc1b5c0a6 [IMP] mail: limit performance impact of the systray
To limit performance impact of the systray, we fetch by default only the last
1000 activities. That value can be configured with mail.activity.systray.limit
config parameter. Note that this can also improve a bit the readability of the
other activities view (for the standard activity view a pager is already
present).

Task-3562098

Part-of: odoo/odoo#139917
2023-11-07 09:19:03 +00:00
Pierre-Yves Dufays c5bd3f6b2f [IMP] mail: add custom view for "other activities"
When clicking on "Other activities" in the systray, a list of activities
assigned to the user for which he has no access to underlying record is
displayed. The default list allows to delete, archive, duplicate, ...
activities but what we want is a readonly view. We add here a new view that
doesn't allow any modification on the activities by removing those actions.
Unfortunately, archive and unarchive action is not controllable with an
attribute (nor by setting the active field as readonly in the view), so we
create a very simple extension of the list view to disable it.

We also add in the list view a button to mark an activity as done and a simple
form view to see the details of the activity (note, ...). The "mark as done is
not added in the form view as the activity is deleted causing an error because
the form is still displayed and the record is gone.

Note that those action are only removed from the client but the actions are
not forbidden on the server side.

Task-3562098

Part-of: odoo/odoo#139917
2023-11-07 09:19:03 +00:00
Pierre-Yves Dufays e918146670 [IMP] mail: allow to mark as done activity without record access
When scheduling plans on employees, activities may be assigned to people who
don't have access to the record, but they still need to mark them as done. And
as marking as done (action_done on mail_activity) triggers a message post on
the related record, that action cannot be executed by a user without access to
the record.

We change that here to allow user having delete/archive right on the activity,
to be able as well to mark it as done (as the activity is archived/deleted at
the end of the method _action_done, the user must at least have the right to do
that to be able to mark as done the activity).

Task-3562098

Part-of: odoo/odoo#139917
2023-11-07 09:19:03 +00:00
Pierre-Yves Dufays 54aaf3a0a5 [IMP] mail: display activities without record access in the systray
When scheduling plans on employees, activities may be assigned to people who
don't have access to the record. It was managed locally in HR through a dummy
model aggregating activities. However, it was removed and we replace it here by
a generic solution that adds an entry in the systray: "Other activities". When
clicking on that entry, it displays a list view of the activities assigned to
the user for which he has no access to the related record. Those activities
were not visible to the user before.

Technical note: to allow displaying such records, we have modified the custom
acl defined in python to allow users to read activities assigned to them even
if they don't have access to the related record.

Task-3562098

Part-of: odoo/odoo#139917
2023-11-07 09:19:02 +00:00
TSO bc16aae6e2 [FIX] discuss: rely on streaming state flags instead of streams
Before this commit, we used to rely on duplicates of streams and the
presence of streams to know if a session was streaming.

This commit changes this and make it so that we now use streaming
activity flags instead.

This is a prerequisite for https://github.com/odoo/odoo/pull/132153 as,
similarly to webRTC "unified plan", the SFU keeps the same streams for
the whole lifespan of a connection.

closes odoo/odoo#140053

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-07 04:29:04 +00:00
Didier (did) f09d659a26 [FIX] mail: add missing threadService to mailCoreWeb
closes odoo/odoo#141207

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-06 20:52:29 +00:00
Brieuc-brd 70f853aab9 [IMP] web, mail: adapt "Add a Reaction/emoji" icon
Prior to this commit, "Add a Reaction/emoji" and "View Reactions"
buttons had the same icon, which was confusing.

This PR adapts the "Add a Reaction/emoji" icon to make it more
recognizable.

task-3577008

closes odoo/odoo#140481

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-06 20:52:28 +00:00
Pierre-Yves Dufays 846dd759bd [IMP] {test_}mail, crm, hr{_fleet}: improve plan
We do the following improvement:
- some wording changes
- the activity templates can be edited directly in the list view instead of in
a popup except in hr because sub module add too many field to be edited in
directly in the list view.
- when scheduling a plan, the due date of the created activities are computed
as the plan_date_deadline + activity type delay and if the plan_date_deadline
is not specified, as today + activity type delay.
- there were 2 res_model fields in the mail_activity_plan_view_form that was
causing a selection box to appears on many form where the model shouldn't be
selectable. We remove one of them here.

Task-3558929

Part-of: odoo/odoo#138998
2023-11-06 15:36:45 +00:00
tsm-odoo f10c9114e6 [FIX] mail: fix scroll flicker on thread start
The `onWillStart` hook that was used in the thread component but was
replaced  by the `onMounted` hook. Indeed, fetching the messages in
the `onWillStart` hook was leading to an infinite loop (props updated
as a side-effect of the `onWillStart` hook).

After messages are loaded, the scroll position of the thread is
restored. Since this is done after the component is mounted, another
render is triggered and results in a flicker when opening the thread.

This commit fixes this issue by waiting for the thread to be mounted
and for the scroll position to be restored before showing the message
list.

closes odoo/odoo#141145

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-06 12:32:06 +00:00
tsm-odoo bad8d093f5 [FIX] mail: incorrect message order on previous messages load
Discuss models use relationnal fields. Since [1], the implementation
of the `unshift` method changed for `many` fields. The new
implementation is incorrect: unshifting several records results in an
insertion on the inverse order which differs from the native
implementation.

This issue broke the loading of older messages in discuss: older
messages are inserted with the `unshift` method thus in the inverse
order.

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

closes odoo/odoo#140747

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-06 12:32:00 +00:00
mano-odoo b38d3b837b [FIX] web, mail: searchbar facet cog overlapping
When discuss is not installed, hovering a facet in the searchbar makes
the cog overlap the icon/text.

This is due to the `o-bg-inherit` class which is set in the mail module.
Therefore if discuss is not installed, the SCSS for the background
doesn't exist.

This commit moves the `o-bg-inherit` as a new utility class `bg-inherit`
, allowing it to be used even if no apps are installed.

Therefore also renaming the occurences of `o-bg-inherit` into
`bg-inherit`.

task-3575837

closes odoo/odoo#140334

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-06 12:31:58 +00:00
Odoo Translation Bot 5d2bc9e9b3 [I18N] Update translation terms from Transifex 2023-11-05 00:21:55 +01:00
Sébastien Theys 221b11e7ac [FIX] mail: lazy load message out of focus sound
There is no reason to load this sound until it should be played.

closes odoo/odoo#140900

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-04 03:25:48 +00:00
Sébastien Theys 06603e9dc7 [FIX] mail: show translations for emails
Due to shadowRoot, emails were not properly translated.

closes odoo/odoo#140847

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-03 00:49:06 +00:00
Sébastien Theys 3bf990d0b0 [FIX] mail: allow translating self authored messages
This is an arbitrary restriction and it is confusing to not always find
the button.

Part-of: odoo/odoo#140847
2023-11-03 00:49:06 +00:00
Rahul Prajapati 153d62eaf4 [FIX] mail: rtc session counting in updatertcsessions
Before this commit:

The logic used to count the number of RTC Sessions was incorrect. Which led to
multiple sounds being played sometimes. Etc, on start a meeting

After this commit:

Corrected the RTC Sessions counting logic.

closes odoo/odoo#140628

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-11-02 18:23:14 +00:00