Commit Graph
9877 Commits
Author SHA1 Message Date
std-odoo a0186bd4c4 [IMP] mail: improve the UI of the mail gateway allowed model
Purpose
=======
Show a help message in the "mail gateway allowed" list view that
explains why this model is useful and what the email limit is.

Remove the normalized email from the list view and rename the label of
the email field.

Task-2885455

closes odoo/odoo#96588

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-07-28 01:30:14 +02:00
tsm-odoo 71d5af4ce0 [FIX] bus, *: fix onNotification/offNotification
*: im_livechat, snailmail_account, survey, web_editor.

The callback registered by the bus service method onNotification was
not the same unregistered by offNotification. Since those method were
superfluous, they have been removed in favor of (add/remove)EventListener.

closes odoo/odoo#96684

Related: odoo/enterprise#29819
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-27 16:34:10 +02:00
tsm-odoo 901a43f532 [IMP] bus, *: improve multi tab service
*: calendar, im_livechat, survey.

Following @ged-odoo review, the multi tab service has been improved:
    - multi_tab_service.js has been moved to the correct location.
    - _callLocalStorage method has been removed and replaced by
      getItemFromLocalStorage/setItemToLocalStorage.
    - underscore.js calls have been removed.
    - multi_tab_service is now using function closure style  instead of class.
    - multi_tab service is now using its own bus instance.
    - service name is now in snake case as per convention.
    - tests have been added.
    - multi tab service now handles setting/removing/getting values
      shared between  all the tabs.

closes odoo/odoo#96386

Enterprise: https://github.com/odoo/enterprise/pull/29694
Related: odoo/enterprise#29694
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-27 03:34:51 +02:00
Sébastien Theys b401ba6e2d [IMP] mail, *: remove legacy code from activity systray
* = calendar, crm, im_livechat, mass_mailing_sms, note, test_discuss_full,
    test_mail

task-2920645

closes odoo/odoo#96114

Related: odoo/enterprise#29794
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-27 02:18:15 +02:00
Thanh Dodeur 0efcb55c6f [REF] use ChannelMember in CallParticipantCard model
part of task-2692836

closes odoo/odoo#95418

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-27 02:18:09 +02:00
Thanh Dodeur 174ff9ff83 [REF] mail: use the channelMember relation for RtcSession
part of task-2692836

closes odoo/odoo#96394

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-25 20:12:42 +02:00
Radhika Shyara f65ae53fb2 [FIX] mail: fix the follower subtypes order
Before this commit, the subtypes are not correctly ordered when
none of the subtypes have a parent model. while it should be
order by parent model, then by sequence.

So in this commit, we will first check if both their parent model
are falsy then we can't order them (A = B). Then we will consider
their sequence, and they will be useful to determine the proper order.

task-2904015

closes odoo/odoo#96402

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-25 16:33:46 +02:00
Sébastien Theys 28200c5ad5 [IMP] mail, web: adapt chatter container in new form
task-2871070

Part-of: odoo/odoo#78221
2022-07-22 16:21:45 +02:00
+2 bc0a0cead6 [IMP] web,*: enable owl list & form views
The new list and form views were merged recently [1], but they
weren't activated because they weren't 100% ready yet. This is now
the case. This commit adds those views to the view registry. As a
consequence, a lot of qunit tests and tours needed to be adapted,
mostly for selector changes.

