Public release from ruodoo-project: 19.0 - 2026-05-31 21:19:12 UTC

This commit is contained in:
CI Publish Bot
2026-05-31 21:19:21 +00:00
commit aa4214c195
1213 changed files with 183945 additions and 0 deletions

View File

@ -0,0 +1,18 @@
.. image:: https://itpp.dev/images/infinity-readme.png
:alt: Tested and maintained by IT Projects Labs
:target: https://itpp.dev
Show settings menu for non-admin
================================
Adds "Show Settings Menu" checkbox in user's access rights tab.
Uninstallation
==============
After uninstalling, you need to update ``base`` module to return restriction to ``Settings`` menu back.
Further information
===================
Tested on `Odoo 17.0 <https://github.com/odoo/odoo/commit/40b19d89846303016098840f4958fe7cc105067c>`_

View File

@ -0,0 +1 @@
from . import models

View File

@ -0,0 +1,15 @@
{
"name": "Show settings menu for non-admin",
"summary": """Allows to make Settings menu visible for non-admins""",
"version": "19.0.2.0.0",
"author": "IT-Projects LLC, Ivan Yelizariev",
"category": "Extra Tools",
"images": ["images/banner.png"],
"support": "apps@itpp.dev",
"website": "https://twitter.com/OdooFree",
"license": "Other OSI approved licence", # MIT
"depends": ["access_restricted"],
"data": ["security/access_settings_menu_security.xml"],
"demo": ["security/access_settings_menu_security_demo.xml"],
"installable": True,
}

View File

@ -0,0 +1,20 @@
`2.0.0`
-------
- Improvement: replace `access_apps` dependency with `access_restricted` since only the latter one is needed
`1.0.2`
-------
- FIX: make compatible with CI-tests of other modules
`1.0.1`
-------
- FIX issue occured when user has ``[x] Show Settings Menu`` access, but doesn't have administration rights
`1.0.0`
-------
- Init version

View File

@ -0,0 +1,33 @@
======================
Access settings menu
======================
Installation
============
* `Install <https://odoo-development.readthedocs.io/en/latest/odoo/usage/install-module.html>`__ this module in a usual way
Configuration
=============
* Open menu ``[[ Settings ]] >> Users & Companies >> Users``
* Open user form view (click on the line with the user)
* Click ``[Edit]``
* Select ``[Show Settings Menu]`` and click ``[Save]``
Usage
=====
Without this module installed:
* Non-admin user can't see the ``[[ Settings ]]`` menu.
With this module installed:
* If non-admin user has the ``[Show Settings Menu]`` right he can see the ``[[ Settings ]]`` menu.
Uninstallation
==============
After uninstalling, you need to update ``base`` module to return restriction to ``Settings`` menu back.

View File

@ -0,0 +1,25 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * access_settings_menu
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: access_settings_menu
#: model:res.groups,name:access_settings_menu.group_show_settings_menu
msgid "Show Settings Menu"
msgstr ""
#. module: access_settings_menu
#: model:ir.model,name:access_settings_menu.model_res_users
msgid "Users"
msgstr ""

View File

@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * access_settings_menu
#
# Translators:
# Sergej Briesin <20bs18@gmail.com>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-21 00:17+0000\n"
"PO-Revision-Date: 2018-04-21 00:17+0000\n"
"Last-Translator: Sergej Briesin <20bs18@gmail.com>, 2018\n"
"Language-Team: German (https://www.transifex.com/it-projects-llc/teams/76080/"
"de/)\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: access_settings_menu
#: model:res.groups,name:access_settings_menu.group_show_settings_menu
msgid "Show Settings Menu"
msgstr "Einstellungsmenü anzeigen"
#. module: access_settings_menu
#: model:ir.model,name:access_settings_menu.model_res_users
msgid "Users"
msgstr "Nutzer"

View File

@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * access_settings_menu
#
# Translators:
# Randall <randall_castro@me.com>, 2018
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-21 00:17+0000\n"
"PO-Revision-Date: 2017-11-28 13:02+0000\n"
"Last-Translator: Randall <randall_castro@me.com>, 2018\n"
"Language-Team: Spanish (Costa Rica) (https://www.transifex.com/it-projects-"
"llc/teams/76080/es_CR/)\n"
"Language: es_CR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: access_settings_menu
#: model:res.groups,name:access_settings_menu.group_show_settings_menu
msgid "Show Settings Menu"
msgstr "Mostrar Menu de Ajustes"
#. module: access_settings_menu
#: model:ir.model,name:access_settings_menu.model_res_users
msgid "Users"
msgstr "Usuarios"

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

View File

@ -0,0 +1,10 @@
from odoo import api, models
class ResUsers(models.Model):
_inherit = "res.users"
@api.model
def fields_get(self, *args, **kwargs):
# switch to superuser to get access to virtual fields
return super(ResUsers, self.sudo()).fields_get(*args, **kwargs)

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Show Settings Menu -->
<record id="group_show_settings_menu" model="res.groups">
<field name="name">Show Settings Menu</field>
<field name="user_ids" eval="[(4, ref('base.user_root'))]" />
</record>
<record model="ir.ui.menu" id="base.menu_administration">
<field
name="group_ids"
eval="[(6,0, [ref('access_settings_menu.group_show_settings_menu')])]"
/>
</record>
<record model="res.groups" id="base.group_erp_manager">
<field
name="implied_ids"
eval="[(4, ref('access_settings_menu.group_show_settings_menu'))]"
/>
</record>
</odoo>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
License MIT (https://opensource.org/licenses/MIT). -->
<odoo>
<!-- Grant access to Demo User to don't break CI of other modules -->
<record id="group_show_settings_menu" model="res.groups">
<field name="user_ids" eval="[(4, ref('base.user_demo'))]" />
</record>
</odoo>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@ -0,0 +1 @@
from . import test_fields_view_get

View File

@ -0,0 +1,20 @@
from odoo.tests import common
from odoo.addons.access_restricted.tests.test_fields_view_get import (
TestFieldsViewGet as TestFieldsViewGetBase,
)
@common.tagged("post_install", "-at_install")
class TestFieldsViewGet(TestFieldsViewGetBase):
def test_access_settings_menu(self):
admin = self.env.ref("base.user_root")
demo = self.env.ref("base.user_demo")
# demo doesn't have admin rights, but has "Show Settings Menu"
self.clear_access(demo)
self.add_access(demo, "access_settings_menu.group_show_settings_menu")
self.view_form_all(demo)
self.view_form_mix(admin, demo)
self.clear_config()
self.view_form_mix(demo, admin)