[FIX] {website_}event: fix event tour

Before this commit, the user got a traceback saying:
```txt
TypeError: Cannot read properties of undefined (reading 'apply')
    at EventAdditionalTourSteps._get_website_event_steps
```
the reason of that issue is because a [recent generic change reviews](#125716)
`patch` function and so `this._super` no longer exists and has to be
replace by `super` as we extend a method of a class extended.

This commit adapts the additional steps adding via `patch` function
to be able to add those steps and start the tour as expected.

closes odoo/odoo#142653

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit is contained in:
Xavier Bol (xbo)
2023-11-20 14:14:00 +00:00
parent 5af27ea4ac
commit 29a6abfba1
2 changed files with 4 additions and 4 deletions
@@ -3,7 +3,7 @@
class EventAdditionalTourSteps {
_get_website_event_steps() {
return [false];
return [];
}
}
@@ -8,9 +8,9 @@ import { patch } from "@web/core/utils/patch";
patch(EventAdditionalTourSteps.prototype, {
_get_website_event_steps: function () {
this._super.apply(this, arguments);
return [{
_get_website_event_steps() {
return [
...super._get_website_event_steps(), {
trigger: '.o_event_form_view button[title="Unpublished"]',
content: markup(_t("Use this <b>shortcut</b> to easily access your event web page.")),
position: 'bottom',