Commit Graph
676 Commits
Author SHA1 Message Date
tsm-odoo 4dd66feaff [FIX] im_livechat, *: fix chat requests from operator
*: mail, website_livechat.

This PR fixes two issues with the live chat requests when initiated by the
operator:
- Thread name should not include "website" since [1]
- Welcome message should not be shown when the operator is the one who
initiated the chat

[1]: https://github.com/odoo/odoo/pull/125931

closes odoo/odoo#132815

X-original-commit: 38a6658beec8bd4423ee8b4ac16f2592b9fb36ff
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-23 14:44:00 +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
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
Jorge Pinna Puissant e338487028 [REF] *: remove owl="1" from the templates
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.

Part of task~3443861

Part-of: odoo/odoo#130467
2023-08-11 14:32:30 +02:00
Louis Wicket (wil) f1722c7334 [IMP] *: unify sprintf and gettext
Improve gettext to directly handle value injection within translations,
removing the need for sprintf.

closes odoo/odoo#123932

Related: odoo/enterprise#45370
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-10 18:14:04 +02:00
tsm-odoo 7131f7c626 [IMP] mail, *: add support for guests/dynamic users in tests
*: bus, calendar, im_livechat, web, website_livechat.

This PR adds the possibility to set the current user during tests as
well as the mail guest. This will be used to test mail guest page and
livechat once the visitors will be treated as guests.

part of task-3332628

closes odoo/odoo#130811

Related: odoo/enterprise#45331
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-08-09 14:36:12 +02:00
Michael (mcm) 00d8aef1c7 [REF] web, *: remove legacy patch
This commit removes legacy patch/unpatch functions and adapts their use
by using the modern patch. There was also a custom patch function used
in tests which has been replaced too.

closes odoo/odoo#130867

Related: odoo/design-themes#685
Related: odoo/enterprise#45271
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-07 10:58:48 +02:00
tsm-odoo 7c932aa6c8 [FIX] im_livechat: use public user during tests instead of admin
Before this PR, the user during livechat embed tests was the admin partner while
it should be the public partner. This commit fixes the issue.

part of task-3332628

closes odoo/odoo#130429

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-08-03 10:43:01 +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
tsm-odoo 7b88ae4760 [FIX] mail, *: start bus service lazily
*: im_livechat, web.

Since [1] the messaging service is added to the livechat embed
bundle. As a consequence, the bus service is started even when
it is not needed. This is wrong since it would lead to lots of
useless connections to be made.

This PR prevent mail services from starting the bus eagerly in
this context and adds a tour in order to prevent further errors
on this matter.

closes odoo/odoo#130059

X-original-commit: b2bcef3c3b57061ef0694a5fc3c326cc8babc818
Related: odoo/enterprise#44782
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-02 13:20:11 +02:00
tsm-odoo b5896c9d03 [IMP] *: add generic make_jsonrpc method in tests
*: bus, crm_livechat, crm_mail_plugin, im_livechat, payment, payment_demo,
pos_online_payment, test_discuss_full, test_mail_full, tests, website_livechat,
website_sale.

Several python tests have their own way to make jsonrpc requests. This PR adds a
generic `make_jsonrpc_request` method to the `HttpCase` in order to provide a
generic way to do so.

At the same time, calls to `_open_livechat_channel` are removed in favor of
jsonrpc request to `get_session`. This makes the tests more realistics (some
incoherences were present like passing `country_id` to the open channel method
while the user country id is not set...)

Finally, this will ease the diff in the PR introducing livechat visitors as mail
guests.

part of task-3332628

closes odoo/odoo#130036

Related: odoo/enterprise#44840
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-31 23:21:10 +02:00
tsm-odoo 577f0b3471 [IMP] mail, *: remove setup manager patches in test
*: im_livechat, website_livechat.

Before this PR, services has to be added to the setup manager in order to be loaded in tests. This was cumbersome because the setup manager was patched by each sub-feature to add feature related services to the registry. The same had to be done for systray/main components registries.

This PR automates this process in order to remove the patches.

closes odoo/odoo#129705

Related: odoo/enterprise#44596
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-28 16:28:52 +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
Pierre Pulinckx (pipu) 8bfa76a842 [REF] *: Unify _t and _lt
The goal of this commit is to prepare ground to remove
lazytranslate function _lt() and keep only _t()
for a better understanding of the use of the translation function.

In this commit,

the translate function _t() has been updated to return the translation
if they are loaded. If not, it throws an error.
the lazytranslate function _lt() returns _t() function.
Corollaries :
Steps in test tours are now a function that returns an array of steps
to avoid any interpolation of _t in this ones before translations has
been loaded.

