Commit Graph
74 Commits
Author SHA1 Message Date
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
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
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 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
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 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 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 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
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
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
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
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
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
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
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
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
Géry Debongnie b53f78e224 [REF] web_tour,*: use the registry in collecting the tours
This is a step closer to a goal of avoiding dependence on asynchronous
modules. Starting from this commit, new tour definition should be
registered to `registry.category("web_tour.tours")` registry.

So, instead of the following:

```js
import tour from "web_tour.tour";
tour.register(name, options, steps);
```

We now do:

```js
import { registry } from "@web/core/registry";
registry.category("web_tour.tours").add(name, optionsWithSteps);
```

Notice the `options` and `steps` params are merged when registering
the tour definition. It should look something like so:

```js
registry.category("web_tour.tours").add("account_tour", {
  test: true,
  steps: [ ... ],
});
```

And if the `TourManager` instance is needed, one can get it from the
registry like so `registry.get("tourManager")`. Note however that
this instance is only available when the `TourManager` has been
instantiated -- so it's not available at top level of the module.

closes odoo/odoo#111103

Related: odoo/enterprise#36335
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-01-27 23:17:35 +01:00
Alexandre Kühn 9e2b2aad7c [FIX] website_livechat:tests: fix chatbot flow step "Hello! I'm a bot"
Before this commit, website_livechat_chatbot_flow_tour failed
frequently and non-deterministically at 1st step "Hello! I'm a bot".

This happens because the tour starts on url `/`, then reload the url
`/`. The livechat button is configured in `auto_popup` mode, which
could let chatbot starts running before the 2nd url that must precede
the steps.

The 2nd url reload is actually useless, and removing it also fixes
the issue.

closes odoo/odoo#108160

X-original-commit: 402b6e98009017e04245d92cabcc35184014b280
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-12-16 16:17:49 +01:00
Alexandre Kühn 0422c94a90 [IMP] mail, *: rename registerModel/Patch to Model/Patch
closes odoo/odoo#105096

Related: odoo/enterprise#33679
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-11-06 02:16:48 +01:00
Alexandre Kühn 56e854471a [IMP] mail, *: introduce @mail/model module
Introduce the '@mail/model' module that gathers all the stuff involved
in model definitions. This allows us to reduce the number of imports.

* = calendar, crm, hr, im_livechat, note, rating, sms, snailmail,
website, website_livechat, website_slides

Task-3056971

Part-of: odoo/odoo#105096
2022-11-06 02:16:48 +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
tsm-odoo 60a15b0072 [FIX] website_livechat: fix livechat request tour
Before this PR, the website_livechat request tour would fail
in an indeterministic fashion. This was due to the fact that
the message that was supposed to be sent through the bus was
directly given to the message notification handler.

The second message could or could not be received according to
the timing of the channel subscription. Indeed, the listen/notify
mechanism is not activated during test, but the subscribe method
directly fetches notifications from database and return them through
the bus.

In order to solve this issue, let's rely solely on the bus instead
of directly calling the message notification handler.

closes odoo/odoo#103590

X-original-commit: 8964453597fb01161791b2b2064f45efa42277a6
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-19 21:46:55 +02:00
tsm-odoo 9e4a8dc43f [IMP] mail, *: split mock server by model/controller
*: bus, calendar, hr_holidays, im_livechat, note, rating, snailmail,
website_livechat.

The mail mock server is getting bigger and bigger. As a consequence,
navigating/keeping it up to date is quiet inconvenient.

This commit solves this issue by splitting it by model/controller.

closes odoo/odoo#98374

Related: odoo/enterprise#32314
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-10-06 19:03:49 +02:00
Louis Wicket (wil) d562840f69 [IMP] mail, *: refactor patch API to look like model definitions
Model patches are now defined using the `registerPatch` function. This
function takes an object as argument which keys match those of a model
definition.

Benefits:
+ More consistent shape between model definitions and patch definitions
+ No need to import one function to each type of patch
+ No need to repeat the model name for each type of patch
+ No need to import the original definition

Task-2998282.

* = calendar, crm, hr, im_livechat, note, rating, sms, snailmail,
    website_livechat, website_slides

closes odoo/odoo#101827

X-original-commit: 7d23491b44b7372209057ea2abc565a95710b316
Related: odoo/enterprise#32136
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-10-03 16:18:49 +02:00
Alexandre Kühn 5b59a07729 [IMP] mail, *: introduce public livechat bundle
*: hr, im_livechat, snailmail, website_livechat

This commit introduces the public livechat bundle, which
contains the models that are specifically used in public livechat.

Doing so reduces the amount of model and data in frontend and
external lib, which makes the page load faster.

Task-2990182
Task-2990191

closes odoo/odoo#100768

Related: odoo/enterprise#31608
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-22 15:50:12 +02:00
Zelong Lin d57c64f95b [IMP] mail, *: remove 'public' field in channel
*: im_livechat, website_livechat

Access right should be based on channel type and membership instead.
Chat always private, group always private, channel private should
disapear and be a group instead (migration needed), and other channel
always public (but they can still be further restricted with
the "allowed groups" feature)

task-2632861

closes odoo/odoo#90415

