Commit Graph
9383 Commits
Author SHA1 Message Date
Sébastien Theys 06cbb5793d [IMP] mail, *: tweak style of messaging menu/notification list items
* = sms, snailmail

task-2789056

closes odoo/odoo#86598

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-31 16:28:02 +02:00
tsm-odoo 33867b9f5c [IMP] mail: remove default values from test model definitions
The get_model_definitions method returns default values for each field. Those default
values are wrong most of the time (dynamic values, reference to non created records on
the client side, ...).

task-2792108

closes odoo/odoo#87641

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-31 13:33:14 +02:00
Alexandre Kühn c66589a9ac [IMP] mail: remove Thread/compute static method
Task-2806655

closes odoo/odoo#87354

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-31 13:33:02 +02:00
Alexandre Kühn 56fe3087c5 [IMP] mail: remove MailTemplateComponent/mailTemplate
Task-2793280

closes odoo/odoo#87344

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-31 13:32:58 +02:00
Alexandre Kühn 06595953c3 [IMP] mail: turn 'FollowerSubtypeView/follower' into field
Task-2793280

closes odoo/odoo#87014

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-31 13:32:51 +02:00
Victor Feyens 00ed6aa042 [IMP] mail,* : uniformized API for chatter links
* Enforce html escaping of record title
* Avoid translating html content as much as possible, to reduce translation errors.
* Uniformize/Factorize link generation, easing future tasks, code maintenance, ...

Enterprise PR: https://github.com/odoo/enterprise/pull/25357

closes odoo/odoo#84866

Related: odoo/enterprise#25357
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-03-31 12:32:47 +02:00
Julien Castiaux 1dd3865208 [IMP] *: odoo.addons.web.controllers.main splitted
The odoo.addons.web.controllers.main python module have been splitted
over multiple files on the basis 1 controller = 1 file. In this work we
adapt all modules to use the new imports.

A non-exhaustive list of where stuff have been moved:

* main.Home		--> home.Home
* main.Session		--> session.Session
* main.WebClient	--> webclient.WebClient
* main.clean_action	--> action.clean_action
* main.ensure_db	--> home.ensure_db

The complete list is accessible in odoo.addons.web.controllers.main.

closes odoo/odoo#87571

Related: odoo/enterprise#25746
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-03-31 02:10:53 +02:00
Alexandre Kühn c6daa388f1 [IMP] mail: introduce MessageSeenIndicator/text
Task-2793280

closes odoo/odoo#87372

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-30 19:26:36 +02:00
Rahul Prajapati e3c9e29a44 [IMP] mail: improve active style on mentions dropdown
PURPOSE

The current 'active' class on the @mentions dropdown is not clear enough.
The purpose of this task is to add a grey hover background when the item is
active.

SPECIFICATION

Add the grey hover background when the item is active

Task-2786679

closes odoo/odoo#87598

X-original-commit: 9685d5fed97bb3ef3a84cfbbde2e757755a4bd2a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-30 18:32:00 +02:00
Alexandre Kühn f0fbdd3a06 [IMP] mail: remove 'MessageSeenIndicator' recompute methods
Task-2806655

closes odoo/odoo#87352

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-30 18:31:53 +02:00
Alexandre Kühn 081c6f147c [IMP] mail: remove MailTemplateComponent/activity
Task-2793280

closes odoo/odoo#87342

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-30 18:31:47 +02:00
Alexandre Kühn 6bd65a50d2 [IMP] mail: turn 'FollowerSubtypeView/subtype' into field
Task-2793280

closes odoo/odoo#87013

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-30 18:31:40 +02:00
Brieuc-brd f6a9c2868c [IMP] mail: ChatterTopbar, remove inconsistent style
Prior this commit, there were several inconsistencies with the corners
of `ChatterTopbar` buttons. Some of them had rounded corners, others did
not.

After this commit, the `ChatterTopbar` buttons have the same consistent
style: rounded in Community and square in Enterprise.

task-2781992

closes odoo/odoo#87148

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-30 16:33:53 +02:00
tsm-odoo 1da8863a7d [IMP] mail: adapt remaining tests data seeding
task-2792108

closes odoo/odoo#87430

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-30 13:04:58 +02:00
Alexandre Kühn ccf3ff3043 [IMP] mail: introduce 'insertText' test helper
Task-2806986

closes odoo/odoo#87396

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-30 12:06:29 +02:00
Alexandre Kühn eb77f59197 [IMP] mail: turn "Rtc/pushToTalkTimeout" into fields
Task-2734101

closes odoo/odoo#85036

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-30 12:06:20 +02:00
Didier (did) 5151425abc [FIX] mail: follow up send is_main with the attachments
task-2783076

closes odoo/odoo#87508

X-original-commit: 7fcc26adf6c4aff1e89574617cfe79337f703b96
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-30 11:13:34 +02:00
Alexandre Kühn 3f75153ad7 [IMP] mail: introduce 'FollowerSubtypeView' model
Task-2793280

closes odoo/odoo#87011

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-29 20:21:01 +02:00
Alexandre Kühn c31a1da0ea [IMP] mail: turn "Rtc/connectedRtcSessions" into field
Task-2734101