Example :

registry.category("web_tour.tours").add("example", {
    test: true,
    steps: () => [
        {...},
        {...},
    ],
});

task-3292454

closes odoo/odoo#124157

Related: odoo/enterprise#43153
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-07-19 13:13:16 +02:00
tsm-odoo 630690ca1a [FIX] im_livechat: fix crash when user changes after starting livechat
Before this commit, a crash occurred when the user changed after
starting a livechat conversation.

Steps to reproduce (login => logout)
- Login on admin
- Go to the website
- Start a livechat conversation
- Logout
- Start typing on the chat window composer
- Crash due to `NotFound` raised after `notify_typing`

The same error could occur the other way around (logout => login).
This error is due to the user not being a channel member after it
changed.

In order to fix this issue, livechat session is cleared when the
user changes. Indeed, it the "new" user is not linked to the livechat
conversation so it makes no sense to display it.

fixes https://github.com/odoo/odoo/issues/128206
opw-3421386

closes odoo/odoo#128595

X-original-commit: 3cea3878911831eee5abee9272c7b81145ee7128
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-17 12:06:09 +02:00
tsm-odoo 2b401d078d [IMP] mail, website_livechat: show visitor lang on member list
Before this commit, the lang of the visitor was only shown on the
member list based on the `anonymous_country` of the channel.

In order for this information to be as complete as possible, the
lang is now also checked on the website visitor if there is one.

part of task-3332872

closes odoo/odoo#128242

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-13 16:52:58 +02:00
Martin Trigaux cd2f330bec [IMP] *: remove glocal ACL
Specify explicit route for each ,, line
This is part of task 3230280 where global ir.model.access will be
forbidden.
The goal is to make access to public/portal explicit. Too often,
global access was granted with only employees in mind.

Remove ,,0,0,0,0 lines

mail:
employee already had read access to mail.group
still needed to subtypes as in ir.rule domain

mail_group: employee already had read access
pos_mercury: only needed for employees

membership:
move public access for website_membership as needed in the controllers

website_customer: employee already had read access

website_event_booth: no need for category
website_event_exhibitor: retrieved in sudo
website_event_track: not needed for location

Part-of: odoo/odoo#125216
2023-07-11 22:33:47 +02:00
Louis Wicket (wil) ce07b37111 [IMP] mail: make channel_info private
Make `channel_info` private so that it is no longer exposed to RPCs.

closes odoo/odoo#127078

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-04 00:51:54 +02:00
tsm-odoo 61ef69a8cf [IMP] im_livechat: small name, ui changes
This PR improves several things linked to visitors in the discuss
app:
- Change window header to "Visitor #, country"
- Change operator's name to Online Chat name if defined
- Rename "Public user" to "Visitor #", add country instead of website
- Change name of the thread to "Visitor #, country" (left panel + header)
- Remove "Website" from visitor's name (small and big threads)

part of task-3332872

closes odoo/odoo#125931

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-03 21:56:01 +02:00
tsm-odoo 7ec8d66ce4 [IMP] im_livechat: improve livechat channel kanban
This PR improves livechat channel kanban:
- Remove image field (always the same and does not bring value)
- Replace the count of operators by the many2many_avatars widget with connected users
- Join button as secondary button, Leave button color should be primary
- Add options from channel card: Ratings + configure
- Compute ratings based on last 2 weeks on channel's card
- Highlight active channels (at least one operator)

part of task-3332872

closes odoo/odoo#125769

Related: odoo/enterprise#42852
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-03 21:55:56 +02:00
tsm-odoo 9988476b7b [FIX] website_livechat: fix visitor banner avatar
Before this PR, the visitor id was passed to retrieve the
partner avatar which leads to wrong avatar being displayed
in the banner. This PR fixes this issue and adapt the avatar
shape from `rounded-circle` to `rounded` since it was not
adapter after the milk update.

closes odoo/odoo#126969

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-30 23:38:12 +02:00
tsm-odoo 9beb4668ca [IMP] im_livechat: improve feedback messages
This PR improve feedback messages:
- Visitor has left the conversation: as note
- Rating message: as note
- Rating message: Use same emojis as for customer
- Rating reason in same message as the emoji, without writing "reason"
- Feedback done in 1 rpc instead of 3

part of task-3332872

closes odoo/odoo#125925

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-29 18:20:25 +02:00
tsm-odoo 21c1000581 [FIX] website_livechat: fix im_status wrongly positionned
Before this PR, the `im_status` of a visitor was wrongly positionned
in the discuss app banner.

