Initial commit: Odoo 18.0-20251222 extra-addons
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled

This commit is contained in:
tocmo0nlord
2026-03-13 20:43:25 +00:00
parent 36e847a7df
commit adbe430761
9472 changed files with 1265727 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
/* @odoo-module */
/* Copyright 2024 Tecnativa - David Vidal
* Copyright 2024 Tecnativa - Carlos Roca
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
import {Component} from "@odoo/owl";
import {registry} from "@web/core/registry";
import {useService} from "@web/core/utils/hooks";
import {user} from "@web/core/user";
export class InitActionMenu extends Component {
setup() {
this.action = useService("action");
this.showHomeButton = Boolean(user.homeActionId);
}
/**
* Go to user init action when clicking it
* @private
*/
onClickInitAction() {
window.location.href = window.location.origin + "/odoo";
}
}
InitActionMenu.template = "web_systray_button_init_action.Button";
export const systrayInitAction = {
Component: InitActionMenu,
};
registry
.category("systray")
.add("web_systray_button_init_action.button", systrayInitAction, {sequence: 100});

View File

@@ -0,0 +1,11 @@
.init_action_div {
button {
height: 100%;
color: white;
&:hover {
background-color: rgba(0, 0, 0, 0.075);
color: white;
}
}
}

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates>
<t t-name="web_systray_button_init_action.Button">
<div class="init_action_div" t-if="showHomeButton">
<button
name="init_action"
class="btn btn-link"
title="Init Action"
href="#"
t-on-click="onClickInitAction"
>
<i class="fa fa-lg fa-home" role="img" aria-label="Init Action" />
</button>
</div>
</t>
</templates>

View File

@@ -0,0 +1,36 @@
/* Copyright 2024 Tecnativa - Carlos Roca
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) */
import {registry} from "@web/core/registry";
import {stepUtils} from "@web_tour/tour_service/tour_utils";
registry.category("web_tour.tours").add("web_systray_button_init_action_not_set_tour", {
url: "/web",
test: true,
steps: () => [
{
trigger: ":not(:has(button[name='init_action']))",
},
],
});
registry.category("web_tour.tours").add("web_systray_button_init_action_set_tour", {
url: "/web",
test: true,
steps: () => [
{
trigger: ".init_action_div:has(button[name='init_action'])",
},
stepUtils.showAppsMenuItem(),
{
trigger: ".o_app[data-menu-xmlid='base.menu_administration']",
run: "click",
},
{
trigger: "button[name='init_action']",
run: "click",
},
{
trigger: ".o_last_breadcrumb_item:has(span:contains('Apps'))",
},
],
});