Commit Graph
11595 Commits
Author SHA1 Message Date
Thibault Delavallée e86617fd93 [FIX] mail, sms: respect scheduled_date for notification
When a 'scheduled_date' is given to posting API notifications are delayed.
They are send using a cron running on a schedule model. However SMS are
not respecting this parameter. This is now fixed.

We also use sql.now() instead of datetime.now() when checking notification
delay. This leads to values that are consistent through the transaction
and avoid non deterministic behavior.

This leads to fixing a global mock of "cr.now" that has unexpected side
effects in composer tests. Indeed now that the scheduled notification checks
cursor now instead of datetime now this global mock leads to some notification
not being sent. We now mock cr.now() only for creating records, allowing
to effectively test templates using create_date for dynamic scheduled date
computation.

closes odoo/odoo#150911

Related: odoo/enterprise#55052
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-01-24 23:07:09 +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
Thibault Delavallée 5b4cddb67c [FIX] mail: fix discuss channel accessing members / partners for notifications
Now that code is fixed there are more access to channel members and partners
to send them push notifications notably. Some tests are crashing when public
users access channel pages and perform actions that send push notifications.

Task-3695571
Related to Task-3669738 (Mail: Web Push Models Rename and Fixes)

Part-of: odoo/odoo#150011
2024-01-22 15:56:54 +00:00
Thibault Delavallée 940c168a20 [FIX] mail: respect 'scheduled_date' for push notifications (backport)
Backport of odoo/odoo@1955c55f86

Sending notifications can be delayed by giving 'scheduled_date' as parameter
for notification process. This is used notably when a process in several
steps should wait for some user input before sending notifications e.g.
rating feedback and update done in two steps.

Sending web push notifications should respect this scheduling as already
done by inbox and email notifications.

Task-3695571
Related to Task-3669738 (Mail: Web Push Models Rename and Fixes)

Part-of: odoo/odoo#150011
2024-01-22 15:56:54 +00:00
Thibault Delavallée 4882ef0a58 [FIX] mail: fix discuss.channel notification recipients computation (backport)
Backport of odoo/odoo@24ebd74dc9

Recipients on a channel notification are computed twice: once using an
override of '_notify_get_recipients' that fetches information of mentioned
recipients; once in override of '_notify_by_web_push' to try to add
recipients for push notifications.

However this is not the right way to do it. Everything should be computed
in '_notify_get_recipients', setting the right 'notification_type' and then
let 'notify_by_MEAN' methods deal with their recipient input.

In this commit we now correctly compute recipients on a given channel
  * mentioned partners;
  * unmuted members on chat channels (push);

Task-3695571
Related to Task-3669738 (Mail: Web Push Models Rename and Fixes)

Part-of: odoo/odoo#150011
2024-01-22 15:56:54 +00:00
Thibault Delavallée e3aa094802 [FIX] mail: fix discuss.channel sending two times push notification (backport)
Backport of odoo/odoo@f312762c6a

'_notify_thread' calls '_notify_thread_by_web_push'. There is therefore no
need to call it once again in discuss.channel override of '_notify_thread'.

Task-3695571
Related to Task-3669738 (Mail: Web Push Models Rename and Fixes)

Part-of: odoo/odoo#150011
2024-01-22 15:56:54 +00:00
Thibault Delavallée 13b80af02e [FIX] mail: fix discuss.channel override of '_notify_get_recipients' (backport)
Backport of odoo/odoo@e3125c8389

A lot of keys are missing compared to standard '_notify_get_recipients'.
This is done in two methods that are updated to include keys defined
in 'MailFollower._get_recipient_data()' that contains the reference
structure to return.

Task-3695571
Related to Task-3669738 (Mail: Web Push Models Rename and Fixes)

X-original-commit: 7a46a957764aa5ee97a0a183fa1b747de85ff8ac
Part-of: odoo/odoo#150011
2024-01-22 15:56:54 +00:00
Thibault Delavallée ff60189b5f [IMP] mail: add an helper for notification scheduled date
Just extract some code we should otherwise copy in both mail_mobile and
mail_enterprise.

Task-3695571
Related to Task-3669738 (Mail: Web Push Models Rename and Fixes)