closes odoo/odoo#85035

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-29 20:20:24 +02:00
xlu-odoo 2998cfca80 [REF] web,mail: command palette revamp
This commit simplifies the SCSS of the command palette component.

task-2748052

closes odoo/odoo#83938

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-03-29 20:20:19 +02:00
tsm-odoo 97bd67acc5 [IMP] mail: make start method handle hasWebClient parameter properly
startServer method ease data seeding by providing an environment that
can be used to interact with the underlying mock server.The createWebClient
method was not supported well. Indeed, we could either pass serverData or not.
But we could not pass only the views and take the data from the startServer
method. This issue was addressed.

task-2792108

closes odoo/odoo#87432

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-29 17:23:28 +02:00
Brieuc-brd 68c974dfad [REF] mail: ComposerSuggestedRecipientList, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2781992

closes odoo/odoo#87452

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-29 12:00:18 +02:00
tsm-odoo ccdd00303d [IMP] mail: remove activity menu fake model
task-2792108

closes odoo/odoo#87434

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-29 12:00:07 +02:00
tsm-odoo 0c847108ac [IMP] mail: register m2x avatar user fake model
In preparation of test adaptation after introducing a new way to
seed test data, the fake model present on the m2x avatar user test
have been registered to the model definitions instead of being
declared on it's test.

task-2792108

closes odoo/odoo#87433

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-29 12:00:04 +02:00
Zelong Lin 74696cab83 [IMP] mail, hr: constraints when channel_type is not 'channel'
The group_public_id and group_id and subscription_department_ids
should only be used when the channel_type is 'channel'.

task-2766712

closes odoo/odoo#84813

Related: odoo/upgrade#3266
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-29 11:59:45 +02:00
Gorash ca4fe12a37 [IMP] base: rename var option into compile_context
In order to make it easier to understand the code of qweb.

Part-of: odoo/odoo#85110
2022-03-29 10:56:16 +02:00
Gorash 880954ebfc [IMP] *: remove _render from ir.ui.view and simplify report
There were inconsistencies in the calls to `_render`.
* the view context could contain information that misled developers.
Indeed, the context and value of the view are not supposed to be found
in the rendering. Thus by calling `ir.qweb` with the name of the
template, we ensure that there is no unwanted information and in
addition the cache key is that of the name of the template which saves
a query.
* the context used for rendering was modified by a method on
`ir.ui.view`, except this is not information used by this model. There
is now a `_prepare_environment` method residing on `ir.qweb`. This
method allows to modify the value dictionary as well as the context in
which the rendering will be done. This preparation of the data as well
as my security check is done only once per rendering. This also saves
some queries
* Freeze options for rendering were inconsistent. It could be that
options on which rendering depends were not part of the cache key. Thus,
depending on the user who generated the generation of the rendering
function, there was or was not information in the template. For example
for automatic branding. This is no longer possible, because it is the
context that is used. The options serving as a cache key are only
recorded for information (for the profiling system for example). A
simplification of the `ir.qweb.field` models could be made.

The report rendering and call `ir.qweb` instead of `ir.ui.view`.

Part-of: odoo/odoo#85110
2022-03-29 10:56:15 +02:00
Zelong Lin 72cf79a1ff [IMP] mail: channel_type cannot be changed
get prevention when transforming the channel type.

task-2774330

closes odoo/odoo#85128

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-28 23:10:49 +02:00
tsm-odoo b168313f0e [IMP] mail: adapt component tests data seeding
This PR adapts mail components tests after the introduction
of a new way to seed test data.

task-2792108

closes odoo/odoo#86655

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-28 19:00:00 +02:00
Alexandre Kühn d7dea4c68d [IMP] mail: turn "Rtc/pingInterval" into field
Task-2734101

closes odoo/odoo#85029

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-28 18:59:47 +02:00
tsm-odoo a3607cae81 [IMP] mail: remove fake model for FieldMany2ManyTagsEmail tests
task-2792108

closes odoo/odoo#87303

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-28 17:55:24 +02:00
Alexandre Kühn 39c778c611 [IMP] mail: create 'RtcSession/isCurrentUserInitiatorOfConnectionOffer'
This is exactly the field 'RtcSession/isConnected', but it was badly named.

Task-2734101

closes odoo/odoo#87284

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-28 17:55:20 +02:00
Sébastien Theys 3e249661af [IMP] mail: move getScrollableElement to message list model
task-2801089

closes odoo/odoo#87267

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-28 17:55:16 +02:00
Alexandre Kühn b04ea8e173 [IMP] mail: turn "RtcSession/rtcDataChannel" into field
Task-2734101

closes odoo/odoo#85024

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-28 13:55:09 +02:00
Didier (did) 6a0cbf8562 [FIX] mail: fix guard on load video
task-2806331

closes odoo/odoo#87324

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-28 12:57:02 +02:00
tsm-odoo 2e690b4aa3 [IMP] mail, *: make mockserver autofill relational fields' inverses
*: web, website_slides.

