Skip to content

Commit

Permalink
hide Documents, Discuss, and Link Tracker menus
Browse files Browse the repository at this point in the history
  • Loading branch information
reichie020212 committed Aug 8, 2023
1 parent 14cc92d commit 4d648d8
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 48 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ repos:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
- id: oca-fix-manifest-website
args: ["https://github.com/openspp/openspp-registry"]
args: ["https://github.com/openspp/openspp-base"]
- id: oca-gen-addon-readme
args:
- --addons-dir=.
- --org-name=openspp
- --repo-name=openspp-registry
- --repo-name=openspp-base
- --branch=15.0
stages: [manual]
- id: oca-gen-addons-table
Expand Down
5 changes: 0 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
# generated from manifests external_dependencies
apispec
pyjwt>=2.4.0
pyOpenSSL==22.0.0
python-magic
xlrd
1 change: 1 addition & 0 deletions setup/spp_base/odoo/addons/spp_base
6 changes: 6 additions & 0 deletions setup/spp_base/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
86 changes: 45 additions & 41 deletions spp_base/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,41 +1,45 @@
# Part of OpenSPP. See LICENSE file for full copyright and licensing details.


{
"name": "OpenSPP Base",
"category": "OpenSPP",
"version": "15.0.0.0.0",
"sequence": 1,
"author": "OpenSPP.org",
"website": "https://github.com/openspp/openspp-registry",
"license": "LGPL-3",
"development_status": "Production/Stable",
"maintainers": ["jeremi", "gonzalesedwin1123"],
"depends": [
"base",
"g2p_registry_base",
"g2p_registry_individual",
"g2p_registry_group",
"g2p_registry_membership",
"spp_area",
"spp_change_request",
"spp_event_data",
"spp_idpass",
"spp_idqueue",
"spp_service_points",
"spp_custom_field",
"spp_custom_fields_ui",
"spp_programs",
],
"external_dependencies": {},
"data": [
"data/top_up_card.xml",
"views/registrant_view.xml",
],
"assets": {},
"demo": [],
"images": [],
"application": True,
"installable": True,
"auto_install": False,
}
# Part of OpenSPP. See LICENSE file for full copyright and licensing details.


{
"name": "OpenSPP Base",
"category": "OpenSPP",
"version": "15.0.0.0.0",
"sequence": 1,
"author": "OpenSPP.org",
"website": "https://github.com/openspp/openspp-base",
"license": "LGPL-3",
"development_status": "Production/Stable",
"maintainers": ["jeremi", "gonzalesedwin1123"],
"depends": [
"base",
"utm",
"mail",
"dms",
"g2p_registry_base",
"g2p_registry_individual",
"g2p_registry_group",
"g2p_registry_membership",
"spp_area",
"spp_change_request",
"spp_event_data",
"spp_idpass",
"spp_idqueue",
"spp_service_points",
"spp_custom_field",
"spp_custom_fields_ui",
"spp_programs",
],
"external_dependencies": {},
"data": [
"data/top_up_card.xml",
"views/registrant_view.xml",
"views/hide_menu_view.xml",
],
"assets": {},
"demo": [],
"images": [],
"application": True,
"installable": True,
"auto_install": False,
}
29 changes: 29 additions & 0 deletions spp_base/views/hide_menu_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>

<record id="hide_menu" model="res.groups">
<field name="name">Hide Menu</field>
</record>

<!-- Hide Link Tracker Menu -->
<record model="ir.ui.menu" id="utm.menu_link_tracker_root">
<field name="groups_id" eval="[(5,ref('hide_menu'))]" />
</record>

<menuitem id="utm.menu_link_tracker_root" name="Line Tracker" groups="hide_menu" />

<!-- Hide Discuss Menu -->
<record model="ir.ui.menu" id="mail.menu_root_discuss">
<field name="groups_id" eval="[(5,ref('hide_menu'))]" />
</record>

<menuitem id="mail.menu_root_discuss" name="Line Tracker" groups="hide_menu" />

<!-- Hide Documents Menu -->
<record model="ir.ui.menu" id="dms.main_menu_dms">
<field name="groups_id" eval="[(5,ref('hide_menu'))]" />
</record>

<menuitem id="dms.main_menu_dms" name="Line Tracker" groups="hide_menu" />

</odoo>

0 comments on commit 4d648d8

Please sign in to comment.