X-original-commit: a6b0e88d00e1dcd4abbc1e37d62d65063c6956de
Part-of: odoo/odoo#150011
2024-01-22 15:56:54 +00:00
Pierre-Yves Dufays 427e20129b [FIX] {test_}mail: set automated flag to False for activity scheduled manually
How to reproduce:
- Install contacts
- Go to any contact
- Schedule an activity on the contact by clicking on "Activities"

The flag automated of the created activity is set to True which shouldn't be
the case (you can check either in the DB or by adding the field with studio).

The same happens when scheduling plan, scheduling activities on multiple
records in the view list or a plan on multiple records.

This fixes the problem by modifying the activity schedule wizard so that it
always creates activities with automated flag set to False.

Note that that flags is used to distinguish activities created manually from
those created automatically. Some flows automatically cancel automated
activities (e.g. cancel 'validate my ticket') but those should probably not
cancel user defined activities (e.g. 'ask customer to pay'). That's why we must
ensure that activity created manually have that flag set to False.

Task-3691827

closes odoo/odoo#149965

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-01-22 14:25:17 +00:00
Thibault Delavallée 5acfd69e0e [FIX] mail: allow complete email for default from
Default_from on alias domain is currently managed like bounce or catchall.
We consider it is always only a left-part of an email address that should
be completed with alias domain name.

However and notably at migration default_from could contain a complete
email address. In that case better be defensive and keep the domain part
of the value.

Task-3690919

closes odoo/odoo#149887

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-01-22 09:08:48 +00:00
Thibault Delavallée 313c5c10cd [FIX] mail: do not crash when redirecting to non thread records
'_redirect_to_record' is used notably when accessing 'mail/view' controller
used notably with email notifications ('See Document' link). In order to
try to avoid multi company issues a call to '_get_mail_redirect_suggested_company'
is performed in order to find the record's preferred company.

However it is defined on 'mail.thread' which means the redirect crashes if
invoked using a non thread record. This is quite rare but may happen with
models using a mailgateway implementation similar to 'mail.thread' without
inheriting from the mixin (see 'mail.group' model added in Odoo 16).

This limitation is present since a long time but is now more present since
odoo/odoo@f4523fcd92 .

Task-3689459

closes odoo/odoo#150309

X-original-commit: 9a366dcdb789d0f160871ee4d29a463e2641ca26
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-01-21 14:35:30 +00:00
Odoo Translation Bot 95a4b6dfdc [I18N] Update translation terms from Transifex 2024-01-21 00:17:03 +01: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
tsm-odoo cfea1ace7a [FIX] mail: fix ptt extension not working after worker wake up
The Ptt extension makes use of the `chrome.session` API to keep track
of the connected clients. Before this PR, the session storage was
initialized at the top level of the background script. This is an
issue since it will be executed after the service worker wake up thus
overwriting the existing client map. This PR removes this

closes odoo/odoo#150084

Initialization: the map will be created when needed instead.
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-20 02:43:04 +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
tsm-odoo 4380131b52 [FIX] mail: fix non deterministic retry loading messages test
Before this PR, the "Retry loading more messages on failed load more
messages" test was sometimes failing. This test uses the `afterEvent`
helper to wait for the load message event to occur. This is too
technical and not reliable: this test just ensures that clicking on
the retry button after failing to load more messages work as expected.
This PR simplify this test and make use of the `contains` helper which
is more reliable to do so. First, 30 messages are loaded, then the
retry button appears and finally, clicking on the retry button should
load 30 more messages for a total of 60.

fixes runbot-53201

closes odoo/odoo#150012

X-original-commit: 6c1f3f0a24913484042148b7101ec6a628d5b8be
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2024-01-19 23:00: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
nda 64c995384d [FIX] mail: use chatter on archived record
The webclient returns a message "server error" if you add an attachment or send
a message on an archived record chatter.

steps to reproduce:
- archive a record (ex: a partner)
- send a message on the chatter or add an attachment

before this commit:
- a popup error is raised "server error"

after this commit:
- the chatter is working properly on archived records

opw-3689169

