Commit Graph
65 Commits
Author SHA1 Message Date
Sébastien Theys a7485e53d6 [REF] mail, *: clean click and contains API
* = test_mail, hr, im_livechat

- Allow only selectors
- Add `value` check to `contains`
- Remove return from `click`

closes odoo/odoo#132799

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-23 17:40:07 +02:00
Xavier Bol (xbo) b88cdfe4d9 [FIX] mail: add missing function evaluateBooleanExpr in activity record
Before this commit, when the user tries to access to activity view,
a traceback is occurred because `ctx.__comp__.evaluateBooleanExpr`
is not a function used inside the template of `ActivityRecord`.
That function is in fact used in the view compiler but the
ActivityRecord component does not have that function defined.

This commit defines that function in `ActivityRecord` component to
correctly compile its template.

Steps to reproduce:
------------------
1. Install Project
2. Go to Project > Tasks > My Tasks
3. Select the activity view of `project.task`

Actual behavior:
---------------
A traceback is occurred saying `ctx.__comp__.evaluateBooleanExpr`
is not a function.

Expected behavior:
-----------------
The activity view should be loaded as before.

closes odoo/odoo#132610

Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-22 16:09:07 +02:00
Sébastien Theys d08a18b791 [IMP] mail, *: tests: use contains in click and insertText
* = account, calendar, im_livechat, mrp, project_todo, sms, snailmail,
    test_mail, web, website_livechat

`contains` is more efficient than `afterNextRender` as it does not wait
for several extra animation frames, and it is functionally more
meaningful.

closes odoo/odoo#130451

Related: odoo/enterprise#44999
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-21 21:00:03 +02:00
Michael (mcm) 9d6b380a24 [REF] *: adapt patches after new patch function
In the commit [1], the patch has been refactored to support the
native keyword `super`. The current commit just adapts the codebase
to that change.

task 3410198

[1]: 19ea1ac08043e22a811630968e44715cc3bfc495

Part-of: odoo/odoo#125716
2023-08-02 17:29:05 +02:00
Aaron Bohy c10b5d0b1b [REF] web,*: tests: remove legacyExtraNextTick
Now that most of the webclient codebase (fields, views, client
actions...) has been converted to owl, the legacy extra next tick
used in a lot of tests is no longer necessary. This commit removes
the helper and its usage. At some places, a real tick was needed,
but we didn't see it because of the use of the legacy extra next
tick.

Part of task~3439226

closes odoo/odoo#130236

Related: odoo/enterprise#44869
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-01 23:52:30 +02:00
Pierre Pulinckx (pipu) 3bc94e52ce [REF] *:Replace moment usages with luxon
luxon and moment are both used in the solution,
but these two libraries facilitate the manipulation
of dates. It was decided to replace all uses of
moment with luxon so we can then remove
moment.js from the code and lighten the assets.

task-3391739

closes odoo/odoo#128752

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-07-31 19:02:45 +02:00
Bastien PIERRE 65242e31e9 [IMP] *: Remove alias in JS files
Rename all imports with alias old system to the new js module system
Task ID: 3266759

closes odoo/odoo#127414

Related: odoo/design-themes#671
Related: odoo/enterprise#43716
Signed-off-by: Bastien Pierre (ipb) <ipb@odoo.com>
2023-07-27 11:58:34 +02:00
218ad8456a [REF] *: adapt codebase to new RelationalModel
This commit adapts the code in addons w.r.t. the introduction of
the RelationalModel.

Main changes that were requested are:
 - record datapoints no longer always have an "id" key in their
 data (they still do if the id field is in the view), so we use
 record.resId instead
 - the new model is based on fined-grained reactivity, so several
 components that previously relied on onWillUpdateProps to update
 their internal state no longer worked. Typically, using the hook
 "observeRecord" is the way to go now.
 - specialdata are no longer handled in the model, so the components
 needing specialData can use the hook "useSpecialData"
 - more generally, all overrides of models (RelationalModel or
 KanbanModel) needed to be reworked.

Part of task~3179751