Related: odoo/enterprise#30980
Related: odoo/upgrade#3850
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-09-06 10:57:59 +02:00
Alexandre Kühn 34c88157a6 [IMP] im_livechat, *: Refactor JS Public Livechat (step 14)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2961782

closes odoo/odoo#98798

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-25 04:21:01 +02:00
Alexandre Kühn f2d3a5bbd4 [IMP] im_livechat, *: remove Promise.reject in LivechatButton
*: website_livechat

closes odoo/odoo#98160

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-16 17:50:03 +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
Alexandre Kühn b7b4161873 [IMP] im_livechat, *: Refactor JS Public Livechat (step 13)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2943607

closes odoo/odoo#97403

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-03 19:33:53 +02:00
Alexandre Kühn 86167977ea [IMP] im_livechat, *: Refactor JS Public Livechat (step 10)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2937174

closes odoo/odoo#97030

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-29 01:51:07 +02:00
Alexandre Kühn d27546064a [IMP] im_livechat, *: Refactor JS Public Livechat (step 9)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2928837

closes odoo/odoo#96690

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-28 02:40:06 +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
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
Alexandre Kühn 21471fc5e7 [IMP] im_livechat, *: Refactor JS Public Livechat (step 7)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2898692

closes odoo/odoo#94914

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-30 12:11:00 +02:00
tsm-odoo 91cb9002dc [IMP] mail, *: remove deprecated autoOpenDiscuss parameter
*: im_livechat, website_livechat.

The autoOpenDiscuss parameter was used but is deprecated for a while now.
This PR removes it.

closes odoo/odoo#94716

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-28 14:06:06 +02:00
Alexandre Kühn 69cb3a2562 [IMP] im_livechat, *: Refactor JS Public Livechat (step 3)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2890189

closes odoo/odoo#94190

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-22 02:15:51 +02:00
Alexandre Kühn da8e5f2489 [IMP] im_livechat, *: Refactor JS Public Livechat (step 2)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2888734

closes odoo/odoo#94090

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-20 19:48:54 +02:00
Rahul Prajapati 71a68c5923 [IMP] *: remove support for empty create with pyenv
* hr, im_livechat, mail, sms, snailmail, test_mail_full, website_livechat,
  website_slides

PURPOSE:

Creating a record with no values has no sense but is sometimes useful during
tests.
The support should be dropped for `default` parameter in `create`.

SPECIFICATION:

All the occurrences of `create()` have been replaced by `create({})`.

Task-2869394

closes odoo/odoo#93917

Related: odoo/enterprise#28538
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-20 15:31:51 +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
Nemael 6f90029a12 [MOV] im_livechat: turn legacy livechat into odoo modules
Task-2825098

closes odoo/odoo#90842

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-25 12:45:55 +02:00
Aurélien Warnon 5a4521b70b [FIX] website_livechat: fix chatbot tour nondeterministic issue
Followup of: 623fdb15ce9a6f3f586254dca549a72869336729

The previous attempt at fixing the tour issue was non-conclusive as it still
breaks occasionally during runbot nightly builds.

That issue is near-impossible to properly debug, because it *only* happens
during nightly builds (cannot be reproduced locally and cannot be reproduced
with a multi-build configuration on the runbot).

We decided instead to slightly modify the tour step to click on the
"restart button" from the end of the conversation instead of the restart button
from the chat window header.

This should hopefully do the trick.

closes odoo/odoo#91656

X-original-commit: 50044dc7f547e2fcd7416f725987236b6185e6d6
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-05-18 16:05:00 +02:00
Aurélien Warnon babc6ff819 [FIX] website_livechat: fix chatbot tour race condition
In some cases, the runbot running the tour was clicking on the
"restart conversation" button before we had the chance to register the click
event on it.

This small commit adds a "ready" class on the button when we have correctly
registered the click event, and makes the tour step wait for that class before
clicking to restart.

closes odoo/odoo#91505

X-original-commit: 623fdb15ce9a6f3f586254dca549a72869336729
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-05-16 20:18:27 +02:00
tsm-odoo 6c8fbd0da1 [IMP] mail, *: add sendmany/sendone to the mock server
*: im_livechat, website_livechat.

In order to reduce the noise in the PR introducing the new environment in
the discuss app, calls to widget.call, env.bus_service.call during tests
have been replaced by a mocked implementation of _sendone/_sendmany. Moreover,
this approach will allow us to mock the longpolling during tests, resulting in
a more realistic behavior.

task-2582313

closes odoo/odoo#90724

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-13 18:10:56 +02:00
tsm-odoo c23f85903a [IMP] mail, *: use pyEnv in the mockServer
Now that pyEnv is available, using it in the mock_server lighten the syntax.

task-2582313

closes odoo/odoo#90783

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-13 11:59:58 +02:00
tsm-odoo 7e5a71ab71 [IMP] mail, *: always mount discuss/chatWindow/dialog during tests
*: hr, im_livechat, snailmail, website_livechat.

This PR prepares the ground for  the one introducing the new environment in the
discuss app. Indeed, tests will now use the mainComponentRegistry in order to mount
those components. Doing so, the parameters has{Discuss/Dialog/ChatWindow} will become
obsolete. Removing those parameters now helps reducing the noise in the main PR.

task-2582313

closes odoo/odoo#90120

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