This commit fixes the issue.

closes odoo/odoo#124921

X-original-commit: 09109573814d5a83c4e5432ffe1b252f3e75e954
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-06-14 07:18:43 +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
tsm-odoo 70d318876e [FIX] website_livechat: fix non rounded website livechat button
Since [1] the origin livechat button has no border on the bottom.
This conflicts with the skin of the website livechat button
which is displayed as a circle. This commit solves this issue.

[1]: https://github.com/odoo/odoo/pull/123684

closes odoo/odoo#124126

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-07 15:58:54 +02:00
tsm-odoo 20c1772d35 [REF] im_livechat, *: refactor livechat
This PR refactors the public livechat in order for it to use
owl and to rely on the discuss components as much as possible.

task-2212347

closes odoo/odoo#122834

Related: odoo/enterprise#41636
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-02 22:29:06 +02:00
Martin Trigaux 2afdda2576 [I18N] *: export saas-16.3 source terms
closes odoo/odoo#123046

X-original-commit: 137f5ca0cb703ee953cb01db525362f7a778e6bd
Related: odoo/enterprise#41703
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-01 11:43:51 +02:00
tsm-odoo 7139a0db35 [REF] website_livechat: prettify tour files
This commit prepares the ground for the refactoring of the
public livechat by prettifying the files that will be modified
in order to ease the diff.

part of task-2212347

closes odoo/odoo#123022

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-31 13:08:19 +02:00
Chrysanthe (chgo) 1347909ede [FIX] mass-mailing, website_*: fix some .btn-secondary border
== ISSUE ==

With the new design introduced within Milk, most of the buttons received
a visual upgrade (eg. removing borders)

This change applied on most of the buttons since the same code, but some
buttons were using a `.border` class on top of that and so they did not
loose this border.

== After this commit ==

We clean up these buttons that were keeping a border, in order to make
our secondary buttons more consistent.

Please note that this change does not apply on all secondary buttons
since some of them are customized for a specific module and so remain
unmodified.

task-3326313
part of task-3326263

closes odoo/odoo#121990

X-original-commit: b2e338666f59a1c40e4dcb072928ee1ae5f3ab52
Related: odoo/enterprise#41310
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-23 08:42:15 +02:00
Louis Wicket (wil) 04189318cc [I18N] *: update master translations
Currently, only stable releases see their translations updated. This has
resulted in master accumulating outdated stuff for years, which can be
confusing for users testing master on runbot.

This one-shot commit resynchronizes master translations based on the
content from 16.0 and removes empty PO files (i.e. no longer containing
translations).

closes odoo/odoo#121629

Related: odoo/enterprise#41171
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-22 17:52:07 +02:00
Brieuc-brd fa60bac197 [IMP] *: app icons : add viewBox attribute
Prior to this commit, the SVG's viewBox attribute was missing, which
prevented svgs from being scaled.

This commit fixes this issue.

task-3326633
Part of task-3326263

X-original-commit: 30300c373ad1c63a6cf8b035cae0785a09c6933f
Part-of: odoo/odoo#121886
2023-05-22 13:54:08 +02:00
stefanorigano (SRI) 580db954fc [IMP] mail, website_livechat: avatars & Activity apply milk design
task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:15 +02:00
Brieuc-brdandElisabeth Dickinson 21d87a3da5 [REF] *: milk graphical assets
- apps icons
- base: replace demo avatars Mitchell, Marc and Joel
- mail: replace odoobot avatar

Part-of: odoo/odoo#116641
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
2023-05-12 22:59:14 +02:00
tsm-odoo b07085ef21 [IMP] mail,*: remove server data key in thread insert
*: im_livechat, website_livechat.

Before this commit, the `thread.insert` method received an arbitrary
`serverData` key. This was cumbersome since we needed to create this
key manually at each insertion.Moreover some attributes where coming from
dedicated keys, some from the  serverData key, some from both which led
to a bug-prone, hard to maintain code.

This commit removes the `serverData` key in order to solve those
issues.

closes odoo/odoo#121117

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-12 19:55:05 +02:00
tsm-odoo a3525aedbe [IMP] bus, *: add single notification subscription
*: calendar, iap_mail, im_livechat, mail.

Until now, one had to subscribe to the global "notification"
event of the bus service and to loop through each notification
to handle the one that was targeted.

This PR introduces the `subscribe` method on the bus service
in order to subscribe to a single notification type.

closes odoo/odoo#120893

