diff --git a/web_quick_start_screen/__manifest__.py b/web_quick_start_screen/__manifest__.py index 5793e6d54..754cc7284 100644 --- a/web_quick_start_screen/__manifest__.py +++ b/web_quick_start_screen/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Quick Start Screen", "summary": "Configurable start screen for quick actions", - "version": "16.0.1.0.0", + "version": "18.0.1.0.0", "author": "Tecnativa, Odoo Community Association (OCA)", "website": "https://github.com/OCA/web", "license": "AGPL-3", @@ -22,7 +22,7 @@ "assets": { "web.assets_backend": [ "web_quick_start_screen/static/src/scss/quick_start_screen.scss", - "web_quick_start_screen/static/src/js/kanban_controller.esm.js", + "web_quick_start_screen/static/src/js/**/*", ], }, } diff --git a/web_quick_start_screen/models/quick_start_screen.py b/web_quick_start_screen/models/quick_start_screen.py index 0f674c360..919a72a1e 100644 --- a/web_quick_start_screen/models/quick_start_screen.py +++ b/web_quick_start_screen/models/quick_start_screen.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from collections import defaultdict -from odoo import _, api, fields, models, tools +from odoo import api, fields, models, tools class QuicktStartScreen(models.Model): @@ -40,8 +40,8 @@ class QuicktStartScreen(models.Model): def _prepare_screen_action(self): return { - "display_name": self.name or _("Start"), - "name": self.name or _("Start"), + "display_name": self.name or self.env._("Start"), + "name": self.name or self.env._("Start"), "res_model": "quick.start.screen.action", "target": "current", "type": "ir.actions.act_window", diff --git a/web_quick_start_screen/models/quick_start_screen_action.py b/web_quick_start_screen/models/quick_start_screen_action.py index ff6bb814b..8ccedd67c 100644 --- a/web_quick_start_screen/models/quick_start_screen_action.py +++ b/web_quick_start_screen/models/quick_start_screen_action.py @@ -58,6 +58,7 @@ class DecontracStartScreenAction(models.Model): if self.context: extra_context = self._get_extra_context() # We need to deal with the active_id and overwrite it if needed + # MIG TODO: Check if this is affected active_id = extra_context.get("active_id", 0) action["context"] = dict( safe_eval(action.get("context", "{}"), {"active_id": active_id}), diff --git a/web_quick_start_screen/static/src/js/kanban_controller.esm.js b/web_quick_start_screen/static/src/js/kanban_controller.esm.js index d409c65bd..ebba83b78 100644 --- a/web_quick_start_screen/static/src/js/kanban_controller.esm.js +++ b/web_quick_start_screen/static/src/js/kanban_controller.esm.js @@ -1,15 +1,12 @@ -/** @odoo-module */ /* Copyright 2024 Tecnativa - David Vidal * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */ import {ControlPanel} from "@web/search/control_panel/control_panel"; import {kanbanView} from "@web/views/kanban/kanban_view"; import {registry} from "@web/core/registry"; -const {xml} = owl; -export class QuickStartScreenControlPanel extends ControlPanel {} - -// We want to remove the control panel from this view. -QuickStartScreenControlPanel.template = xml`
`; +export class QuickStartScreenControlPanel extends ControlPanel { + static template = "start_screen.ControlPanel"; +} export const quickStartScreenView = { ...kanbanView, diff --git a/web_quick_start_screen/static/src/js/start_screen_control_panel.xml b/web_quick_start_screen/static/src/js/start_screen_control_panel.xml new file mode 100644 index 000000000..ef786a1ec --- /dev/null +++ b/web_quick_start_screen/static/src/js/start_screen_control_panel.xml @@ -0,0 +1,12 @@ + +