Commit Graph
9043 Commits
Author SHA1 Message Date
Louis Wicket (wil) e4eeff3d4f [IMP] mail: rename popover view model
Rename javascript model `mail.popover_view` to `PopoverView` in order to
distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81407

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-15 01:03:30 +00:00
Louis Wicket (wil) 1d8da9232a [IMP] mail: rename model model
Rename javascript model `mail.model` to `Model` in order to distinguish
javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81390

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-15 01:03:26 +00:00
Louis Wicket (wil) 9303e896f4 [IMP] mail, *: rename messaging notification handler model
Rename javascript model `mail.messaging_notification_handler` to
`MessagingNotificationHandler` in order to distinguish javascript models
from python models.

Part of task-2701674.
* = im_livechat, website_livechat

closes odoo/odoo#81389

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-15 01:03:23 +00:00
Louis Wicket (wil) e8552668f0 [IMP] mail: rename messaging menu model
Rename javascript model `mail.messaging_menu` to `MessagingMenu` in
order to distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81388

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-15 01:03:18 +00:00
Louis Wicket (wil) c8cfc58ea8 [IMP] mail, *: rename messaging initializer model
Rename javascript model `mail.messaging_initializer` to
`MessagingInitializer` in order to distinguish javascript models from
python models.

Part of task-2701674.
* = crm_livechat, im_livechat, mail_bot

closes odoo/odoo#81387

Related: odoo/enterprise#22889
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-15 00:10:51 +00:00
Louis Wicket (wil) deb12bc032 [IMP] hr, mail, snailmail: rename messaging model
Rename javascript model `mail.messaging` to `Messaging` in order to
distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81386

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-15 00:10:48 +00:00
Louis Wicket (wil) bf297be03a [IMP] mail: rename message view model
Rename javascript model `mail.message_view` to `MessageView` in order to
distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81385

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-15 00:10:44 +00:00
Louis Wicket (wil) b02edc2887 [IMP] mail: rename message seen indicator model
Rename javascript model `mail.message_seen_indicator` to
`MessageSeenIndicator` in order to distinguish javascript models from
python models.

Part of task-2701674.

closes odoo/odoo#81384

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-15 00:10:41 +00:00
Louis Wicket (wil) d7d5d522c2 [IMP] mail: rename device model
Rename javascript model `mail.device` to `Device` in order to
distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81332

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-15 00:10:37 +00:00
Louis Wicket (wil) 4dfec3b8bf [IMP] im_livechat, mail: rename chat window model
Rename javascript model `mail.chat_window` to `ChatWindow` in order to
distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81322

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-15 00:10:34 +00:00
Louis Wicket (wil) 7936173c27 [IMP] mail: rename activity type model
Rename javascript model 'mail.activity_type' to 'ActivityType' in order
to distinguish javascript model from python model.

Part of task-2701674.

closes odoo/odoo#80600

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-15 00:10:30 +00:00
Louis Wicket (wil) c873ea643a [IMP] mail, calendar, website_slides: rename activity model
Rename javascript model 'mail.activity' to 'Activity' in order to
distinguish javascript model from python model.

Part of task-2701674.

closes odoo/odoo#80555

Related: odoo/enterprise#22593
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-15 00:10:23 +00:00
Louis Wicket (wil) a74c67169a [IMP] mail: rename channel command model
Rename javascript model `mail.channel_command` to `ChannelCommand` in
order to distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81320

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-14 22:26:58 +00:00
Louis Wicket (wil) de0eec346a [IMP] mail: rename attachment viewer model
Rename javascript model `mail.attachment_viewer` to `AttachmentViewer`
in order to distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81317

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-14 21:37:13 +00:00
Louis Wicket (wil) ccabe512b3 [IMP] mail: rename attachment image model
Rename javascript model `mail.attachment_image` to `AttachmentImage` in
order to distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81315

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-14 20:42:44 +00:00
Louis Wicket (wil) b403c7e068 [IMP] mail: rename activity box view model
Rename javascript model `mail.activity_box_view` to ActivityBoxView in
order to distinguish javascript model from python model.

Part of task-2701674.

closes odoo/odoo#80605

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-14 19:13:13 +00:00
std-odoo ea5101a4ee [IMP] mail: add capital letters to the "Read More / Less" button
Purpose
=======
In the chatter, when we reply to an email, the parent email is folded
behind a "read more" button. Add capital letters to this button to make
it more visible.

