From d17b4ca01ffbecf1874230d8a4e90faceac7392c Mon Sep 17 00:00:00 2001 From: andre Date: Wed, 11 Oct 2023 12:18:43 +0100 Subject: [PATCH 1/2] [16.0][MIG] base_user_role_profile --- base_user_role_profile/__manifest__.py | 9 +++++++-- base_user_role_profile/models/profile.py | 2 +- base_user_role_profile/views/assets.xml | 15 --------------- .../odoo/addons/base_user_role_profile | 1 + setup/base_user_role_profile/setup.py | 6 ++++++ 5 files changed, 15 insertions(+), 18 deletions(-) delete mode 100644 base_user_role_profile/views/assets.xml create mode 120000 setup/base_user_role_profile/odoo/addons/base_user_role_profile create mode 100644 setup/base_user_role_profile/setup.py diff --git a/base_user_role_profile/__manifest__.py b/base_user_role_profile/__manifest__.py index 22a34689c..9fe598b56 100644 --- a/base_user_role_profile/__manifest__.py +++ b/base_user_role_profile/__manifest__.py @@ -2,7 +2,7 @@ { "name": "User profiles", - "version": "14.0.1.0.0", + "version": "16.0.1.0.0", "category": "Tools", "author": "Akretion, Odoo Community Association (OCA)", "license": "AGPL-3", @@ -15,8 +15,13 @@ "views/user.xml", "views/role.xml", "views/profile.xml", - "views/assets.xml", ], + "assets": { + "web.assets_backend": [ + "base_user_role_profile/static/src/js/switch_profile_menu.js", + ], + }, "qweb": ["static/src/xml/templates.xml"], + "external_dependencies": {"python": ["pymssql<=2.2.5"]}, "installable": True, } diff --git a/base_user_role_profile/models/profile.py b/base_user_role_profile/models/profile.py index d1f2818a3..09ba164e7 100644 --- a/base_user_role_profile/models/profile.py +++ b/base_user_role_profile/models/profile.py @@ -6,7 +6,7 @@ class ResUsersProfile(models.Model): _name = "res.users.profile" _description = "Role profile" - name = fields.Char("Name") + name = fields.Char() user_ids = fields.Many2many( "res.users", string="Allowed users", compute="_compute_user_ids" ) diff --git a/base_user_role_profile/views/assets.xml b/base_user_role_profile/views/assets.xml deleted file mode 100644 index d5683038e..000000000 --- a/base_user_role_profile/views/assets.xml +++ /dev/null @@ -1,15 +0,0 @@ - - -