Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions spp_hide_menus/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# Part of OpenSPP. See LICENSE file for full copyright and licensing details.

from . import models
4 changes: 1 addition & 3 deletions spp_hide_menus/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
"license": "LGPL-3",
"development_status": "Production/Stable",
"maintainers": ["jeremi", "gonzalesedwin1123"],
"depends": ["base", "calendar", "contacts", "account", "event", "stock", "utm", "web", "g2p_registry_base"],
"depends": ["base", "spp_hide_menus_base", "calendar", "contacts", "account", "event", "stock", "utm", "web"],
"data": [
"security/ir.model.access.csv",
"data/hide_menu_data.xml",
"views/hide_menu_view.xml",
],
"assets": {},
"demo": [],
Expand Down
4 changes: 0 additions & 4 deletions spp_hide_menus/data/hide_menu_data.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>

<record id="show_non_openspp_menu_group" model="res.groups">
<field name="name">Show Non-OpenSPP Menu</field>
</record>

<!-- Hide Calendar Menu -->
<record id="hide_calendar_menu" model="spp.hide.menu">
<field name="name" eval="ref('calendar.mail_menu_calendar')" />
Expand Down
2 changes: 1 addition & 1 deletion spp_hide_menus/i18n/spp_hide_menus.pot
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ msgid "Show Menu"
msgstr ""

#. module: spp_hide_menus
#: model:res.groups,name:spp_hide_menus.show_non_openspp_menu_group
#: model:res.groups,name:spp_hide_menu_base.show_non_openspp_menu_group
msgid "Show Non-OpenSPP Menu"
msgstr ""

Expand Down
1 change: 1 addition & 0 deletions spp_hide_menus_base/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
25 changes: 25 additions & 0 deletions spp_hide_menus_base/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Part of OpenSPP. See LICENSE file for full copyright and licensing details.


{
"name": "Hide Non-OpenSPP Menus: Base",
"category": "OpenSPP",
"version": "17.0.1.3.0",
"sequence": 1,
"author": "OpenSPP.org",
"website": "https://github.com/OpenSPP/openspp-modules",
"license": "LGPL-3",
"maintainers": ["reichie020212"],
"depends": ["base"],
"data": [
"security/ir.model.access.csv",
"security/security.xml",
"views/hide_menu_view.xml",
],
"assets": {},
"demo": [],
"images": [],
"application": True,
"installable": True,
"auto_install": False,
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def hide_menu(self, menu_id=None):
record = self.browse(menu_id)
for rec in record:
if rec.state == "show" and rec.name:
show_non_openspp_group = [(6, 0, [self.env.ref("spp_hide_menus.show_non_openspp_menu_group").id])]
show_non_openspp_group = [(6, 0, [self.env.ref("spp_hide_menus_base.show_non_openspp_menu_group").id])]
rec.default_groups_id = rec.name.groups_id
rec.name.write(
{
Expand Down
3 changes: 3 additions & 0 deletions spp_hide_menus_base/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
spp_hide_menu_admin,Hide Menu Configuration Admin Access,spp_hide_menus.model_spp_hide_menu,g2p_registry_base.group_g2p_admin,1,1,1,1
spp_hide_menu_admin,Hide Menu Configuration Admin Access,spp_hide_menus_base.model_spp_hide_menu,base.group_system,1,1,1,1
8 changes: 8 additions & 0 deletions spp_hide_menus_base/security/security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>

<record id="show_non_openspp_menu_group" model="res.groups">
<field name="name">Show Non-OpenSPP Menu</field>
</record>

</odoo>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
help="Hide Menu"
class="btn-danger"
invisible="state == 'hide'"
groups="g2p_registry_base.group_g2p_admin"
groups="base.group_system"
/>
<button
name="show_menu"
Expand All @@ -30,7 +30,7 @@
help="Show Menu"
class="btn-primary"
invisible="state == 'show'"
groups="g2p_registry_base.group_g2p_admin"
groups="base.group_system"
/>
</tree>
</field>
Expand Down
Loading