Task-2656302

closes odoo/odoo#80571

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-14 19:13:09 +00:00
Louis Wicket (wil) 1b74cb210e [IMP] mail: rename guest model
Rename javascript model 'mail.guest' to 'Guest' in order to distinguish
javascript model from python model.

Part of task-2701674.

closes odoo/odoo#80547

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-14 19:13:05 +00:00
Louis Wicket (wil) f3e0671a8d [IMP] mail: rename composer view model
Rename javascript model `mail.composer_view` to `ComposerView` in order
to distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81328

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-14 18:22:59 +00:00
Louis Wicket (wil) feb30408cb [IMP] mail: rename channel invitation form model
Rename javascript model `mail.channel_invitation_form` to
`ChannelInvitationForm` in order to distinguish javascript models from
python models.

Part of task-2701674.

closes odoo/odoo#81321

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-14 18:22:55 +00:00
Louis Wicket (wil) 98290450c8 [IMP] mail: rename attachment card model
Rename javascript model `mail.attachment_card` to `AttachmentCard` in
order to distinguish javascript model from python model.

Part of task-2701674.

closes odoo/odoo#80604

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-14 12:40:09 +00:00
Louis Wicket (wil) eb39fbb702 [IMP] mail: rename media preview model
Rename javascript model `mail.media_preview` to `MediaPreview` in order
to distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81373

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-14 11:49:42 +00:00
Louis Wicket (wil) ba097f69e1 [IMP] mail: rename discuss public view model
Rename javascript model `mail.discuss_public_view` to `DiscussPublicView` inorder to distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81346

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-14 10:54:56 +00:00
Louis Wicket (wil) ba6dd459be [IMP] mail: rename dialog manager model
Rename javascript model `mail.dialog_manager` to `DialogManager` in
order to distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81334

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-14 10:54:52 +00:00
Louis Wicket (wil) 17bcfc3fda [IMP] mail: rename chat window manager model
Rename javascript model `mail.chat_window_manager` to `ChatWindowManager` in order to distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81323

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-14 10:54:48 +00:00
Sébastien Theys 71076550de [IMP] mail: add systray item containers
To simplify messaging components in the future, they all need to have a similar
shape. It is done for messaging menu and activity notice in this commit, which
requires to move the waiting on "messaging becoming created" to a parent
non-messaging component.

closes odoo/odoo#80482

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-13 13:17:46 +00:00
Sébastien Theys 8d3a421457 [FIX] mail: manually prefetch needed channel partner in channel info
Before this commit, it would fetch all channels partners of all channels, even
for big channels and for members that were not useful to known anything about.

This commit reduces the number of fetched members to a more reasonable level,
and ensure the formatting of those members is done only once, instead of once
per channel.

Time goes from 90ms to 1ms for 1000s of members in 100s of channels.

Part of task-2702450

closes odoo/odoo#81262

X-original-commit: 89419b593ed163a8b174945e80f1c36c9cf78257
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-13 10:40:43 +00:00
Julien Banken 0040a7b609 [REF] sms,mail: remove no_edit attribute from fields
It turns out that the 'no_edit' attribute of the fields is deprecated
and doesn't do anything (there is no JavaScript or Python code using it).
We will hence remove that attribute from the views to clean them.

task-2686290

closes odoo/odoo#81210

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-13 09:49:04 +00:00
Sébastien Theys 80232c52db [FIX] mail, im_livechat: improve performance of sidebar item counter
Avoid iterating over all channels every time a new channel is added.

Part of task-2702450

closes odoo/odoo#81264

X-original-commit: 7686be710ba919079f6ea97293ac99dde79f843b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-11 10:54:05 +00:00
Sébastien Theys e80af1ce11 [FIX] mail, im_livechat: improve performance of discuss sidebar item
Avoid iterating over all channels every time a new channel is added.

Part of task-2702450

closes odoo/odoo#81235

X-original-commit: f5958f7ae15acff6a1ab6fc1bdf795b4c1f1e071
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-10 14:33:43 +00:00
Sébastien Theys 19996306ec [FIX] mail: move field listener code outside of loop when possible
Some decently costly operations (especially when repeated many times) where done
inside a loop for no reason.