Part-of: odoo/odoo#114024
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: FrancoisGe <fge@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: Pierre Rousseau <pro@odoo.com>
2023-07-24 20:17:50 +02:00
Pierre Pulinckx (pipu) 504b4a7178 [REF] *:Replace moment usages with luxon
luxon and moment are both used in the solution, but
these two libraries facilitate the manipulation of dates.
It was decided to replace all uses of moment with
luxon so we can then remove moment.js from the
code and lighten the assets.

task-3391739

closes odoo/odoo#127406

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-13 14:47:41 +02:00
luvi 410c3dce05 [FIX] mail: display strip animation on filtering activities
This commit fixes the display of the ColumnProgress component, which was
no longer displaying an animation when a filter is applied. This was due
to changes made in commit (1), introducing an "activeBar" key on the
value given to the ColumnProgress component.

A test has been modified to assert that the classes corresponding to the
animation are added as expected when a filter is selected.

1) 58ca40b032

closes odoo/odoo#124969

X-original-commit: b4857a5c4570d3824b581003cdf456bcdc29f75f
Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-06-15 00:12:45 +02:00
Sébastien Theys 9dba4e0d77 [REF] mail, *: reorganize JS files
Remove "fake" feature sub-folders that make files harder to find.

Note: If there are too many files in the main folder now, a new split
that actually makes sense can be done at a later time: this would not
just be code move, but removing coupling between said feature and the
rest of the code.

Apply consistent structure, where the top level folder is a feature (or
core), and sub-folders are subdivision of the feature depending on
context (closely related to assets bundles).

```
- core
    - common
    - public
    - web
- feature
    - common
    - public
    - web
```

The opportunity is taken to reorganize the top of the files and imports:
- Always use absolute path in imports to be able to find all usages of a
  file with a single search.
- Reorganize imports to group them by module, and to sort them
  alphabetically by path/feature.
- Always use single asterisk (*) for `odoo-module`: less characters yay!
  And double asterisk should be used for JSDoc comments, not for custom
  instructions.

Part of task-3265211

closes odoo/odoo#124168

Related: odoo/enterprise#42121
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-06-08 21:52:44 +02:00
luvi 2a1a388ffb [FIX] mail: clear groupBy from ActivityModel load
This commit fixes issues that could happen when a groupBy is present
in the load params from the ActivityModel. Before the rewrite of the
view to Owl, this code was present but was forgotten. This causes
crashes whenever web_search_read is then called, leading to undefined
record in the template, and crashing the view.

Now, the groupBy param (if present) is replaced by an empty array.

A test has been added to verify that during the load, even if the
ActivityModel has received a groupBy in its load parameters.

closes odoo/odoo#124215

X-original-commit: b6fa8ec174f5467baaed32b0c12acd0224757281
Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>
2023-06-08 09:10:04 +02:00
Alexandre Kühn 23e60fb780 [FIX] mail: no access right issue on open chat from message avatar
Before this commit, when hr was installed and Demo clicks on avatar
of Mitchell Admin, open chat failed due to access right exception.

This happens because open chat works only with internal users, and
when we don't know whether the partner has an internal user, we have
to check whether there's a user linked to this partner.
Doing `searchRead()` without passing any field triggers this missing
access right for some reasons.

Only the knowledge of an existing `userId` is enough, so we
can actually just make a `search()` to get the user id. This won't
trigger the access right exception while giving the user id of
the partner if this exists, thus proceeding with open chat request.

closes odoo/odoo#123796

X-original-commit: 2f6dc5f4222d380cf77c6660ccce8b7381e0e64a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-06 11:45:14 +02:00
std-odoo 09095db293 [IMP] web, mail: open the chat window when clicking on an avatar property
Purpose
=======
Like standard avatar widget, we want to open the chat window of a user
when clicking on a many2many / many2one avatar property.

Task-3208449

Part-of: odoo/odoo#114200
2023-05-17 13:37:37 +02:00
Pierre Paridans eef262abf4 [FIX] *: adapt QUnit tests and tours
[FIX] *: selectors in tours

