Commit Graph
3891 Commits
Author SHA1 Message Date
xlu-odoo 217dfa08e6 [REF] mail, hr_holidays: PartnerImStatusIcon, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2832067

closes odoo/odoo#89544

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-29 12:05:31 +02:00
Brieuc-brd 542f0c76a4 [REF] mail: MessageReactionGroup, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2835543

closes odoo/odoo#89980

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-29 11:01:33 +02:00
tsm-odoo 54a25b32b3 [IMP] mail: add notify to messaging
This PR prepares the ground for the one introducing the new env in discuss.
The signature of the notify function has changed a lot from the one in the old env.
In order to ease the transition and reduce the noise, the discuss models now
rely on the messaging's notify function.

task-2582313

closes odoo/odoo#89877

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-29 11:01:25 +02:00
tsm-odoo 0b60725288 [IMP] mail, *: add rpc to messaging
*: calendar, hr, im_livechat, mail, mail_bot, snailmail, website_slides.

This PR prepares the ground for the one introducing the new env in discuss.
The signature of the rpc function has changed a lot from the one in the old env.
In order to ease the transition and reduce the noise, the discuss models now
rely on the messaging's rpc function.

task-2582313

closes odoo/odoo#89858

Related: odoo/enterprise#26676
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-29 11:01:18 +02:00
Elisabeth Dickinson 8746b164a7 [REF] mail: chatWindow, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2784763

closes odoo/odoo#85839

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-29 11:01:11 +02:00
Aaron Bohy 89112f8ecf [IMP] mail: do not call getViews for chatter fields
Before this commit, in form views, a call to "getViews" was done
for each field in the div with className "oe_chatter" (i.e.
"message_ids", "message_follower_ids" and "activity_ids"). Those
calls were unnecessary since those fields are displayed with a
custom widget (the Chatter) anyway.

Part-of: odoo/odoo#87522
2022-04-29 09:57:45 +02:00
Alexandre Kühn 5842a0e87d [IMP] mail: introduce view models (step 2)
This commit introduces models that define records being 1:1 map with components,
as a step to move further to having essentially all business code in models.

Having code in models is desirable to have very maintainable code, thanks to
robust and declarative code with an ORM-like architecture.

Task-2831082

closes odoo/odoo#89905

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-27 21:28:19 +02:00
tsm-odoo c02a27432a [IMP] mail: make start return advanceTime function
This PR prepares the ground for the introduction of the new environment in the discuss
app. For now, the start method adds the advanceTime function to the environment. The issue
is that the new env is not extendable. This change makes a lot of noise hence the prep PR.

task-2582313

closes odoo/odoo#89888

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-27 21:28:01 +02:00
Brieuc-brd 9797338944 [REF] mail: MessageList, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2826936

closes odoo/odoo#89683

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-27 18:38:06 +02:00
Didier (did) ff15e4dc75 [FIX] mail: fix suggestion list position and style in chatter
task-2834429

Introduced by https://github.com/odoo/odoo/pull/89120 and https://github.com/odoo/odoo/pull/89146

closes odoo/odoo#89826

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-27 13:26:59 +02:00
Alexandre Kühn ae5f59775e [IMP] mail: introduce view models (step 1)
This commit introduces models that define records being 1:1 map with components,
as a step to move further to having essentially all business code in models.

Having code in models is desirable to have very maintainable code, thanks to
robust and declarative code with an ORM-like architecture.

Task-2831082

closes odoo/odoo#89735

Related: odoo/enterprise#26637
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-27 10:04:24 +02:00
tsm-odoo 96288beeb6 [IMP] mail, *: prepare mockServers for wowlEnv
*: calendar, hr_holidays, im_livechat, note, website_livechat.

This PR helps reducing the noise in the discuss new env PR. Indeed,
the new mockServer has the same method except that they are not prefixed
by any underscore. All calls have been changed, and the corresponding
methods created. They will be deleted later.

task-2582313

closes odoo/odoo#89659

Related: odoo/enterprise#26603
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-27 10:04:17 +02:00
tsm-odoo 2b2175e824 [IMP] mail, *: rename isMobile to isSmall
*: sms, snailmail.