Related: odoo/enterprise#40848
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-10 02:00:45 +02:00
Florent de Labarre c5d583ca35 [FIX] website_livechat: prevent DB usage after migration
In V16 visitor are unlinked after 60 days https://github.com/odoo/odoo/blob/16.0/addons/website/models/website_visitor.py#L351 (in V14 it is archived). After a migration a large database should unlink lot of visitor.
Before this commit the time to unlink are very long (some days).
After some hours.

closes odoo/odoo#120666

X-original-commit: e860db01341a3f4447b5c4cd61fe771e3a224ade
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-08 17:10:50 +02:00
Alexandre Kühn f1566d4d2d [MOV] mail,*: move static discuss/ to discuss_app/
*: im_livechat, website_livechat

In preparation of splitting 'discuss' and 'mail' modules.

This allow using new folder discuss/ that contains all static
files of new module 'discuss'.

Part of task-3265211

closes odoo/odoo#119860

Related: odoo/enterprise#40388
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-27 07:06:02 +02:00
Sébastien Theys 694d501a35 [REF] mail, im_livechat: move /mail/chat_post to im_livechat
It is only used there.

In preparation of splitting discuss and mail modules.

Part of task-3265211

closes odoo/odoo#119306

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-24 18:25:59 +02:00
Sébastien Theys 90cb44e1e1 [REF] mail, *: rename mail.channel to discuss.channel
* = bus, calendar, crm_livechat, hr, hr_holidays, im_livechat, mail_bot,
    mass_mailing, privacy_lookup, test_discuss_full, test_mail,
    test_mail_full, website_crm_livechat, website_livechat, base

In preparation of splitting discuss and mail modules.

Part of task-3265211

closes odoo/odoo#118354

Related: odoo/upgrade#4553
Related: odoo/enterprise#39661
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-21 02:21:53 +02:00
Benoit Socias 02ed9f5e66 [FIX] website, *: avoid using unescaped query parameters
*: google_recaptcha, web_editor, website_blog, website_event_booth,
   website_event_exhibitor, website_event_track, website_forum,
   website_jitsi, website_sale_comparison, website_slides,
   website_livechat, website_twitter

This commit fixes improperly escaped query parameters across javascripts
of website-related modules.

See https://github.com/odoo/enterprise/pull/31711

closes odoo/odoo#118599

X-original-commit: 89be076aa51b097ada48d0046006be4d9692ac1e
Related: odoo/enterprise#39783
Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
2023-04-18 11:33:46 +02:00
Michael (mcm) ff0d6dd580 [REF] *: replace odoo module by native one
This commit converts almost all odoo module by native module.
The goal is to deprecate odoo.define in favor of native module and then
simplify boot.js by removing the regexp that finds module dependencies.

task id: 3162300

closes odoo/odoo#117305

Related: odoo/enterprise#39118
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-03 17:07:24 +02:00
Arthur Detroux (ard) 1ebcdb0023 [FIX] website, *: check access rights to display elements in New+ modal
*: website_blog,website_event,website_forum,website_hr_recruitment,
website_livechat,website_sale,website_slides

Prior to this commit, elements inside the New+ modal had a `isDisplayed`
property that was meant to be changed by the patches done by each
module. Unfortunately, this was forgotten in the refactor done in [1]
and more precisely when the component was introduced in [2].

This commit fixes that by checking the access rights of the user on each
individual model used on the create form.

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
[2]: https://github.com/odoo/odoo/commit/ca2e143d54622d598201826a2cd669bad64b205d

opw-3198700

closes odoo/odoo#117206

X-original-commit: 58704cb7615addd7d40291431e05a894776320d8
Related: odoo/enterprise#39066
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-30 18:58:59 +02:00
Martin Trigaux 1be5eae8ef [I18N] *: remove nl_BE files
They dates from < 2027 and are quite outdated. Favour the nl
translation instead.
n_BE is not on Transifex so it was not possible to correct bad
translations.

closes odoo/odoo#115845

X-original-commit: d04c8b7e484db8306d858c891a7a2b11885fdcd9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-03-20 16:51:30 +01: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
Joseph CaburnayandJulien Mougenot 3a798039d6 [REF] web_tour,*: convert web_tour to owl
* The tours are now run by the `MacroEngine` defined in `macro.js`.
  * This is accomplished by converting (at runtime) the user-defined tours to
    `Macro`s. See `tour_compilers.js` for the step (and tour-to-macro) compilation.