[FIX][TMP] account: CogMenu selector in tours

[FIX][TMP] web*: Breadcrumb targetting in tours

Adds a `o_breadcrumb` class to target the whole breadcrumb, no matter
how much elements it contains (collapsed parts, visible path, single
name...).

add classname on last breadcrumb item

[FIX][TMP] project: View buttons selector in tours (moved away from CP)

[FIX][TMP] project: Kanban selectors in tours (quick create)

[FIX][TMP] *: SearchBar selectors in tours (toggle menu)

[FIX][TMP] *: ButtonBox selector in tours

[WIP][IMP] web: add toggleSearchBarMenu in search helpers

adapt and unskip 3 list tests

adapt and unskip calendar tests

unskip web_tour test that actually pass

post rebase fix

allow to lose cell focus after multi edition (given to searchbar) - bug reported, to check later

post rebase fixes

fix

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Alexandre Kühn cae9820add [FIX] test_mail: use patched date in activity view test
Before this commit, tests were using current date to make assertion.
It's best to avoid making tests that use current date, as it might
fail when run at specific time (e.g. at midnight or during holidays).

closes odoo/odoo#120800

X-original-commit: 5bcef0f1d6ab48e408bc5058ea90d85f96da8928
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-09 06:07:51 +02:00
Julien Carion (juca) ffe9e6d9b1 [FIX] mail: Fix activity progress bar filter
This commit simply fixes how the activity renderer propagates the
group.progressValue prop to the ColumnProgress component so that
the active value is only set for the filtered column and not for every
column.

opw-3272571

closes odoo/odoo#120733

X-original-commit: 3bd539913e9ca6f9db9bb55caaa4a85b69a912e0
Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-05-08 23:39:49 +02:00
fdardenne 6c881fda04 [FIX] mail: activity view: fix the records limit
The activity view is an aggregation view, meaning that we show all the
activies with no limit of records.

Steps to reproduce:
There is no easy way to reproduce the bug, the database should be
populated with more than 80 records in a model and have an activity
planned for the 81th record.

Current Behaviour:
The Activity view loads all the activities without limit and so the
activity for the 81th record. The problem is that the 81th record does
not have been loaded due to the default limit of the RelationaLModel.
Therefore the activity view crash because it cannot fetch the missing
record for a loaded activity.

Expected Behaviour:
The activity view laods all the activities but also loads all the
records so it can render them.

closes odoo/odoo#120654

X-original-commit: 885c7bb33a3cb25962c090290e6b27bc11a71f41
Signed-off-by: Luca Vitali <luvi@odoo.com>
Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>
2023-05-05 13:52:34 +02:00
b5794e89e1 [IMP] web: Owl DateTimePicker
This commit introduces a date picker OWL component meant to handle the
following use-cases:
- date picker
- date & time picker
- date range picker
- date & time range picker

Basically, this component is the union of the two previous third-party
libraries handling these cases: TempusDominus and DateRangePicker.

New components introduced:

* The main addition of this commit is the `DateTimePicker` itself which
handles the display and interactions of the calendar and time pickers.
> see @web/core/datetime/datetime_picker

* The picker can then be coupled to an input using the
`useDateTimePicker` hook. The purpose of this hook is to handle events
on a given input element and syncronize its value to a date picker it
will spawn in a popover.
> see @web/core/datetime/datetime_hook

* Lastly, a simple `DateTimeInput` component will render an input and
call the hook mentioned above to handle it. This component is
effectively replacing the previous DatePicker and DateTimePicker
components (note that it does not handle range values).
> see @web/core/datetime/datetime_input

Another noticeable change of this commit is the definition of daterange
fields in views:

- Previously, the arch would have to define both fields
and bind them via their options, while also adding an arrow between
inputs or other forms of connection.

- In the new implementation, only the start date field must be declared,
and a date range can be spawned by providing an `end_date_field` in its
options.

Example:
```xml
<field
    name="start_datetime"
    widget="daterange"
    options="{'end_date_field': 'end_datetime'}"
/>
```