In order to reduce the noise in the new discuss env PR, all the
messaging.device.isMobile occurences have been renamed to isSmall
in order to match the new env terminology.

task-2582313

closes odoo/odoo#89655

Related: odoo/enterprise#26597
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-27 10:04:07 +02:00
tsm-odoo 653b030553 [MOV] mail: move advanceTime function
This PR prepares the ground for the new env in discuss. The addTimeControlToEnv
function has been move in its own file, it will not rely on env anymore.

task-2582313

closes odoo/odoo#89673

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-27 09:00:24 +02:00
tsm-odoo e58ef79c74 [MOV] mail, test_mail: move activity tests into test_mail
Move the activity_tests to test_mail module in ordre to rely on
one of its test model.

task-2582313

Part-of: odoo/odoo#89666
2022-04-27 09:00:20 +02:00
Rahul Prajapati 588cffa967 [IMP] im_livechat, mail: replace _.str.sprintf to web sprintf
Before this commit:

_.str.sprintf was being used

After this commit:

replaced _.str.sprintf with sprintf

Task-2810721

closes odoo/odoo#89217

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-27 07:51:43 +02:00
Brieuc-brd 1d21c78946 [FIX] mail: Message, MessageActionList in front of Composer
Prior this commit, the MessageActionList was behind and partly hidden by
the Composer when we edit small messages.

After this commit, the MessageActionList is in front of the Composer.

task-2819763

closes odoo/odoo#89610

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-26 12:22:05 +02:00
Brieuc-brd 23eb4541be [REF] mail: Message, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2819763

closes odoo/odoo#88535

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-26 12:21:56 +02:00
Alexandre Kühn 5149aa8cb6 [FIX] mail:tests: skips non-deterministic scroll tests
These tests fail non-deterministically.
The underlying problem is currently being fixed.
But to fix runbot issues, the tests are skipped in the meantime.

Note that the failure in tests show very rare buggy behaviour,
but the buggy feature is very minor. So it's reasonable to not
obstruct mergebot by just skipping tests while a fix is being
prepared.

closes odoo/odoo#89384

X-original-commit: a51a636bc3acdab3700323a825c77ba4572e942f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-22 09:03:08 +02:00
Alexandre Kühn f75b7d19a8 [IMP] mail: turn props into model fields (step 1)
This commit moves some business logic from components to models,
as a step to move further to having essentially all business code in models.

Having code in models is desirable to have very maintainable code, thanks to
robust and declarative code with an ORM-like architecture.

Task-2826823

closes odoo/odoo#89323

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-21 19:42:04 +02:00
Alexandre Kühn 4c21dbee29 [IMP] mail: move component handlers to models (step 7)
This commit moves some handler methods from components to models,
as a step closer to having most of business code in models.

Having business code in models is desirable so that the code is much more maintainable:
easier to change and more robust code.

Task-2579306

closes odoo/odoo#89123

Related: odoo/enterprise#26379
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-21 12:50:05 +02:00
Sébastien Theys ccdda4450c [IMP] mail: remove uuid from channel_fold
Unnecessary param.

task-2827807

closes odoo/odoo#89115

Related: odoo/enterprise#26388
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-21 12:49:58 +02:00
Sébastien Theys 870eb515eb [IMP] mail, *: remove uuid from channel_pin
* = im_livechat, website_livechat

Unnecessary param.

task-2827807

Part-of: odoo/odoo#89115
2022-04-21 12:49:58 +02:00
Didier (did) ed2c2a234e [FIX] mail: enforce scroll position when shifting chat windows
Before this PR, chat window scroll position was reset to top when it was
switched to the left.
This PR introduce a component hit that restore the position saved inside the
models when a chatwindow is switched.

task-2746500

closes odoo/odoo#89134

X-original-commit: 0f11abaf09f08fc9643dac5ee8d4df6d1ef5686b
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-21 11:33:53 +02:00
Thanh Dodeur 6217bed174 [IMP] mail: show rtc candidate types
This commit adds a way to see the candidateType of the inbound and
outbound peer connections. This information allows for example to
determine whether the peer connection is being relayed (using a TURN).