Specifying both side of a relation when seeding test data is cumbersome.
Let startServer method handle it.

task-2792108

closes odoo/odoo#86939

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-25 18:38:54 +01:00
Raphael ColletandDidier Debondt 036ef5b96d [FIX] core: use EXISTS in domain conditions on many2many fields
This fixes two problems that occur with conditions on many2many fields:
the subtle bug caused by NULL values that are returned by subqueries,
and the performance of those subqueries.

The problem with NULL values returned by subqueries is the fact that
they make the SQL condition undetermined instead of false, and this
discards some of the results returned by a query.  Simply consider:

    id NOT IN (1, 2, 3)

The value id=3 makes the condition false, while i=4 makes it true.  Now
consider that the set also includes a NULL value, like:

    id NOT IN (1, 2, 3, NULL)

The value id=3 makes the condition false, but the value id=4 makes it
undetermined.  Therefore this condition is actually undetermined for all
possible values of id, and a query containing that condition simply
returns nothing!

Regarding performance, consider a domain like [('tag_ids', '=', False)].
It is currently translated in SQL as

    "model".id NOT IN (
        SELECT "model_id"
        FROM "model_tag_rel"
        WHERE "model_id" IS NOT NULL
    )

PostgreSQL does not handle well this "NOT IN" expression when the
relation table is large, and uses some very inefficient query plan in
that case.  The inefficient query plan is possibly related to the
special handling of NULL values, by the way.  This commit changes the
above expression to a "NOT EXISTS" expression (as below), which is
executed with a much more efficient query plan, even with large tables.

    NOT EXISTS (
        SELECT 1
        FROM "model_tag_rel"
        WHERE "model_tag_rel"."model_id" = "model".id
    )

This change was motivated by a use-case with 2.7M account moves, 11M
account move lines and a many2many relation table with 2.3M lines
(`account_move_line_account_tax_rel`).  The query was timing out (15
minutes), and it now takes 15 seconds.

We have replaced all the conditions on many2many fields to use the
relational operators EXISTS and NOT EXISTS.

A test has been added to reflect a case where the many2many table
contains NULL values, like the one for channel_partner in regards to
partner_id and guest_id.

task-2753782

X-original-commit: 334b2aa2aa437d2ed86130f2ed426025f8fe4b86
Part-of: odoo/odoo#87285
Co-authored-by: Didier Debondt <did@odoo.com>
2022-03-25 17:47:43 +01:00
Alexandre Kühn 939d05b429 [IMP] mail: introduce MailTemplateView
Task-2793280

closes odoo/odoo#87213

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-25 16:51:49 +01:00
Alexandre Kühn bc4f8e577e [IMP] mail: turn 'ComposerView/extraSuggestions' into field
Task-2793280

closes odoo/odoo#87095

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-25 15:54:34 +01:00
Alexandre Kühn 0597ba1fe8 [IMP] mail: turn 'MessageView/isActive' into field
Task-2793280

closes odoo/odoo#87001

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-25 15:54:31 +01:00
Alexandre Kühn 2ebb9fc025 [IMP] mail: turn 'MessageAuthorPrefixView/thread' into field
Task-2793280

closes odoo/odoo#86989

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-25 15:54:27 +01:00
Brieuc-brd 76369d33b7 [REF] mail: ChatterTopbar, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2781992

closes odoo/odoo#86461

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-25 12:39:53 +01:00
Alexandre Kühn 7544078420 [IMP] mail: turn "RtcSession/isConnected" into field
Task-2734101

closes odoo/odoo#85032

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-25 12:39:50 +01:00
Alexandre Kühn 714948cb97 [IMP] mail: introduce 'MessageView/isHovered' field
Task-2793280

closes odoo/odoo#86694

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-24 20:47:46 +01:00
Alexandre Kühn c44f35f61d [IMP] mail: turn 'MessageAuthorPrefixView/message' into field
Task-2793280

closes odoo/odoo#86980

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-24 18:58:26 +01:00
Alexandre Kühn 6b0a59c951 [IMP] mail: turn 'MessageView/isClicked' into field
Task-2793280

closes odoo/odoo#86966

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-24 18:10:47 +01:00
Sébastien Theys 4708c12ce5 [IMP] mail: remove _loadMore from message list component
Useless indirection.

Part of task-2801089

closes odoo/odoo#87117

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-24 17:12:22 +01:00
Brieuc-brd 9ead1efcfa [REF] mail: FollowerListMenu, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2781992

closes odoo/odoo#86727

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

task-2781992

closes odoo/odoo#86331

Related: odoo/enterprise#25227
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-24 17:11:55 +01:00
Brieuc-brd 8b1e8899aa [IMP] mail: ChatWindowHiddenMenu, update the layout
Prior this commit, the `ChatWindowHiddenMenu` had a fixed width and the
`windowCounter` was truncated when the number was higher than 9.
Also, when the `unreadCounter` was displayed, it was partially hidden by
the chat windows.

After this commit, this element uses a fluid width and is in front of
the chat windows to correctly display the `unreadCounter` badge.

task-2781992

closes odoo/odoo#86244

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-24 17:11:51 +01:00