Commit Graph
5097 Commits
Author SHA1 Message Date
TSO 820852cecf [FIX] mail: prevent race conditions when a channel is removed in a call
Before this commit, there could be race conditions in which a channel
could be removed while the call was still loading, this commit prevents
this issue.

task-3660964

closes odoo/odoo#149034

Signed-off-by: Thanh Son Dodeur (tso) <tso@odoo.com>
2024-03-01 10:29:36 +00:00
Khushi da287cc2f7 [FIX] mail: activity view model domain
Steps to reproduce:

- Go to activity view.
- Schedule an activity for one record. (Say 8 records are available)
- Schedule an activity for the second time. (Again 8 records are available)
- Try to schedule an activity for the 3rd time. (Only 2 records are available)

Issue:
Since 7682286, the existing props of activity model are being passed as params
while scheduling an activity. Currently, `["activity_ids", "!=", false]` is
being pushed to the domain of activity model in order to display only those
records on which activities have been set. As a result, after you schedule
activities more than once, `["activity_ids", "!=", false]` domain gets applied
and the list of records available for scheduling activity is restricted from
the third time onwards.

Fix:
This commit passes the props from searchModel as params to the 'load' method
while scheduling activity, instead of existing props, to ensure that the
existing params are applied as well as all records are accessible for
scheduling an activity, in `searchCreateDialog`
(i.e.["activity_ids", "!=", false] condition is not added as domain).

Task : 3721750

closes odoo/odoo#155700

X-original-commit: 339df084567206cff8a5487bbe9dec249671244a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Khushi Patel (khpa) <khpa@odoo.com>
2024-02-29 10:34:23 +00:00
tsm-odoo 440e6a5b86 [FIX] mail: fix non deterministic bus subscription test
Before this PR, the `bus subscription is refreshed when channel is
left` test was sometimes failing. This actually reveals a real issue:
if a channel is joined a leave very quickly, the bus subscription is
not updated.

This occurs because we rely on the last subscription made and the one
that should be made to detect if channels differ. Since the
`updateBusSubscription` method is debounced, we can miss information.

This PR replaces the complicated `updateBusSubscription` method by a
`onAdd/onDelete`. This is much more reliable and more efficient since
there is no need to walk through every channel to detect changes.

This PR also remove a test that was redundant that the failing one.

fixes runbot-55292,57645,56232

closes odoo/odoo#155720

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-02-28 19:49:13 +00:00
zel-odoo aa87b65dc8 [FIX] mail: thread search works for all channels
1. channel mention should work for channels, chats, and groups, even if
there is a group restriction for the channel.
2. channel mention in livechat is disabled because the visitor can't get
access to the channel.
3. remove the fetch and search for channel mentions in livechat so that
there is no extra rpc call for unuseful data.
4. add a test for the channel mention in thread.

closes odoo/odoo#155380

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-02-27 17:40:52 +00:00
Rahul Prajapati 96debc0764 [FIX] mail: squashed transient message has date
Before this commit:

Squashed transient messages had date displayed in the sidebar of the message.
This was introduced by this commit: 631ae1c

After this commit:

Squashed transient messages would not have date in the message sidebar.

closes odoo/odoo#154594

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-02-27 14:41:45 +00:00
Sébastien Theys 6ac4cd7d7b [FIX] mail: cache access to newestPersistentNotEmptyOfAllMessage
Store in variable in sort instead of accessing many times (less proxy
get).

closes odoo/odoo#155068

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-02-23 15:13:53 +00:00
Sébastien Theys 93078feeab [FIX] mail: cache access to message_unread_counter
Store in variable in sort instead of accessing twice (less proxy get)

Part-of: odoo/odoo#155068
2024-02-23 15:13:53 +00:00
Sébastien Theys 551e98e9c3 [FIX] mail: cache access to needactionMessages.length
Store in variable in sort instead of accessing twice (less proxy get)

Part-of: odoo/odoo#155068
2024-02-23 15:13:53 +00:00
Sébastien Theys 0681c5b779 [FIX] mail: cache thread isCorrespondentOdooBot
This value is accessed often during sort of messaging menu, so it's
better to not compute it each time on the fly.