task-2766401

closes odoo/odoo#85104

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-20 18:48:51 +02:00
Brieuc-brd d541cef5b5 [REF] mail: MessageInReplyToView, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2826587

closes odoo/odoo#89032

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-20 12:37:44 +02:00
Alexandre Kühn e1b037dc4c [IMP] mail: introduce AutocompleteInputView (step 2)
This commit moves some business logic from component AutocompleteInput
To model AutocompleteInputView, as a step to move further to having essentially
all business code in models.

Having code in models is desirable to have very maintainable code, thanks to
robust and declarative code with an ORM-like architecture.

Task-2817076

closes odoo/odoo#89077

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-19 20:37:43 +02:00
Alexandre Kühn 5472bec197 [IMP] mail: move component handlers to models (step 6)
This commit moves some handler methods from components to models,
as a step closer to having most of business code in models.

Having business code in models is desirable so that the code is much more maintainable:
easier to change and more robust code.

Task-2579306

closes odoo/odoo#89076

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-19 19:40:11 +02:00
Alexandre Kühn a74f159af2 [FIX] mail: properly refresh chatter on attachment deletion
Task-2823317

closes odoo/odoo#89057

X-original-commit: 390d7c1e1b87bbfcd293010b5c74b86d4f68ceb8
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-19 17:41:17 +02:00
Sébastien Theys 6f29cddad8 [FIX] mail: fix compute of isMobileDevice
Follow up of https://github.com/odoo/odoo/commit/2c9da836e5829b8a3d3a36afbeebfdd78f36d542/#diff-f884c81b21062d0a63935bbdbc9c7cf52dc69a6a29ea4dce13130196435b0591R53

Value was permanently undefined: writing value on itself rather than from env.

closes odoo/odoo#89050

X-original-commit: 9dde44b1479118e55eb2e73df56e5e696c2bf850
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-19 17:41:13 +02:00
Brieuc-brd ece6db05c2 [REF] mail: MessageActionList, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2826366

closes odoo/odoo#88996

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-19 17:41:06 +02:00
Thanh Dodeur 841373e2c4 [FIX] mail: prevent incorrect loading of settings from the localstorage
Before this commit, the settings recovered from the localStorage were
incorrectly loaded to the model fields.

This commit fixes this issue.

taskId-2823292

closes odoo/odoo#88828

X-original-commit: 5b429e54b732257075e0925211e9ab9b0b827ca1
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-19 16:40:06 +02:00
Brieuc-brd 8edc8c5768 [REF] mail: MessageAuthorPrefix, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2826482

closes odoo/odoo#89002

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-19 15:33:49 +02:00
Carlos Valverde 41829786b8 [FIX] mail: discuss_mobile_mailbox_selection outline effect fix
This commit fixes "box-shadow" assignations added by default when using
Bootstrap's `.btn` classes, which result into an undesired "outline"
effect on selected buttons.

Task-2821469

closes odoo/odoo#88458

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-19 12:14:59 +02:00
Carlos Valverde 96dd189974 [REF] mail: discuss_mobile_mailbox_selection scss refactoring
Current SCSS is replaced with global Bootstrap classes, in
order to reduce code lines and to increase performance.

Task-2821469

Part-of: odoo/odoo#88458
2022-04-19 12:14:58 +02:00
Alexandre Kühn 85ec1d37c4 [IMP] mail: introduce MessageSeenIndicatorView
This commit introduce the MessageSeenIndicatorView model,
in order to move business code from MessageSeenIndicator
component to MessageSeenIndicatorViews.

Code that are not in modelling are hacky, hard to maintain,
and very prone to bug. That's why it's important to move most
code in components to models.

Task-2793280

closes odoo/odoo#88950

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-15 20:06:30 +02:00
Alexandre Kühn 03b59ae410 [IMP] mail: move component handlers to models (step 5)
This commit moves some handler methods from components to models,
as a step closer to having most of business code in models.

Having business code in models is desirable so that the code is much more maintainable:
easier to change and more robust code.

