[MIG] web_responsive: Migration to 17.0

This commit is contained in:
Taras Shabaranskyi
2023-11-17 03:43:53 +02:00
parent 08b8d7bfab
commit 7d4e65dac6
89 changed files with 4140 additions and 2311 deletions

View File

@@ -0,0 +1,5 @@
# Copyright 2023 Taras Shabaranskyi
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from . import res_users
from . import ir_http

View File

@@ -0,0 +1,19 @@
# Copyright 2023 Taras Shabaranskyi
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import models
class IrHttp(models.AbstractModel):
_inherit = "ir.http"
def session_info(self):
session = super().session_info()
user = self.env.user
return {
**session,
"apps_menu": {
"search_type": user.apps_menu_search_type,
"theme": user.apps_menu_theme,
},
}

View File

@@ -0,0 +1,26 @@
# Copyright 2023 Taras Shabaranskyi
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import fields, models
class ResUsers(models.Model):
_inherit = "res.users"
apps_menu_search_type = fields.Selection(
[
("canonical", "Canonical"),
("fuse", "Fuse"),
("command_palette", "Command Palette"),
],
default="canonical",
required=True,
)
apps_menu_theme = fields.Selection(
[
("milk", "Milk"),
("community", "Community"),
],
default="milk",
required=True,
)