- make it a compute
- access correspondent2 to avoid extra indirection
- store in variable in sort instead of accessing twice (less proxy get)

The performance impact is more visible for subsequent sorting, as the
first one benefits less from the cache (when it still has to be built).

Part-of: odoo/odoo#155068
2024-02-23 15:13:53 +00:00
Sébastien Theys 805713d4b7 [FIX] mail: cache the compute of newestPersistentNotEmptyOfAllMessage
This is a complex compute that is better not done every time we need its
value.

Part-of: odoo/odoo#155068
2024-02-23 15:13:53 +00:00
Sébastien Theys b903eb531f [FIX] mail: cache the compute of message datetime
Avoid doing this process every time the datetime is accessed.

It looks like it is already cached with `_datetime`, but it's not
efficient because there are still many proxy get access (which are
costly).

3 proxy access before: getter itself, reading _datetime twice
1 proxy access after: the field itself

Part-of: odoo/odoo#155068
2024-02-23 15:13:53 +00:00
tsm-odoo 49fa5c1f3e [IMP] im_livechat, *: show live chat channels as sidebar categories
*: mail.

This PR removes the live chat sidebar category. From now on, each
channel will have its own category. This is a first step towards
providing an efficient way for operators to join/leave a live chat
channel.

part of task-3640730

closes odoo/odoo#154755

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-02-22 16:23:59 +00:00
Sébastien Theys df8484e833 [FIX] mail: fix performance issue with im status tracking
Move compute of `imStatusTrackedPersonas` to its inverse field. Doing
the compute on the "One" side of the relation prevents from looping and
computing all values whenever there is a change in any of them.

In practice, this reduces the "compute" time of the message fetch (which
also fetch persona as authors of messages), reducing by approximately
half the time it takes to insert these messages (depending on the number
of persona it had to loop through).

For example from 60ms to 30ms on my machine for message insert in
"partner_1_125" (populate medium).

closes odoo/odoo#154918

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-02-21 17:27:50 +00:00
Sébastien Theys c5e5cab080 [FIX] mail: prevent search unexpected load more
Before this commit, if the search result would have "load more", the
extra messages would immediately be fetched, defeating the purpose to
have load more in the first place, and making unnecessary requests.

closes odoo/odoo#154406

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-02-17 00:26:02 +00:00
tsm-odoo 4f0b262dbe [FIX] bus, mail: fix redundant bus subscriptions
Since 16.3, opening the web client on the Odoo backends results in two
subscribe events being sent through the bus websocket.

Discuss listens to the thread changes to know when the subscription
should be refreshed. In order to do so, the last subscription that was
made is kept. This issue is that this subscription is empty in the
first place so the first evaluation always considers the subscription
should be made.

In order to fix this issue, this PR refine the condition to determine
if the subscription should be renewed:
- The last subscription is different from the last one
- The user joined a channel after the bus initialization
- The user left a channel after the bus initialization

In order to test those scenario in a reliable way, this PR also
backports odoo#147455

closes odoo/odoo#154170

X-original-commit: 109b45f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2024-02-15 18:21:31 +00:00
Sébastien Theys 4f2975a662 [FIX] mail: allow mentioning OdooBot
1. Make sure to return archived users in partner format.

2. Remove the condition to check for archived users in suggestion code.