warning Added limitations:

- this new way of declaring date ranges means that templates have been
revised to declare one field tag instead of two. This means that list
views using date ranges have lost the ability to be sorted on their end
date fields.

> Justification: the current use cases have been reviewed and it has
been decided that it was not needed to sort on the end date on the
affected list views.

> Workaround: drop the date range and declare both fields as simple date
pickers (i.e. without the end_date_field option).

- all modifiers applied to a field using a date range will be copied and
applied to the end date field. There is no way to define modifiers
specific to one field or the other.

> Justification: there was no use case where one of the two fields
needed specific modifiers.

> Workaround: same as the previous point: split the range into 2 simple
date picker fields.

Additional notes:

- the widget="daterange" is not mandatory in form views, but is required
in list views because only fields with explicit widgets will not be
rendered as simple <span> elements. The date range feature will be
available as soon as an end_date_field is specified.

- as the end date field is not explicitly defined in the view anymore,
any modifier depending on it need to have it defined as invisible
somewhere in the arch.

Task ID: 3121497

Part-of: odoo/odoo#112171
Co-authored-by: Julien Carion <juca@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Pierre Pulinckx <pipu@odoo.com>
2023-05-05 13:52:22 +02:00
Jorge Pinna Puissant 38acd9f7d4 [FIX] mail, test_mail: Keep track of last update images
Since [1], a unique id is used for fieldNodes, therefore, the code to
keep track of last update images on the activity view needs to change
also.

Before this commit, we search the write_date on the fieldModes using the
id, and if it's not present, a new one is created using as id
"write_date".

Now, as a unique id is needed, we search using the name, and if it's not
present, a new one is created using as id "write_date_0".

Note that this is already the behavior on kanbanParse.

[1]: https://github.com/odoo/odoo/commit/baebb6a5b05ac8d59501a6071a5513e31a4ca047

closes odoo/odoo#118320

Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-04-13 04:08:53 +02:00
7710c3331e [REF] mail, *: refactor Discuss
This commit refactors discuss code to use OWL components
and new tools and services in web/.
Functionally, Discuss app should work relatively the same as
before this commit.

closes https://github.com/odoo/odoo/pull/110188

Related:
https://github.com/odoo/enterprise/pull/38058
https://github.com/odoo/upgrade/pull/4423

closes odoo/odoo#110188

Related: odoo/upgrade#4423
Related: odoo/enterprise#38058
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Alexandre (aku) <aku@odoo.com>
Co-authored-by: Didier (did) <did@odoo.com>
Co-authored-by: Géry (ged) <ged@odoo.com>
Co-authored-by: Louis (wil) <wil@odoo.com>
Co-authored-by: Maël (mapa) <mapa@odoo.com>
Co-authored-by: Maryam (maki) <maki@odoo.com>
Co-authored-by: Sébastien (seb) <seb@odoo.com>
Co-authored-by: Thanh (tso) <tso@odoo.com>
Co-authored-by: Matthieu (tsm) <tsm@odoo.com>
Co-authored-by: Zelong (zel) <zel@odoo.com>
2023-03-17 11:47:09 +01:00
Pierre-Yves Dufays 5c5282ba15 [FIX] {test_}mail: fix send message button activation (_mail_post_access)
The attribute _mail_post_access='read' on a model allows user with read only
access on the model to post a message. It was not taken into account on the
client side, making the send message button disabled for user with readonly
access on such model. This commit fixes this issue and now correctly takes
into account that class parameter.

Task-3178885 (Mail: fix 'readonly' post support)

X-original-commit: odoo/odoo@d2b8612cf7
Part-of: odoo/odoo#114511
2023-03-07 18:03:03 +01:00
Romain Estievenart a10967214b [FIX] mail, test_mail: h-scroll broken on small screen
This commit add the missing `o_action_delegate_scroll` on the activity
view controller on small screen device to scroll the activity view
content only instead of the whole controller (i.e. control panel
included).

Steps to reproduce:

1. Open Project on small screen device like a smartphone
2. Open a Project like 'Office Design'
3. Switch to the Activity view and try to scroll horizontally
 => The whole activity controller currently scroll => bug

closes odoo/odoo#110531

X-original-commit: e4d6a8ad14abee72d61fd01d8b601acc6bfa2c49
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-01-20 21:56:48 +01:00
Thibault Delavallée 1a1acabd7b [REF] mail: cleanup mono/multi record composer behavior
RATIONALE

Improve usage of composer in comment or email mode: support batch-posting in
comment, support more configuration from templates, improve global model.

SPECIFICATIONS

Support a real res_ids field on mail.compose.message model. Instead of relying
on active_ids from context, store it once for all at composer level and use
it in code. Active_ids usage is still done at default_get level, using it to
populate the field.

Improve usage of domain, renamed to res_domain to match other document related
fields naming. Add support of a res_domain_user_id field allowing to set the
user from which the domain should be evaluated.

Composer now runs on a list of IDs. Mass mail mode and comment mode are now
distinct from running on a singleton or on more records. Rendered or raw
mode is not triggered by

  * mass mailing mode: always display raw mode, whatever the number of records;
  * comment mode: display rendered mode when having a single record (like the
    previous comment mode). Display raw mode when having either no records
    either at least two records.

Task-3035101 (Mail: Support batch-posting from composer)

Part-of: odoo/odoo#99482
2023-01-17 20:58:39 +01:00
Thibault Delavallée 418761e344 [LINT] mail, various: use explicit subtype in message_post_{with_...}
RATIONALE

Purpose of this commit is to be explicit in subtype chosen when invoking the
message composer / calling message_post. As default value may not always be
clear, better be explicit in case the composer default value changes.

SPECIFICATIONS

Add explicit references to subtype when it is not obvious what will be the
final subtype, notably when using helpers (post_with_view or template which
uses the composer that is not crystal clear in its subtype management).

In this commit we also add support of XMLID-based subtype when invoking the
composer. A ``default_subtype_xmlid`` context key is transformed into a
``default_subtype_id``, to be used notably in JS where we cannot easily
use a ``ref``-like statement. Post API now also supports 'subytpe_xmlid'
argument allowing to give the xml id and ease calling the methods.

Use ``_xmlid_to_res_id`` to get directly the ID of subtypes in order to
avoid useless queries from ``ref`` that does an exists.

Also remove useless values given to post API, notably author_id that is by
default the current users' partner.

Task-2710804 (Mail: Clean MailThread Posting API)

Part-of: odoo/odoo#99482
2023-01-17 20:58:33 +01:00
fdardenne e602a55503 [FIX] mail: activity view: luxon in rendering context
Since the refactoring of the activity view, luxon is not in the
rendering context. Resulting in crashing in some activity views
that used luxon in their template.

- Go to Appraisal
- Switch to the activity view
- Create a record in this view -> crash

Now, luxon is in the rendering context.

closes odoo/odoo#109153

Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-01-10 10:16:51 +01:00
fdardenne ca80a60199 [IMP] mail: activity view: allow to filter columns
Before, in activity view, it was not possible for users to hide
never used columns.

Now it is possible for users to hide and show columns in the
activity view.

task-3039919

Part-of: odoo/odoo#109153
2023-01-10 10:16:51 +01:00
Alexandre Kühn 732bb71628 [FIX] mail: improve add in model sorted field
Before this commit, processing of pinned channels during
init_messaging was slow due to sorting them in sidebar
of discuss.

This commit improves the sort so that we do a binary insertion
on add rather than push + quick-sort.

Before what took 2.2 seconds now takes around 0.6 seconds.

closes odoo/odoo#108839

X-original-commit: dd4c3c0a8e38147065980cf2c431b056a5253255
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-01-02 11:53:21 +01:00
fdardenne 89947487f3 [FIX] mail: activity view: add activity_ids in model domain
Since #107916, the ActivityModel did not include
`["activity_ids", "!=", false]` in its domain, causing incoherence in
some views and resulting in crashes.