closes odoo/odoo#149862

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-18 21:49:42 +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
Florent de Labarre 05be66a416 [FIX] mail: time to unlink record is so long
In large database, the time to unlink a sale.order (or any record with mail.thread) can be take 1 seconde.

After it is so fast.

closes odoo/odoo#149296

X-original-commit: 6bd9f408a18c019416b5bd981de50b54432f5690
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-16 13:15:21 +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
bve-odoo 72c1a4f96a [IMP] *: replace type where possible
do not compare types, for exact checks use `is` / `is not`,
for instance checks use `isinstance()`Flake8(E721)

Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-11-07 17:09:34 +00:00
Odoo Translation Bot b81790505b [I18N] Update translation terms from Transifex 2024-01-14 00:16:26 +01:00
miad-odoo 09f1b940e3 [FIX] mail: redirect with cid when not logged in
A model can specify a preferred company (cid) when redirecting someone from a mail
link.

Before this commit, this cid was taken into account when redirecting only if the
user is logged in.

With this commit, even if the user is not logged in, the redirect link will take
that preferred cid into account.

opw-3613144

closes odoo/odoo#149254

X-original-commit: e70a27d820d94dba7e8c45865ddc5fbc46f9f26f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Adrien Milis (miad) <miad@odoo.com>
2024-01-12 16:12:51 +00:00
std-odoo 55a3a17090 [IMP] base: use the notification email by default for miss-configured database
Purpose
=======
When a database is miss-configured, we have no other choices to
potentially spoof the FROM. We decided that a better heuristic would
be to use the notification email instead of the user email.

Task-3645895

closes odoo/odoo#149189

X-original-commit: eae9214ade8487ac326fc83abe67af53d861e00a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-01-12 16:12:47 +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
Thibault Delavallée bc95b89d2d [FIX] mail: correctly escape / encode HTML when updating content
Fix various use case of HTML encoding / escaping in mail flows. Depending on
functional flow HTML entities could appear as they were not correctly
managed as valid HTML.

Notably when managing attachments in '_process_attachments_for_post' we
should return Markup-ized HTML to be sure it is considered as valid in
other post processing.

Task-3675159 (Mail: correctly escape HTML when updating content)
Task-3619348 (Mail: propagate markup flag when processing attachments)

closes odoo/odoo#148769

X-original-commit: f4bf63077d4129807e00e15b833e47623869491f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-01-10 10:28:21 +00:00
Zelong Lin 1374eab6b7 [IMP] mail: more reliable tests
The problem was the hard coded `@Mitchell Admin` in the expected result.
The case can be different when the demo data changes.

Change the test and make it fixed in all cases.

closes odoo/odoo#148710

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-10 10:28:12 +00:00
TSO 236b0944ed [FIX] discuss: update SFU bundle to v1.1.0 (simulcast)
This commit adds the simulcast feature to calls when relayed by an odoo
SFU server, this allows for better bandwidth management by scaling down
resolution instead of losing packets.

closes odoo/odoo#148276

See: https://github.com/odoo/sfu/releases/tag/v1.1.0
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-10 10:28:10 +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
Didier (did) d507be4bf1 [FIX] mail: guest search error
Before this PR, I guest searching in discuss would get an access error.
This is because the search is searching in the attachments that the guest can't
access.

task-3637314

closes odoo/odoo#146110

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-08 20:38:00 +00:00
Odoo Translation Bot 0e23020b84 [I18N] Update translation terms from Transifex 2024-01-07 00:23:19 +01:00
Martin Trigaux 9a666bc8f0 [I18N] *: export 17.0 translations
There were a few errors

closes odoo/odoo#148315

Related: odoo/enterprise#53724
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2024-01-05 15:14:38 +00:00
Julien Carion (juca) c5b19f1765 [FIX] mail: replace overlapping shortcut in activity dialog
This commit simply replaces the shortcut for the action_done_schedule_next
buttons from alt+q to alt+z in the activity view dialog because the
alt+q shortcut is already used for the Save/Schedule buttons. This was
already done in https://github.com/odoo/odoo/pull/145738 but the wizard
which appeared in 17.0 hadn't been corrected.

opw-3565747

closes odoo/odoo#148160

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2024-01-05 06:47:14 +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