mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[MIG] web_timeline: Migration to 17.0
- Convert Moment.js to Luxon. - Replace Underscore.js with native JavaScript code. - Migrate legacy views to the new system and add an architecture parser to separate logic. - added basic test
This commit is contained in:
@@ -2,3 +2,4 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import ir_ui_view
|
||||
from . import ir_action
|
||||
|
||||
13
web_timeline/models/ir_action.py
Normal file
13
web_timeline/models/ir_action.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# Copyright 2024 Tecnativa - Carlos Lopez
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
from odoo import fields, models
|
||||
|
||||
from .ir_ui_view import TIMELINE_VIEW
|
||||
|
||||
|
||||
class ActWindowView(models.Model):
|
||||
_inherit = "ir.actions.act_window.view"
|
||||
|
||||
view_mode = fields.Selection(
|
||||
selection_add=[TIMELINE_VIEW], ondelete={"timeline": "cascade"}
|
||||
)
|
||||
@@ -1,4 +1,5 @@
|
||||
# Copyright 2016 ACSONE SA/NV (<http://acsone.eu>)
|
||||
# Copyright 2024 Tecnativa - Carlos Lopez
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import fields, models
|
||||
@@ -10,3 +11,6 @@ class IrUIView(models.Model):
|
||||
_inherit = "ir.ui.view"
|
||||
|
||||
type = fields.Selection(selection_add=[TIMELINE_VIEW])
|
||||
|
||||
def _is_qweb_based_view(self, view_type):
|
||||
return view_type == TIMELINE_VIEW[0] or super()._is_qweb_based_view(view_type)
|
||||
|
||||
Reference in New Issue
Block a user