To reproduce the issue:

- In the runbot, navigate to Website -> eCommerce -> Product.
- Switch to the activity view.
- Remove the Published filter.
- The view crashes due to an incoherence between the data records
  in the `web_search_read` and the `get_activity_data` calls.

This commit resolves the issue by correctly setting the domain.

closes odoo/odoo#108807

Signed-off-by: Luca Vitali <luvi@odoo.com>
2022-12-29 20:08:42 +01:00
luviandFlorent Dardenne 97cc94269d [REF] mail, *: convert Activity view to Owl
*: project, web

This commit converts the Activity view to the current framework shared by
other views. Instead of extending Kanban view/elements, the Activity view
has been implemented by its own.

The project customization of the view has also been converted, as legacy
files have been removed.

Some tests have been adapted since some classnames might differ from the old
implementation, resulting to failing tests. But the overall testing cases
have been conserved.

closes odoo/odoo#107916

Related: odoo/enterprise#35177
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Florent Dardenne <dafl@odoo.com>
2022-12-23 16:07:06 +01:00
Alexandre Kühn cc6546677d [IMP] mail, *: Rename component to match model (step 2)
[IMP] mail: rename ActivityBox to ActivityBoxView (component)
Task-3046113

[IMP] mail: rename ActivityMarkDonePopoverContent (component)
Task-3046122

[IMP] mail: rename AttachmentBox to AttachmentBoxView (component)
Task-3046129

[IMP] mail: rename AttachmentDeleteConfirm (component)
Task-3046160

[IMP] mail: rename CallActionList (component)
Task-3046187

[IMP] mail: rename CallParticipantVideo to CallParticipantVideoView (component)
Task-3046193

[IMP] mail: rename ChannelInvitationFormSelectablePartner (component)
Task-3046287

[IMP] mail: rename ChannelInvitationFormSelectedPartner (component)
Task-3046288

[IMP] mail: rename ChannelMember (component)
Task-3046298

[IMP] mail: rename ChannelMemberList (component)
Task-3046306

[IMP] mail: rename ChannelMemberListCategory (component)
Task-3046307

[IMP] mail: *: rename ChatWindowHeader (component)
*: hr, im_livechat, website_livechat
Task-3046330

[IMP] mail: rename ChatWindowHiddenMenu (component)
Task-3046358

[IMP] mail: rename ChatWindowHiddenMenuItem (component)
Task-3046515

[IMP] mail, *: rename Composer (component)
*: hr_recruitment, im_livechat
Task-3046555

[IMP] mail: rename ComposerSuggestedRecipient (component)
Task-3046598

[IMP] mail: rename ComposerSuggestedRecipientList (component)
Task-3046624

[IMP] mail, *: rename ComposerTextInput (component)
*: im_livechat
Task-3046648

[IMP] mail: rename DeleteMessageConfirm (component)
Task-3046661

[IMP] mail, *: rename Discuss (component)
*: im_livechat
Task-3046685

[IMP] mail: rename DiscussMobileMailboxSelection (component)
Task-3046703

[IMP] mail: rename DiscussMobileMailboxSelectionItem (component)
Task-3046709

[IMP] mail, *: rename DiscussSidebar (component)
Task-3046719

[IMP] mail: rename DiscussSidebarMailbox (component)
Task-3046732

[IMP] mail: rename DropZone (component)
Task-3046739

[IMP] mail: rename FollowButton (component)
Task-3047154

[IMP] mail: rename Follower (component)
Task-3047203

[IMP] mail: rename FollowerListMenu (component)
Task-3047236

[IMP] mail: rename FollowerSubtype (component)
Task-3047272

[IMP] mail: rename MailTemplate (component)
Task-3047314

[IMP] mail, *: rename Message (component)
*: im_livechat, sms, snailmail, website_sale
Task-3047352

[IMP] mail: rename MessageAuthorPrefix (component)
Task-3047683

[IMP] mail, *: rename MessageList (component)
*: hr_recruitment, website_livechat
Task-3047718