* API is kept the same as much as possible. Basically, declaring tours stayed
  the same with some exceptions:
  * `allowInvisible` can be provided in a step to allow consuming the trigger
    element even if it is invisible.
  * `isCheck` can now be used to replace the no operation `run` that is
    traditionally signals the runner to only perform a check.
  * Before, multiple `run`s can be called simultaneously. Now, each `run` method
    is awaited before proceeding to the next step.
* If the trigger element is `disabled`, the tour runner will *not* proceed on
  calling the `run` method and the runner will stay on current step until the
  trigger element becomes `enabled`.
  * However, the tour runner is okay with `disabled` trigger element if the step
    has `isCheck = true`. As long as the trigger element is found for `isCheck`
    step, the tour runner will happily move to the next step.
* Some tours are adjusted to properly run with this new tour runner.
* When the tour failed:
  * The dom string is not logged anymore.
  * However, a warning message containing the relative location of the step will
    be logged. This is better in helping the author in locating the failed step.

**Some guidelines learned during the development:**

* Each step may trigger a dom mutation. It's a good practice to insert an
  intermediate step that *checks* the existence of an element that result from
  the action of the previous step.
* Refrain from using the `run` method for assertions. `run`, in principle, is
  provided to perform actions that are not offered by the helper. Use the
  `trigger` for assertions.
* During dev, find `SHOW_POINTER_DURATION` and set it to `250`. This will show
  the pointer (pointing to the trigger element) for 250ms when watching the
  tour.

closes odoo/odoo#107618

Task-id: 3082036
Related: odoo/enterprise#37560
Signed-off-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2023-03-15 13:19:45 +01:00
Maruan Aguerdouh (magm) 1274eb4c94 [FIX] website_livechat: fix traceback when giving review without any operators availables
Steps to reproduce:

- Install Discuss and Livechat.
- Open a window without logging in and trigger the Livechat.
- Select the "I have a pricing question" option, and it should tell you
that there are no operators availables.
- When it asks you for your email just type anything, and try to close
the window.
- When you have pressed on the "x" it should ask you to review the
service you had, select any of it and close the window.
- Now log into the database and go to the livechat app and go to the
livechat channel where we did the review, and inside it try to "Go to
Website".

Issue:

Traceback will be raised, caused of the review we have done which is not
asigned to anyone in the support team.

Solution:

When can handle this, and just still take into account the review we
just had (current fix). Or we should not let the user to review if we
don't have an agent to be reviewed.

opw-3143564

closes odoo/odoo#115242

X-original-commit: edc20c1d12225df9a5e169bf13abfb5a796f5236
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-03-15 09:54:56 +01:00
Victor Feyens 24ccf7d9b0 [CLN] *: useless type info for actions
The type fields of actions already defaults to
the model name in the base model definition.

Therefore, specifying `ir.actions.server`, `ir.actions.act_window`
& so on as type is useless (and adds noise since it's the same as
the action model).

closes odoo/odoo#114539

Related: odoo/enterprise#37855
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-03-08 17:33:37 +01:00
Mathieu Duckerts-Antoine efe09fd7ad [FIX] website_livechat: MockServer: patch _performRPC
The new MockServer has no _mockCallButton method. Due to an issue with
the patch function that does not reasign this._super correctly when
entering the _mockCallButton function, a crash did occur.

Part-of: odoo/odoo#112756
2023-02-28 20:38:49 +01:00
Noe Antoine 982afa089f [FIX] website_livechat: realign ratings and avoid overlap
The images of users in the livechat team were overlapping
with their ratings on the front-end page of the livechat channel.
Remove negative gutters to fix this.

task-3135733

closes odoo/odoo#112661

X-original-commit: 619a39e2f1fe50f5c76f2b54a578598e1540ef8d
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-02-14 17:09:37 +01:00
Aaron Bohy 49297bc7bb [REM] *: remove legacy basic views + some fields/widgets
This commit removes the legacy implementation of the form, kanban
and list views. It also removes the legacy view widget registry,
and all legacy widgets it contained. The legacy field registry
couldn't be removed yet as some fields are still used (e.g. in
client actions: FieldMany2One, FieldMany2ManyTags...), and
sometimes accessed from that registry (e.g. uom service). More
clean up will come later. Note that all tests using legacy views
have thus been removed, even though the tested feature might still
remain (e.g. FieldMany2One tests have been removed, but that field
is still there). However, those features are deprecated and
unlikely to evolve. They should be removed in the next saas, or the
one after.

Finally, this commit also removes the legacy view dialogs.

Task 3168640

Part-of: odoo/odoo#111809
2023-02-08 13:27:58 +01:00