The condition made no sense since the refactoring (that's the opposite
of what we want, and it didn't compare the partner records correctly).

The feature is broken since https://github.com/odoo/odoo/pull/133065/
because it "fixed" the way records are compared. Making the condition we
don't want in the first place actually working and excluding OdooBot
(instead of allowing it).

3. Since archived partners are displayed anyway since the refactoring,
and nobody complained, let's consider it a wanted feature.

Archived partners are given lowest priority and moved to the bottom.

task-3747277

closes odoo/odoo#154078

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-02-15 13:50:49 +00:00
mano-odoo f0a52d2c90 [FIX] mail: revert activity button spacing
In commit[1] we changed the spacing of the activity button to dissociate
it from buttons that are "message/communication" oriented.

This spacing was unwanted so we need to revert it back.

task-3730089

[1]: odoo/odoo@e0491c1a62

closes odoo/odoo#153100

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-02-13 14:14:53 +00:00
Samuel Degueldre 7070925701 [FIX] mail: stop leaking memory in onExternalClick
The onExternalClick custom hook keeps a reference to elements that may
no longer be in the DOM, this can cause entire sections of the DOM that
are no longer needed to be kept in memory, and can also retain the
associated Owl components and their data.

To solve this, we set the downTarget and upTarget to null after calling
the callback. In practice they are no longer used in the code but we are
keeping it for stable compatibility.

closes odoo/odoo#153654

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2024-02-12 22:26:16 +00:00
tsm-odoo 7d18bf0f83 [FIX] im_livechat, mail: broken history navigation
This PR fixes 2 issues with discuss navigation:

1. Broken backwards navigation when going back and forth from the live
chat session history.
2. Broken backwards navigation when trying to access the same thread
than the current one.

Steps to reproduce 1:
- Open the command palette
- Go to the live chat session history view
- Click on one of your channels
- History back => leads to the session history view
- History forward => leads to discuss
- History back => stays on discuss, history is broken

This occurs because the active id is not passed in the action context
when navigating backwards which leads to the URL being pushed again in
history (URL without active id is different). The active id should be
put in the context when available.

Steps to reproduce 2:
- Go to discuss
- Click on the active thread
- History back => stuck on discuss, cannot navigate backwards anymore.

We should not push in history when accessing the same thread than the
current one.

task-3422516

closes odoo/odoo#153094

X-original-commit: 029b79ad7dc28aab83289e7c3ebd4cc0dcc5d609
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2024-02-12 20:24:07 +00:00
Andrzej(pian) 2c1e070ad3 [FIX] mail: Fix thread object transfer to chatter in CRM email preview
This commit addresses a problem in CRM where it was not possible to send emails directly from the preview window.
The issue arose when returning to the chatter interface from the preview window,
as the thread object was not properly passed back (to the chatter).
This fix ensures the thread object is reintegrated into the chatter interface, resolving the email sending issue.

Issue was traced back to the commit
5d99de10ec [FIX] mail: do not reload chatter when not needed
https://github.com/odoo/odoo/commit/5d99de10ec09244e10e4130573ad2e0c38e8600

[reproduce]
- install crm
- create activityTypes AT with an email template specified( crm/configuration/activityTypes)
- open a Lead,  ( crm/sales/MyPiepline)
- schedule activity with activity type AT
- click "preview" on the activity
- click "send" or just close the preview -> BUG traceback
opw-3680600

closes odoo/odoo#152698

Signed-off-by: Andrzej Pietrusiak (pian) <pian@odoo.com>
2024-02-08 10:56:59 +00:00
tsm-odoo d8b294ad96 [FIX] mail, im_livechat: do not start bus for transient threads
Since [1], the websocket worker is started when a transient thread is
added to the mail store. This occurs because this PR introduced a call
to the `addChannel` method of the bus service when the current user
was not member of the thread.

Since transient threads are not yet created, they have a partial state
that does not necessarily include channel members hence the impression
that the current user is not member of the channel.

This PR prevent starting the bus service for transient threads.

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

closes odoo/odoo#153000

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-02-07 11:05:13 +00:00
Nasreddin Boulif (bon) d7fc43df58 [FIX] mail: give additional values for partner creation
Steps to reproduce:

  - Install `crm` module (for test purpose)
  - Create a new lead
  - Set an email address, phone number, company name and contact name
  - Save the lead
  - In the chatter, send a mail (with the default recipient checked)

Issue:

  - The partner has only the email address set (also set as name).
  - The `contact name` on the lead is updated with the partner name
    (who is the email address).

Cause:

  When sending a mail with the default recipient checked, the partner
  is created based only on the email address (therefore, name is same as
  email), and when assigning the new partner on the lead, the
  `contact name` is updated with the partner name (who is the email
  address).

Solution:

  Alter the route `/mail/partner/from_email` and `/mail/message/post`
  so it can take or manage additional values for the creation of the
  partner.

opw-3512045

closes odoo/odoo#152780

X-original-commit: 92916985b72ff1cda2021900f0aa9476f7283576
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2024-02-07 09:18:55 +00:00
Aaron Bohy d1e14994a9 [FIX] *: use correct float formatter
Commit [1] moved (almost all of) the code of formatFloat from
views/fields/formatters.js to core/utils/numbers, to make it
accessible in the frontend. A formatFloat function was kept in
formatters.js to handle the false case, which makes no sense in
number utils, but is useful for fields. However, a lot of imports
have been updated to use the numbers.js instead of formatters.js
(i.e. they no longer benefit from the support of false), whereas
they are actually formatting field values, so they should have
kept using the formatFloat from formatters.js

This commit adapts the places where the formatFloat to use must
come from formatters.js, not numbers.js.

[1] https://github.com/odoo/odoo/commit/054ca0a19aaf297f420a1b478b93ae26f1b943b8

task 3722043

closes odoo/odoo#152810

Related: odoo/enterprise#55919
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2024-02-06 20:16:20 +00:00
Khushi e11e3ca447 [FIX] mail: activity model domain
Steps to reproduce:
Select a document in activity view to get its preview
Click the archive button => traceback

Before this commit:
The 'load' method of Activity Model led to the traceback while attempting
to set the domain of params, when none were received.
(bug introduced by : 7682286)

After this commit:
This issue is resolved by tweaking the code of 'load' method. In case of
default params, it now directly sets a domain, instead of trying to add a
domain to the one obtained in params.

Task ID : 3704340

closes odoo/odoo#152335

X-original-commit: 725ebab1f0c7ffc996414c85fbbd162afc4ecaf5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Khushi Patel (khpa) <khpa@odoo.com>
2024-02-05 18:24:43 +00:00
Sébastien Theys 4006e346f9 [FIX] mail: onAdd/onDelete hooks on many without inverse
The opportunity is taken to fix an issue where removing a record from
assign would not update the inverse.

closes odoo/odoo#152442

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-02-03 06:59:46 +00:00
Alexandre Kühn dca2921252 [FIX] mail: correctly display Logged in as in public page
`getLoggedInAsText` is a function, due to missing brackets
the function content was dumped instead of evaluation of function.

opw-3701333

closes odoo/odoo#151600

X-original-commit: 4ce21a4207a9dd7047a6b5ec9c447f9e48ca199c
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-29 23:16:19 +00:00
Alexandre Kühn 17a3a84aaa [FIX] mail: fold discuss app category when no conversation selected
Before this commit, when no conversation was selected in the
Discuss app, folding a category such as "Channels" results in
a crash.

This happens because `store.discuss.thread` is `undefined`, so it
must be properly guarded in the template of discuss sidebar category.

closes odoo/odoo#150828

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-24 12:30:09 +00:00
Alexandre Kühn e5d7c4fef2 [FIX] mail: squashed message don't grow on mousehover
Before this commit, when a message without bubble layout
is squashed (e.g. with `/who` command twice in a channel),
mouse-hovering on the squashed message pushed increased the
height of the message.

This happens because the sidebar of squashed message contains
the date and it uses 12-hour format with AM/PM.

This design requires cautious use of content in the sidebar,
and had 24-hour format to make it work. A recent refactoring
changed it to 12-hour format as localization was a better concern.
However, the UI is not designed for it, and there's not much value
in having 12-hour format rather than 24-hour format. Indeed,
users assume AM if no AM/PM is shown, except if hour is greater
than 12 which is quite obvious the current time.

12-hour format is best for some users, but we can't have it without
overhauling parts of the UI which is not worth it at the time of
this commit. Therefore using 24-hour format is the better tradeoff.

Also took the opportunity of this PR to better align the date and
seen indicator in squashed message sidebar.

Task-3637270

closes odoo/odoo#150369

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-23 04:41:44 +00:00
Sébastien Theys fa9815afa7 [FIX] mail: fix chatter reaction crash before init messaging
store.self is not necessarily known when the chatter is rendered

closes odoo/odoo#150103

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-20 02:43:06 +00:00
Alexandre Kühn 9b3a0b4aa0 [FIX] mail: no crash on edit message in mobile
Before this commit, editing a message in message in a conversation
and then pressing on the paper plane icon was throwing the following
error:

```
TypeError: null is not an object (evaluating 'thread.model')
@_sendMessage
```

This happens because this button was in "send" message mode rather
than in edit mode. Since we cannot post a message while editing a
message, the crash happens because composer is not related to thread
but the message.

This button is not visible in desktop mode, and user should use
suggested keyboard shortcuts or click on links to either save edit or
discard it. In mobile, these interactions are not intuitive.

This commit fixes the issue by keeping the paper-plane button while
editing in mobile but it acts as "save". The labels to save/discard
was not appropriate in mobile, so it has been turned to a simple
button to discard editing.

opw-3670482

closes odoo/odoo#148918

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-20 02:42:54 +00:00
Alexandre Kühn 8b5f8dea8b [FIX] mail: open chat window from home menu reliably
Before this commit, opening chat window from messaging menu
might not work.

Step to reproduce:
- open Discuss app
- Go to home menu
- Reload the page
- Click on Messaging Menu
- Click on chat item to open chat
=> Chat window is not open

This happens because when in the home menu from Discuss app
in background page reload, the URL contains the Discuss app
menu_id, but the action is "menu" rather the action id. This
difference is crucial to distinct discuss app being actively
open or it's in the background from home menu. The latter
should NOT consider Discuss app being open.

This is not a problem when opening/closing Discuss app, because
the mounting/unmounting of the Discuss app component is good
enough to detect that. However, with page reload, the way to
detect Discuss app being open from URL was only relying on `menu_id`
instead of `action` value.

This commit fixes the issue by checking `active_id` of discuss app
rather than `menu_id`, as `active_id` is 100% reliable whereas
`menu_id` is not. The problem with home menu is one example among
many other cases (e.g. page reload in channel settings form view).

closes odoo/odoo#149969

Related: odoo/enterprise#54638
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-19 05:20:52 +00:00
luvi c1d250fcbc [FIX] web, *: show a dismiss button in the PWA notification
*: mail

This commit fixes the behavior of the notification to install the PWA.
The initial spec was not completely achieved, since the 'Dismiss' button,
using the fa-close icon was not present. See task-3275275.

Now, the button is present, and it can hide the notification and the user don't
need to interact with the installation prompt to dismiss it.

The fix also fixes the behavior of the notification when being used in
an incognito tab. The installPrompt service assumed the PWA could be
installed, since window.BeforeInstallPromptEvent is defined. But in an
incognito scenario, the event was never actually triggered, since the
feature is disabled by the browser.

This could finally create a UX issue if the app had been installed, and the
localStorage cleaned. The notification would appear, but wouldn't do anything
when clicking on the Install button since the event is no longer triggered by
the browser. Now, we rely on the trigger of the event exclusively, except on
Safari, where we rely on the installationState and the standalone display-mode.

Now, the service only set its state when the event has effectivelly been
triggered and the native prompt can be called. Since the UI relies on the
state from the service, the notification is no longer shown.

Tests have been adapted, to dispatch a custom event, allowing the service to be
initialized as if it was in a situation where the PWA can be installed effectively.
A new test have been added to verify the interaction with the close icon.

closes odoo/odoo#149961

Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2024-01-19 01:36:10 +00:00
tsm-odoo 13f4d046f7 [FIX] mail: update html fields according to html insert option
Since [1], the `insert` method accepts the `html` option to
automatically cast record fields marked as `html` to markup. Before
this PR, this option was ignored after the first insertion if the
field value remained the same.

Steps to reproduce this issue:
- Insert a message without passing the `html` option: the body field is
an instance of string.
- Insert the same message setting the `html` option to true: the body
field of the message is still an instance of string while it should be
an instance of markup.

This PR fixes this issue.

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

closes odoo/odoo#149953

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2024-01-19 01:36:09 +00:00
Alexandre Kühn c22fa19636 [FIX] mail: new message notif on channel only with needaction
Before this commit, any new message in a channel of type "channel"
was automatically opening a chat window and showing new message
counter in tab title when out-of-focus.

This behaviour is only intended for important messages. In chat
(group chat, DM chat, livechat), all new messages are considered
as important so this is good. However, for channels, these are
intended for communication with many users, and we only want to
notify on messages that are explicitly flagged as "needaction".
As a reminder, message are needaction through `@mention` or
reply-to for example.

This commit fixes the issue by limiting notifying out-of-focus of
new messages in channel "channel" to only needaction. Also the
auto-opening of chat window as a consequence from this new message
is also limited to needaction messages.

closes odoo/odoo#149943

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-19 01:36:08 +00:00
Alexandre Kühn 9f24bb72ec [FIX] mail: discuss jump to present scrolls reliably
Before this commit, when looking at old messages of a message,
clicking on "Jump to present" was frequently not scrolling to
most recent message.

This happens because loading messages is not immediate, and thread
UI has some heuristics to adjust scrolls that were working against
scrolling to present when the RPC to load messages around present
is not immediate.

This commit fixes the issue by handling the actual scroll to present
in the same workflow as all other scroll adjustments. Also the logic
for adjusting scrolls requires immediate scrolling, hence this commit
has to remove smooth scrolling to comply with current scroll
adjustment techniques.

closes odoo/odoo#149915

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-18 23:10:28 +00:00
sabr 5e38390f47 [FIX] mail: content getting overlap over emoji icon
Steps to Reproduce : 
1. Open Email Marketing
2. Type a long text in the subject line
3. You will notice that the content gets overlapped over the emoji icon

Observed behavior:
content getting overlap over emoji icon

Expected behavior:
the content should be hidden by the emoji icon

Task-3628324

closes odoo/odoo#149918

X-original-commit: 80c96838a4d16a821aaf11e04ca2776f6a884507
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Sanket Brahmbhatt (sabr) <sabr@odoo.com>
2024-01-18 15:12:01 +00:00
Alexandre Kühn 52d34b69d6 [REV] mail: revert fix line break in customer rating feedback
This reverts commit 185adf6fb487fa260bb6dfe985638bc545de7fa2.

The change was made to "fix" line breaks with rating feedback in
helpdesk. However, it's not ok to apply `inline` display layout
for all non-user made message body, as usual block display is
expected for html tags like `<div>` or `<p>`.

The correct fix should be to remove these unwanted `<br>` in the
feedback rating messages. We don't know how they appeared, but
this is a specific minor issue in helpdesk rating, so reverting
the fix is a higher priority.

closes odoo/odoo#149570

X-original-commit: 1ba04da76f391cd4543a8d3b1e6dbecf6a2cb558
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-16 22:40:02 +00:00
mano-odoo e0491c1a62 [FIX] web, mail: increase form view width
Currently the form sheet have a flex-grow-1, the chatter could use less
horizontal space to leave more space for the form sheet's content.

This commit widen the form_sheet by applying a flex-grow-2 and
reduces the chatter's top bar total width by removing the icons and
applying a sup tag on the micro information displayed aside the icons.

Since the icons are removed there is no need to test if the icon is
rendered with it's appropriate text anymore thus we can remove these
two lines. Additionally the `text-warning` on the span was unnecessary
since it's already applied on the button parent. 

task-3641988

closes odoo/odoo#147136

Related: odoo/enterprise#53208
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-16 22:39:58 +00:00
Brieuc-brd 0ef9d5b272 [FIX] web, *: adapt oi-close and corner arrow icons
*: mail, pos_sale, pos_self_order, website_sale

=== `oi-close` adaptation ===
Prior to this commit, `oi-close` icon was based on the default
sans-serif font. Depending on this, there could be alignment and size
inconsistencies with the Odoo UI icon library.

This commit adapts `oi-close` to use a custom icon from the UI icon
library to make it more robust and maintain consistency with this
library.

=== corner arrow icons adaptation ===
Prior to this commit, directional icons related to the four corners were
misaligned.

This commit adapts these four icons so that they are properly aligned.

task-3618046

closes odoo/odoo#144598

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2024-01-16 09:55:22 +00:00
Alexandre Kühn 5912e7b761 [FIX] mail: 'Logged _in_ as' on welcome page
Label of guest name on public discuss welcome page
was gramatically incorrect. It should be "Logged in as"
rather than "Logged as".

Also took the opportunity to properly translate the label.

closes odoo/odoo#149187

X-original-commit: 9463c787e7804e5c2c525b9ecc096ee067f0dd3d
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-12 12:50:36 +00:00
Dhrumil Shah 4a6a893212 [FIX] mail: fix line break in customer rating feedback
In this commit we have fixed the line break issue when we submit a feedback
for task and ticket.

steps:
   - Install helpdesk
   - Go to helpdesk > team
   - Activated customer rating
   - Set the rating template in the ticket stage
   - Create a ticket with the customer and move to the next  stage
   - Open the mail and submit a rating and message
   - Open ticket and check customer message

task-3268763

closes odoo/odoo#148644

X-original-commit: 185adf6fb487fa260bb6dfe985638bc545de7fa2
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-01-10 19:39:28 +00:00
Nasreddin Boulif (bon) bccaced50d [FIX] mail: set default values for suggested_recipients
Steps to reproduce:

  - Install `CRM` module (for test purposes)
  - Create a lead and set the name, email, phone, company name and
    contact name
  - Save the lead
  - Click on `Send message` button in the chatter
  - Uncheck/Check the recipient checkbox
  - Save the partner
  - Discard the changes on the lead and open the partner created

Issue:

  - In the wizard, the `phone` value is not set with default value and
    the name is set with the company name instead of the contact name
  - On the partner created, the company and phone are not set

Cause:

  The default values (used in the partner creation wizard) retrieved
  from "/mail/thread/data" route are not set on the recipient object.

opw-3512045

closes odoo/odoo#148213

X-original-commit: 372fe2fe61e3121b27bf1305dfac8fbf0ff8e9b5
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2024-01-10 19:39:24 +00:00
Didier (did) 3e00a3f633 [FIX] mail: add "To: No recipient" when there is no followers
task-3611153

closes odoo/odoo#148570

X-original-commit: 5f4f89a3573736c70c96e82d4cd12423a94ebb2e
Signed-off-by: Didier Debondt (did) <did@odoo.com>
2024-01-10 07:26:59 +00:00
TSO 09e1040cd1 [FIX] discuss: prevent peer-to-peer update without a RTCPeerConnection
Before this commit, it was possible that an attempt to update
peer connections made right at the moment the connection was swapped
from peer-to-peer to server mode. Which would cause a traceback.

This commit fixes this issue by checking if there is a
`RTCPeerConnection` before trying to update it.

closes odoo/odoo#148505

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-10 06:12:24 +00:00
Alexandre Kühn c755f1763e [FIX] mail: no quick action on attachment on small device
When a message had more than 1 attachment, it was not possible
to preview the attachment on a mobile device.

This happens because the hover buttons for delete/download the
file took the whole clickable area of attachment to see the preview.

To enable quick actions in mobile, this require non-trivial UI
tweaking. To match behaviour of version 16.0, these quick-actions
have been disabled in mobile.

opw-3664795

closes odoo/odoo#148091

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-04 13:54:53 +00:00
Sébastien Theys 44dcc1a35f [FIX] mail: batch insert of fetched channel members
This reduces the time of the method from 400ms to 40ms on my machine.

closes odoo/odoo#147814

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-03 16:59:13 +00:00
Sébastien Theys f9bd7d4c6c [FIX] mail: avoid proxy when calling methods internally
Method lookup also go through the proxy, but these aren't necessary when
finding the method, only when actually calling it.

Part-of: odoo/odoo#147814
2024-01-03 16:59:13 +00:00
Sébastien Theys 403a7c2eb7 [FIX] mail: remove reactive from Model/store internals
Internal code doesn't need to use reactive when reading store or Model,
especially not in `insert` that is not meant to access anything observed
except when actually writing records (in which case `_proxy` is used).

The `get` part of `preinsert` (and its full chain) must be kept with the
full proxy however, to ensure proper trigger of reactive callback when
returned record changes.

Part-of: odoo/odoo#147814
2024-01-03 16:59:13 +00:00
Sébastien Theys de5c0b19ab [FIX] mail: improve performance of im status registration
Forward internal proxy for performance as onUpdate does not need
reactive (observe is called separately).

Part-of: odoo/odoo#147814
2024-01-03 16:59:13 +00:00
Sébastien Theys a4ce01fc0f [FIX] mail: assign localId directly on record
There is no need to go through the proxy to assign localId as nothing
should observe it at this step, and it shouldn't change anyway.

Part-of: odoo/odoo#147814
2024-01-03 16:59:13 +00:00