task-2702450

closes odoo/odoo#81187

X-original-commit: c6e4ddf531d29ca1693cc6139b81cea3f5b78fdf
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-10 09:39:46 +00:00
Hubert Van de Walle (huvw) e2624c719c [FIX] mail: Refresh activities after calling mark as done from an editable form
Steps to follow

  - Go to contacts
  - Schedule an activity
  - Click on edit next to the activity
  - Click on the Mark as done button
  -> The activity isn't refreshed

Cause of the issue

  - The record is deleted when clicking on the mark as done button
  - The fetchAndUpdate is called after the form is closed
  - An exception is thrown
  -> the method exists early

Solution

  Handle odoo.exceptions.MissingError and delete the record client side

opw-2702492

closes odoo/odoo#81182

X-original-commit: c56ae82bffb933090a8df33bc38ab979d5318df7
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-09 19:39:39 +00:00
Sébastien Theys 9c7e18030e [FIX] mail: improve performance of channel member_count
Forcing a fetch of all channel partners for all channels is not efficient
because there are too many of them.

Replace by a count done in SQL through `read_group`.

Time goes from 100ms to 3ms for 1000s of members in 100s of channels.

Part of task-2702450

closes odoo/odoo#81175

X-original-commit: 7c77775a84474ccdfe32bdd783291728fbfbdc42
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-09 18:40:49 +00:00
Sébastien Theys 9dca2aa499 [FIX] mail: improve performance of messaging menu counter
Avoid iterating over all channels every time a new channel is added.

Part of task-2702450

closes odoo/odoo#81157

X-original-commit: 6c64781f60599571ef92b011eca7d299e76bf5eb
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-09 16:14:51 +00:00
Sébastien Theys 67ea2463bc [FIX] mail: remove obsolete _computeRingingThreads
Oversight of https://github.com/odoo/odoo/pull/81017

closes odoo/odoo#81125

X-original-commit: f1fe1724e70301b5bca62f3ae355760c2c3fbf41
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-09 12:05:09 +00:00
Sébastien Theys e1d3815348 [FIX] mail: avoid costly debug operations
These errors should not happen in production, it is only helpful for debugging.

The opportunity is taken to limit our debug code to a messaging specific debug,
as debug '1' is used in production to see extra features, and debug 'assets' is
necessary to get decent stack trace.

The easiest way to enable this debug mode at the time of this commit is to
either manually set the value to true in the code, or to type the following line
in the browser console if editing the code is not an option:
`odoo.__DEBUG__.messaging.modelManager.isDebug = true;`

Part of task-2702450

closes odoo/odoo#81075

X-original-commit: f9ae7510c8adaa83379b90f798ee535ede99be25
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-08 16:28:45 +00:00
Sébastien Theys e5ac55cc59 [FIX] mail: improve performance of ringing thread
Avoid iterating over all channels every time a new channel is added.

Part of task-2702450

closes odoo/odoo#81051

X-original-commit: 5359a8c354b0a6106d462fe8f047de946614b7b1
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-08 12:52:32 +00:00
Sébastien Theys 8be118cf25 [FIX] mail: rename ambiguous get method in model manager
To ease debugging in general, avoid having multiple methods with the same name,
especially in the same file.

This is especially useful when the method name appears in a stack trace, for
example in the performance tool.

Part of task-2702450

closes odoo/odoo#81020

X-original-commit: c3673e63064c7f331754ef0e9d02cbbe7b1927f4
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-08 10:23:55 +00:00
Sébastien Theys 560523e817 [FIX] mail: improve performance of listener removal
Avoid iterating over all listeners that are observing a field, instead store
the fields observed by a listener and access it immediately.

Part of task-2702450

closes odoo/odoo#81019

X-original-commit: bf69834b933c54598bbd82d8fbfcac4a0393c067
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-08 10:23:50 +00:00
Antoine Guenet aceb086854 [FIX] base, web_editor, mail, digest: preserve comments in sent e-mails
For email design in the context of Microsoft Outlook, we want to keep
some magic Microsoft comments (Outlook conditional comment), which -
until this commit - were skipped by QWeb. These allow us to change the
rendering exclusively for Outlook so as to overcome some of its
limitations. This commit introduces a qweb rendering option
(`preserve_comments`) for when - like in mass mailing and digest - we
want to keep comments.