[IMP] mail, *: rename MessageNotificationPopoverContent (component)
*: sms
Task-3047742

[IMP] mail: rename MessageSeenIndicator (component)
Task-3047765

[IMP] mail, *: rename MessagingMenuTab (component)
*: im_livechat
Task-3047802

[IMP] mail: rename MobileMessagingNavbar (component)
Task-3047806

[IMP] mail, *: rename NotificationGroup (component)
*: sms, snailmail
Task-3047829

[IMP] mail, *: rename NotificationList (component)
*: im_livechat
Task-3047871

[IMP] mail: rename NotificationRequest (component)
Task-3047883

[IMP] mail, *: rename PersonaImStatusIcon (component)
*: hr_holidays
Task-3047969

[IMP] mail, *: rename ThreadIcon (component)
*: hr_holidays, im_livechat
Task-3047980

[IMP] mail, *: rename ThreadNeedactionPreview (component)
*: im_livechat, rating, test_mail_full
Task-3048021

[IMP] mail, *: rename ThreadTextualTypingStatus (component)
*: im_livechat
Task-3048042

[IMP] mail, *: rename ThreadTypingIcon (component)
*: im_livechat
Task-3048043

[IMP] snailmail: rename SnailmailError (component)
Task-3048051

[IMP] website_livechat: rename VisitorBanner (component)
Task-3048069

Task-3047725

closes odoo/odoo#104548

Related: odoo/enterprise#33411
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-28 20:39:58 +02:00
Sébastien Theys bade59a3a7 [IMP] mail, test_mail: convert legacy code from activity view cell
task-3026018

closes odoo/odoo#103326

Related: odoo/enterprise#32853
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-27 12:40:09 +02:00
Aaron Bohy 0f95ca923b [REF] mail,test_mail: stop using legacy view dialogs
This commit replaces two usecases of the legacy FormViewDialog and
SelectCreateDialog, as we are about to remove them.

closes odoo/odoo#101819

X-original-commit: b1574ae38be45e871e505100c2342887ed7dba8b
Related: odoo/enterprise#32132
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-01 14:52:27 +02:00
Sébastien Theys 7621343501 [IMP] mail: create kanban and list activity field components
closes odoo/odoo#101330

X-original-commit: 069220ac94b3e33201991aa04506f1aa4227be1d
Related: odoo/enterprise#31869
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-09-27 19:14:51 +02:00
tsm-odoo 30f6a5739f [IMP] test_mail: remove jquery usage from activity widget test
Adapt the activity widget test to use vanilla js instead of JQuery.
Moreover, selectors have been adapted to rely less on the DOM structure
and more on significant class names.

closes odoo/odoo#99924

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-14 21:22:02 +02:00
tsm-odoo 898e69b8df [FIX] test_mail: fix activity widget test
Before this PR, any fail during the QUnit test suite would have failed
the activity widget test. This is due to the fact that this test was
relying on the activity table to be the only table present in the
document. This issue is that QUnit is also using table to display
failed tests. Thus, the activity widget test was looking in the wrong
table to find its elements.

This commit fixes the issue by ensuring the test is actually targeting
the right table that is, the one inside the activity view.

Part-of: odoo/odoo#99924
2022-09-14 21:22:02 +02:00
Sarika Shekhada 2be526b295 [FIX] web: fix the traceback on schedule activity view
Before this commit, when we open activity view and click on schedule
activity >> select a record there is a trackback due to the
invalid default_res_id passed in context.

So in this commit, fixes the issue by passing the valid res_id in
instead of object with id and display_name.

task-2927335

closes odoo/odoo#96999

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-24 21:06:55 +02:00
tsm-odoo 75007b578e [MOV] bus, *: move startServer test helper to the bus module
*: calendar, hr, hr_holidays, im_livechat, note, rating, snailmail,
test_mail, test_mail_full, website_livechat, website_slides.