Task-2579306

closes odoo/odoo#88878

Related: odoo/enterprise#26277
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-15 19:08:35 +02:00
Alexandre KühnandSébastien Theys d81c77234d [IMP] mail, *: tests: use mail.channel.partner for seen indicator
* = hr_holidays, im_livechat, website_livechat

Task-2810539

closes odoo/odoo#87587

Related: odoo/enterprise#25911
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
2022-04-15 15:28:49 +02:00
Thanh Dodeur 557bb28cff [FIX] mail: ensure that voice threshold is updated across tabs
Before this commit, updating the voice activation threshold in one tab
would not affect the other tabs as the localStorage was only read when
discuss was initialized.

This commit fixes this issue.

task-2679234

closes odoo/odoo#88154

X-original-commit: 80c81c70787952eb4fdc4b81210bdf2893210e1a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-14 14:07:01 +02:00
Alexandre Kühn 3d924aa379 [IMP] mail: move component handlers to models (step 4)
This commit moves some handler methods from components to models,
as a step closer to having most of business code in models.

Having business code in models is desirable so that the code is much more maintainable:
easier to change and more robust code.

Task-2579306

closes odoo/odoo#88692

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-13 18:52:46 +02:00
Louis Wicket (wil) e953d4bbd0 [FIX] mail: put back removed css rules
Task-2812497 accidentaly removed some CSS rules, causing the dialog not to be
centered properly. This commit put the rules back.

closes odoo/odoo#88653

X-original-commit: 3f8fd3d57c77a7eef41685d007bbc0a20d3bb290
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-13 14:51:46 +02:00
Alexandre Kühn df31b7d9ba [IMP] mail: move component handlers to models (step 3)
This commit moves some handler methods from components to models,
as a step closer to having most of business code in models.

Having business code in models is desirable so that the code is much more maintainable:
easier to change and more robust code.

Task-2579306

closes odoo/odoo#88594

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-13 11:55:42 +02:00
Sébastien Theys 20099d34e6 [IMP] mail: move isLastStateChangeProgrammatic to composer view
This is a view concern and prevents from refactoring the composer model.

Part of task-2390637

closes odoo/odoo#88588

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-12 18:47:08 +02:00
Rahul Prajapati 18edb4abf4 [IMP] mail: cleanup iseditable in attachments
Before this commit:

- isEditable field doesn't makes sense as attachments can't be Edited
- There is a Dead code in attachment_card component

After this commit:

- refactored isEditable to isDeletable
- removed the Dead code

Task-2782079

closes odoo/odoo#87654

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-12 12:49:47 +02:00
Alexandre Kühn 8700c7aad4 [IMP] mail: move component handlers to models (step 2)
This commit moves some handler methods from components to models,
as a step closer to having most of business code in models.

Having business code in models is desirable so that the code is much more maintainable:
easier to change and more robust code.

Task-2579306

closes odoo/odoo#88468

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-11 19:01:53 +02:00
Alexandre Kühn 7a09f8b7d6 [IMP] mail: remove ComposerSuggestionComponent getters
This commit replaces getters in `ComposerSuggestion` component to fields in
model `ComposerSuggestion`.

Getters in component are a problem for many reasons, notably that business
code is in component and not in modelling. Code that are not in modelling are
hacky, hard to maintain, and very prone to bug. That's why it's important to
move most code in components to models.

Task-2793280

closes odoo/odoo#88315

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-08 19:31:29 +02:00
Brieuc-brd 731de19c27 [REF] mail: FollowerSubtype, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2818653

closes odoo/odoo#88202

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-08 17:12:52 +02:00
Brieuc-brd bbe2702cec [REF] mail: Follower, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2818584

closes odoo/odoo#88196

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-08 17:12:48 +02:00
Brieuc-brd cc23863f09 [REF] mail: MailTemplate, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2818801

closes odoo/odoo#88216

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-08 15:52:27 +02:00
Brieuc-brd 5e634a53e9 [REF] mail: FollowerSubtypeList, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2818667

closes odoo/odoo#88203

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-08 15:52:23 +02:00