Part-of: odoo/odoo#80621
2021-12-08 09:35:03 +00:00
Antoine Guenet 0ba08b558b [ADD] mail: test for mass_mail mode sending mail with comments
This adds a test sending a mail with comments (MSO conditionals) in
mass_mail mode.

X-original-commit: 8778c10bc1856e57216785a8332b90878ff1b5ef
Part-of: odoo/odoo#80621
2021-12-08 09:35:03 +00:00
Antoine Guenet bd638117ae [FIX] mail: properly make urls absolute in escaped attributes
`_replace_local_links` ensures urls are given as absolute rather
relative paths, for link `href`, img `src` and within styles. This
failed when the style contained escaped single quotes (eg:
`background-image: url(&#34;/my_url/path&#34;);`). This commit adapts the
failing regex appropriately.

X-original-commit: 2af980e8cdc72d35729ef2fbaf5067fe7e72bbb8
Part-of: odoo/odoo#80621
2021-12-08 09:35:02 +00:00
Antoine Guenet b7e61e8c32 [ADD] mail: test for _replace_local_links in style urls
This adds a test for the _replace_local_links function of mail render
mixin, in the case of urls in style attributes.

X-original-commit: 199b45c7f6b0155d3828487b2f7771e1500820b1
Part-of: odoo/odoo#80621
2021-12-08 09:35:02 +00:00
Didier (did) 060096b872 [FIX] mail: make the delete button more visible
Before this PR, the delete button was completely invisible on image with white
background.

task-2709788

closes odoo/odoo#81000

X-original-commit: fd1e05cd131273504e7e6cd4f64f6ea63514b6b7
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-07 17:55:43 +00:00
Martin Trigaux d99cfd9416 [I18N] *: export saas-15.1 source terms
closes odoo/odoo#80964

X-original-commit: 0663892a34896980008eb0de69aeb58019a67e89
Related: odoo/enterprise#22759
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-07 13:48:53 +00:00
Sébastien Theys 7925804e39 [FIX] mail: ensure unlink-all properly does its job for x2many
Before this commit, unlink-all would sometimes fail to unlink more than one
record.
This seems to be the case in particular for x2many relations with isCausal true.

Indeed, the delete from isCausal is itself calling unlink-all on the inverse
relation (the same record that was being unlinked-all in the first place) which
would pre-emptively remove it from the same Set that was used during the initial
iteration.

The solution is to make a copy of the Set before iterating it to ensure all
records that were planned to be removed are actually removed.

Candidate fix for task-2410314 and definitely necessary for data integrity in
general.

closes odoo/odoo#80913

X-original-commit: 0077b93fea6f8c39ee535f19426c3f95a0e97e9f
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-06 14:29:47 +00:00
Alexandre Kühn 1543d5a6fd [IMP] mail: move composer send shortcut from prop to field
In preparation for using OWL v2 in discuss code.
(`shouldUpdateBasedOnProps` will be removed)

Task-2695743

closes odoo/odoo#80615

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-06 12:55:00 +00:00
Zelong Lin e6b4761bec [FIX] discuss: clicking on attachment download closes current rtc call
Using <a> with 'download' attribute to download the attachment.
Prevent calling .navigate() interrupting the current call.

task-2692597

closes odoo/odoo#80903

X-original-commit: 97fa88c2e8407972c83c93d4d2198633a5560ecc
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-06 12:07:34 +00:00
Alexandre Kühn eb29425f73 [IMP] mail: remove NotificationPopover/notificationLocalIds deep props
In preparation for using OWL v2 in discuss code.
(shouldUpdateBasedOnProps will be removed)

Task-2695743

closes odoo/odoo#80616

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-06 12:07:30 +00:00
Alexandre Kühn c114614a28 [FIX] mail: properly render following canceled patching
Before this commit, sometimes component do not properly
render changes in the models. Although the modeling is correct,
there is a problem in the component not re-rendering itself.

The shouldUpdateBasedOnProps component hook did not consider
update attempts that could be canceled. This commit adds this
consideration, so that it ensures component is eventually
rendered correctly

Task-2410314
Task-2705078

closes odoo/odoo#80877

X-original-commit: 12c77f52c5a16c95e57de31587d67eda4d582bde
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-04 14:05:18 +00:00