Part-of: odoo/odoo#97771
2022-08-10 14:43:41 +02:00
Romeo Fragomeli a1dbac0f9b [FIX] web: adapt checkbox and boolean_toggle for BS5
In the BS5 migration, the legacy `checkbox` and `boolean_toggle` widget
were adapted but not the OWL Component.

Also, we have tweaked the old widget and the component to have better
positioning and margins.

Note:
the CSS for the print is already done in BS5
```css
@media print {
  .form-check-input {
    color-adjust: exact;
  }
}
```

Also we change `offsetWidth` by `getBoundingClientRect().width` in
`list_renderer` to avoid inaccurate rounding in columns width's
calculation.

Lastly a `.o-checkbox` class is added to the Checkbox component for a
more universal and context independent targetting.

closes odoo/odoo#96185

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-01 13:26:31 +02:00
Brieuc-brd f7469552a1 [IMP] mail, test_mail: TrackingValue, redesign
This commit redesigns the `TrackingValue` component.
Part of the ChatWindow/Discuss redesign

task-2823627

closes odoo/odoo#92872

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-29 15:53:06 +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
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
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
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Aaron Bohy 4f984568e1 [REF] *: adapt code to new kanban view
This commit makes various adapations in addons with respect to
the introduction of the owl kanban view. Mainly, some selectors
in scss and in tests needed to be adapted. Moreover, in some tests
that we haven't adapted yet, we must ensure that legacy form and
list views are still used (useLegacyViews).

It also contains some adaptations in kanban templates, e.g. the
replacement of moment by luxon, the removal of underscore...

Part-of: odoo/odoo#92475
2022-06-30 09:29:45 +02:00
tsm-odoo e97214ff4e [IMP] mail, *: remove createMessagingMenu during tests
*: im_livechat, test_mail, test_mail_full.

The createMessagingMenu helper was used during tests to mount
the messaging menu and test it. However, this approach is not
very realistic and blocks some waiting PRs. In order to get closer
from the reality, let's instanciate a webClient and a systrayService
for the messagingMenu to be present at all time.

closes odoo/odoo#94301

Related: odoo/enterprise#28747
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-22 16:32:42 +02:00
tsm-odoo 3573a7fef4 [IMP] mail, *: use wowlEnv instead of the legacy one
*: bus, calendar, hr, hr_holidays, im_livechat, mail, mail_bot, note, project,
sms, snailmail, test_mail, web, website_livechat, website_slides.

task-2582313

closes odoo/odoo#83774

Related: odoo/enterprise#26493
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-30 19:40:53 +02:00
tsm-odoo 038e83e7aa [IMP] mail, *: replace target by document
*: hr, hr_holidays, im_livechat, test_mail.

The target returned by the mail's test utils start method is useless since it's
almost the same thing than querying document. Let's remove it and replace it by
document. This will reduce the diff in the PR introducing the new environment in
the discuss app.

task-2582313

closes odoo/odoo#92077

Related: odoo/enterprise#27670
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-24 11:43:57 +02:00
tsm-odoo e423618dca [IMP] mail, *: prepare activity menu tests to wowl env
*: calendar, note, test_mail.

This PR prepares the ground for the one introducing the new environment in the discuss app.
Indeed, the start helper won't be able to handle widget anymore. To solve this issues,
we're now adding the activityMenu widget to the systrayMenu.Items array, this will be
mapped by the createWebClient helper to component and added to the new systray item
registry.

task-2582313

closes odoo/odoo#91953

Related: odoo/enterprise#27614
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-23 16:27:54 +02:00
tsm-odoo 9c1cf242c0 [IMP] mail, *: replace widget el by target
*: hr, test_mail.

This PR prepares the ground for the one introducing the new environment in the
discuss app. Indeed, the createWebClient helper will be used instead of createView/Widget
thus the returned value won't be a Widget anymore but a DOM element. This change impacts
they way the tests were written: JQuery functions have to be transformed to native JavaScript
ones. In order to reduce the noise in the main PR, those changes are done now.

task-2582313

closes odoo/odoo#91290

Related: odoo/enterprise#27313
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-13 18:11:00 +02:00