We also add legacy list and form views to the view registry, with
keys 'legacy_list' and 'legacy_form'. This allows to force those
legacy views when necessary. For instance, we did it in views
using complex custom legacy x2many field widgets that haven't been
converted yet (we have a compatibility layer but it isn't complete
and doesn't support every advanced usecases).

[1] odoo/odoo#92475

Part-of: odoo/odoo#78221
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: luvi <luvi@odoo.com>
2022-07-22 16:21:45 +02:00
tsm-odoo fdce32d186 [IMP] mail: legacy activity menu to wowl registry
To prepare for the introduction of the ActivityMenuContainer Component,
let's  make the ActivityMenu widget use the systray registry.

closes odoo/odoo#96341

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-21 00:50:17 +02:00
Laurent Stukkens (LTU)andYannick Tivisse ac7cd0e874 [IMP] project: improve burndown chart performance
Purpose of this commit
======================

The Burndown Chart report was very slow on big databases as it was not
possible for Postgresql to optimize the query as it was based on a view
that was using several generate series.

This commit aims to improve the performance by injecting the constraints
at a lower level than it was in the past, lowering the amount of data
processed in the higher level of the query.

/!\ Important note
------------------

Overwriting the `read_group_raw` is really not a good practice and should
be avoided in most case. If you fall on this implementation by grepping
the source code, please be advised that this is not the right way of doing
things.

Implementation details
----------------------

- The report is now run by generating the `SQL` that is executed by the
  `read_group_raw`. This allows inserting `SQL` constraints at a lower
  level and simnifically improves performance. As there is no other way
  to do it, the code is unfortunately a modified copy of the actual
  `read_group_raw`.
- The pivot view has been removed as it had no meaning and was creating
  confusing data.
- The `Group By` menu has been limited to `stage_id` and `date` as bringing
  more data trough the different `GROUP BY` statements up to the higher level
  is costly. Further more, additional `Group By` did not bring added value
  as the Chart was less readable.
- The JS code has been adapted in order to force a group by both `stage_id`
  and `date` so that the date displayed is always making sense.
- The sort ascending and descending options have been removed as creating
  confusing data.
- The compare with previous period has also been removed as the chart only
  really make sense when seen chronologically.
- A lot of tests have been added in order to ensure that changes that would
  be harmful for the report will trigger test fails.

task-2845729

Co-authored-by: Yannick Tivisse <yti@odoo.com>
2022-07-20 15:57:32 +02:00
MAHAMADASIF ANSARI 3bf88fcf79 [IMP] {fetch}mail, google_gmail, microsoft_outlook: merge fetchmail into mail
The `fetchmail` module is build on top of the `mail` module and enables
the incoming email capabilities. However, using the `mail` without
incoming email server is not a good use case.

This commit merges the `fetchmail` moudule into `mail` and lessens the module
complexity, along with adapting the xml/external ids in the dependent modules.

task-2797458

closes odoo/odoo#94143

Related: odoo/upgrade#3615
Related: odoo/enterprise#28659
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-07-20 10:58:56 +02:00
Umesh Gupta 5f8474429d [IMP] mail: improve mail notification template layout
In this task, we modified the template layout to match the other
mail notification template  and make it compatible with Outlook.

closes odoo/odoo#92847

Taskid: 2791286
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-07-20 10:58:50 +02:00
Brieuc-brd aca92c6887 [REF] mail: Message, review and simplify scss (phase 2)
Since the migration to Bootstrap 5, we can now use BS 5 utility classes
in the discuss_public view.
This commit simplifies the scss related to discuss_public.

task-2909016

closes odoo/odoo#95772

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-19 20:13:09 +02:00
Thibault Delavallée ba6b8baa23 [IMP] test_mail: improve tests about mail sending issue status update
Purpose of this commit is to add tests on ``failure_reason`` usage of
notification model. Tests already exists for MailMail and other fields
but not that specific one. Followup of odoo/odoo@d895f3514e

New tests are added to check the usage of email_to and email_cc when
sending emails. Notably wrong usage of email_cc (lost formatting, copy
of all sent emails) is asserted to be fixed afterwards.

A performance test about batch sending is also added.

Prepares Task-2684479 (Mail: Better send error storage and display)

Part-of: odoo/odoo#96223
2022-07-19 11:51:12 +02:00
Thibault Delavallée 7cfb49e67e [IMP] test_mail: allow to assert value of email_cc/bcc when sending emails
Purpose is to ease addition of new tests related to email sending, notably
to check failure reasons.

Prepares Task-2684479 (Mail: Better send error storage and display)

Part-of: odoo/odoo#96223
2022-07-19 11:51:12 +02:00
Thibault Delavallée 039c63cf6e [REF][MOV] test(_mass)_mail(_sms): move sms tests in their own addon
In this commit we introduce a new module ``test_mail_sms`` that holds the
tests for sms application, like ``test_mail`` does for mail. Currently all
sms tests are inside ``test_mail_full``. After this commit code is moved
from ``test_mail_full`` into that module. Full testing module should be used
mainly to test integrations with a lot of submodules and for performance
tests, not testing details of SMS implementation.

We also add ``mass_mailing_sms`` as dependency of ``test_mass_mailing`` so
that both mailing types are tested in the same module. It eases maintenance
and writing of tests. Mass mailing SMS tests  from `test_mail_full`` are
therefore moved in ``test_mass_mailing``.

This commit also allows some cleaning in classes used in tests, to have
classes in ``test_mail_sms`` and ``test_mail_full`` that contain everything
necessary to test mail features.

Task-2890111 (Test Mail/Mass Mailing: SMS tests reorganization and move)

Part-of: odoo/odoo#96223
2022-07-19 11:51:12 +02:00
Louis Wicket (wil) fdcaa53ca0 [IMP] mail, *: rename mail.channel.partner to mail.channel.member
* = calendar, crm_livechat, hr_holidays, im_livechat, privacy_lookup,
privacy_lookup, test_discuss_full, test_mail_full, website_livechat

closes odoo/odoo#95912

Related: odoo/upgrade#3681
Related: odoo/enterprise#29433
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-19 11:50:37 +02:00
Louis Wicket (wil) 5fe4303a0d [IMP] mail: remove deadcode
Part-of: odoo/odoo#95912
2022-07-19 11:50:36 +02:00
Aurélien Warnon 9242c8fc5c [FIX] mail: hide stat-buttons in activity popup form
Small oversight of: 4c6a010730

This commit simply hides the stat-buttons when the mail.activity is opened in
the popup form.

When in that popup form, you don't want to switch your context, especially
considering the only button currently available allows you to open the related
document (from which you just opened the activity popup form, creating a loop).

Task-2920490

closes odoo/odoo#96238

X-original-commit: 7b6e700d7e7c54cac0200e98b4eb04af9f115608
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-07-18 21:03:09 +02:00
tsm-odoo e2aeb5fc23 [IMP] bus, *: introduce multi tab service
*: calendar, survey.

In order to ease the PR introducing websockets in Odoo, introduce
the multi service. Indeed, the cross tab bus won't be necessary
anymore but there will still be a need to elect a main tab: some actions
should only be triggered once. To achieve this, the code electing the main
tab has been split with the one handling the longpolling. The crosstab
bus now relies on the multi tab service to known whether or not the
current tab is the main tab.

task-2053917

closes odoo/odoo#96174

Related: odoo/enterprise#29573
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-18 19:55:13 +02:00
tsm-odoo 920b25f5e7 [IMP] mail, *: always add activity menu item during tests
*: calendar, note, test_mail.

In order to ease testing and to prepare for the ActivityMenu widget to be
converted into a component, let's add the sytray menu item into the registry
systematically when using the start helper.

closes odoo/odoo#96094

Related: odoo/enterprise#29529
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-18 18:41:39 +02:00
tsm-odoo 3b9a90e14f [IMP] bus: replace on/off by (add/remove)EventListener
on/off are deprecated in favor of  addEventListener/removeEventListener.
Calls to the bus service have been updated to reflect those changes.

task-2053917

closes odoo/odoo#96017

Related: odoo/enterprise#29501
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-18 18:41:33 +02:00
William Braeckman f3590959b0 [IMP] mail: improve attachment_viewer
This commit improves the expendability of the attachment_viewer model
and component by making it less dependent on attachment_list.

This is required by the refactoring in wowl of the documents app(s).

TaskId-2898342

closes odoo/odoo#94930

Related: odoo/enterprise#28976
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-07-15 23:29:44 +02:00
tsm-odoo 7821fdd957 [IMP] bus: introduce presence service
The code handling user presence and the one handling bus notifications
are mixed up. In order to ease the PR introducing the websocket in Odoo
and to clear this mess, the presence service has been introduced.

task-2053917

closes odoo/odoo#95981

Related: odoo/enterprise#29524
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-15 19:15:54 +02:00
Thanh Dodeur fcc6a008da [REF] mail, *: make rtc invitations use the new ChannelMember model
* test_discuss_full

channel invitation to rtc calls are now using the `ChannelMember` and
`mail.channel.partner` models instead of the `partner` and `guest`
models.

part of task-2692836

closes odoo/odoo#95898

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-15 14:21:50 +02:00
Sébastien Theys d4c4388518 [FIX] mail: fix read only check from _insertOtherRecord
`options` were not properly forwarded all the way to `_insertOtherRecord` which
lead to issues when a compute would try to insert an inverse that already
existed but for which the inverse of the inverse was not yet defined because it
also depended on a compute.

Part-of: odoo/odoo#95898
2022-07-15 14:21:50 +02:00
tsm-odoo 27b472e5ed [IMP] bus, *: remove obsolete web_client_ready when using bus
*: calendar, iap_mail.

Now that the bus service is a wowl service, we don't need to wait for
the webclient to be ready before using it. Indeed, the services now
have the bus service as a dependency which means it will always be ready
in time. This also showed that the rpc service was missing as a bus service
dependency. It has been added.

Some part of the code were also checking if the bus service was in
`env.services`. Those calls have been removed as well since we now
have the guarantee that it is.

closes odoo/odoo#96002

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-14 16:42:19 +02:00
Sébastien Theys f7ba6ce258 [FIX] mail: fix editing last message with arrow
task-2918507

closes odoo/odoo#95932

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-07-14 11:42:54 +02:00
Matthieu Stockbauer 3ae11c87e8 [IMP] mail, *: adapt bus service to wowl env.
*: bus, calendar, iap_mail, im_livechat, project, web.

In order to ease the PR introducing the websockets in Odoo, the bus service
has to be updated to be a wowl service. This PR takes care of it.

task-2053917

closes odoo/odoo#95824

Related: odoo/enterprise#29361
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-14 11:42:42 +02:00
Romeo Fragomeli b3e5bffb7f [FIX] mail: dropdown menu not at the right position
Since Bootstrap 5 migration, when we use the OWL `dropdown` component
it must have the class `o-dropdown-menu` and not `dropdown-menu`.

This commit replaces this class and also clean some CSS.

closes odoo/odoo#95899

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-07-14 10:22:42 +02:00
Nam Dao 5d50b4d89b [FIX] discuss: fix error open document inside channel on mobile device
When the user opens a document from the chat channel, the system opened the document, but the chat window is still there and covers the document.

closes odoo/odoo#95880

X-original-commit: 29fa81cc02e5f70ab4875164e290f8a69ffde2e3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-13 11:03:58 +02:00
Sébastien Theys 458cb9b55a [IMP] mail: display guest in channel member list
Part of task-2664860

closes odoo/odoo#95859

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-07-12 18:31:42 +02:00
std-odoo e9f712278d [IMP] microsoft_outlook, fetchmail_outlook *: improve usability
* fetchmail, google_gmail, fetchmail_gmail

Purpose
=======
Improve the usability of the outlook modules.

Specifications
==============
Remove the checkbox "Use Outlook" and instead use the
smtp_authentication and the server_type, to be consistent with Gmail.

Hide the password field for Outlook / Gmail mail servers.

Add constraints on the outgoing mail server to force the user to use
the right configuration (e.g. the from_filter, so the sending does not
fail).

Add an option in the mail module to install Outlook.

Show a message for the outgoing mail servers to explain each
authentication methods.

Task-2811567

Part-of: odoo/odoo#88215
2022-07-12 15:36:50 +02:00
Sébastien Theys 2e4ae1f5fb [FIX] mail: prevent crash when cancelling message edit
task-2917199

closes odoo/odoo#95814

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-07-12 13:21:30 +02:00
Rahul Prajapati 51c72ae955 [IMP] mail: open dm chat on mention or member click
Purpose:

Access the DM chat to a user when clicking on its @mention
(DM or chatter) or member name (in Discuss).
The same goes for @mention to channels.

Specifications:

- DM to Author should be opened after clicking on his name
- DM to Author should be opened after clicking on his mention
- DM to channel should be opened after clicking on it's mention
- There should be a grey background hover effect on channel members in
  members list

Task-2631948

closes odoo/odoo#92050

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-12 13:20:56 +02:00
FrancoisGe 1f4e583ba2 [FIX] web: CP lose init seach value
Before this commit, in the HomeMenu, typing several characters very
quickly could result in some not being present in the command palette
when it was opened.

Exemple:
In the HomeMenu,if I type "a" "b" "c" quickly the command palette will
open with the search value "/a" or "/ac". So we have lost the second
and/or third character.

Why:
All characters typed between the first and the moment the command pallet
is not yet mounted are lost because the search bar of the command pallet
is not yet available.

Solution:
If you use openPalette and the command palette is already open.
The configuration of the command pallet will be overwritten by the one
given to openPalette.
In our case, we can pass new configurations with the correct searchValue
until the command palette is returned.

closes odoo/odoo#95492

Task-id: 2906623
Related: odoo/enterprise#29230
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-07-12 04:21:33 +02:00
Hubert Van de Walle (huvw) 9392129e96 [FIX] mail: update record after activity edit
Steps to follow:

  - Go to a crm.lead
  - Schedule an activity
  - Click on edit
  - Click on mark as done in the popup
  - Move the lead to a new stage
  -> A missing record error is displayed for the activity

Cause of the issue:

  Once the activity has been mark as done (deleted),
  The crm.lead record is not updated. The old activity is then
  passed to the server where an error is thrown

Solution:

  Update the main view after editing an activity

opw-2878984

closes odoo/odoo#95748

X-original-commit: 0a740e819b7f2aa7feb527bb3223b272e4c9f967
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-07-11 20:25:23 +02:00
Romeo Fragomeli cf2d625a85 [FIX] mail,web: DiscussPublicView layout broken
Since BS5 migration [1], we added the possibility to customize the
BS utilities classes using Bootstrap API [2].

But in the mail module files was not added in the
`mail.assets_discuss_public` bundle so no utility class was generated.

Also, missing 'text-black' and 'text-white' are now added in the
compiled SCSS (for `mail.assets_discuss_public` bundle).

Refs:
[1] odoo/odoo#95450
[2] https://getbootstrap.com/docs/5.1/utilities/api/

closes odoo/odoo#95661

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-07-08 19:52:52 +02:00
Sébastien Theys 602ca8435b [IMP] mail: introduce WebClientViewAttachmentView
This will allow using the component directly into the new Owl form.

task-2886642

closes odoo/odoo#95436

Related: odoo/enterprise#29182
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-07-08 19:52:31 +02:00
Sébastien Theys 7b03c59353 [IMP] mail: introduce suggestion list item models
This allows removing the AND/OR mix in identifying fields of
ComposerSuggestionView.

Part of task-2741982

closes odoo/odoo#95341

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-07-08 18:44:59 +02:00
Sébastien Theys b80f045c16 [IMP] mail: move navigation methods to ComposerSuggestionListView
Part of task-2741982

Part-of: odoo/odoo#95341
2022-07-08 18:44:59 +02:00
Sébastien Theys 3aa248b2e0 [IMP] mail: move activeSuggestionView to ComposerSuggestionListView
Part of task-2741982

Part-of: odoo/odoo#95341
2022-07-08 18:44:58 +02:00
Sébastien Theys 4573b4e46e [IMP] mail: composerSuggestionListViewOwner in ComposerSuggestionView
Part of task-2741982

Part-of: odoo/odoo#95341
2022-07-08 18:44:58 +02:00
Sébastien Theys 9b40d86446 [IMP] mail: remove isActive from ComposerSuggestionView
Part of task-2741982

Part-of: odoo/odoo#95341
2022-07-08 18:44:58 +02:00
Sébastien Theys f2d930420e [IMP] mail: move onClickSuggestion to ComposerSuggestionView
Part of task-2741982

Part-of: odoo/odoo#95341
2022-07-08 18:44:58 +02:00
Sébastien Theys 7c995c4282 [IMP] mail: move suggestionViews to ComposerSuggestionListView
To correctly follow DOM tree in models.

Part of task-2741982

Part-of: odoo/odoo#95341
2022-07-08 18:44:58 +02:00
Sébastien Theys ff461773d0 [IMP] mail: introduce main and extra suggestions on composer view
Suggestion list view should depend on finding suggestables, not on the existence
of suggestion views (which themselves have to be computed on the suggestion list
view instead).

Part of task-2741982

Part-of: odoo/odoo#95341
2022-07-08 18:44:57 +02:00
Sébastien Theys 2943b95673 [IMP] mail: rename ComposerSuggestion to ComposerSuggestionView
Part of task-2741982

Part-of: odoo/odoo#95341
2022-07-08 18:44:57 +02:00
Sébastien Theys 2f561252d7 [MOV] mail: rename ComposerSuggestion to ComposerSuggestionView
Part of task-2741982

Part-of: odoo/odoo#95341
2022-07-08 18:44:57 +02:00