Browse Source

[IMP] Menu and groups

pull/194/head
Maxime Chambreuil 6 years ago
parent
commit
6a50096a99
  1. 5
      agreement/__manifest__.py
  2. 9
      agreement/data/module_category.xml
  3. 0
      agreement/models/agreement.py
  4. 24
      agreement/security/ir.model.access.csv
  5. 19
      agreement/security/res_groups.xml
  6. 32
      agreement/views/agreement.xml
  7. 9
      agreement/views/agreement_clause.xml
  8. 9
      agreement/views/agreement_increasetype.xml
  9. 9
      agreement/views/agreement_renewaltype.xml
  10. 9
      agreement/views/agreement_section.xml
  11. 9
      agreement/views/agreement_stages.xml
  12. 9
      agreement/views/agreement_subtype.xml
  13. 9
      agreement/views/agreement_type.xml
  14. 101
      agreement/views/menu.xml

5
agreement/__manifest__.py

@ -19,6 +19,9 @@
"sale_management",
],
"data": [
"data/module_category.xml",
"security/res_groups.xml",
"security/ir.model.access.csv",
"views/reports.xml",
"views/agreement.xml",
"views/agreement_clause.xml",
@ -29,7 +32,7 @@
"views/agreement_renewaltype.xml",
"views/agreement_increasetype.xml",
"views/res_partner.xml",
"security/ir.model.access.csv",
"views/menu.xml",
],
"application": True,
"development_status": "Beta",

9
agreement/data/module_category.xml

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="agreement" model="ir.module.category">
<field name="name">Agreement</field>
<field name="sequence">80</field>
</record>
</odoo>

0
agreement/models/partner_agreement.py → agreement/models/agreement.py

24
agreement/security/ir.model.access.csv

@ -1,9 +1,17 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_agreement_allusers,agreement all users,model_agreement,,1,1,1,1
access_agreement_section_allusers,section all users,model_agreement_section,,1,1,1,1
access_agreement_clause_allusers,clause all users,model_agreement_clause,,1,1,1,1
access_agreement_stage_allusers,stage all users,model_agreement_stage,,1,1,1,1
access_agreement_type_allusers,type all users,model_agreement_type,,1,1,1,1
access_agreement_subtype_allusers,subtype all users,model_agreement_subtype,,1,1,1,1
access_agreement_renewaltype_allusers,renewaltype all users,model_agreement_renewaltype,,1,1,1,1
access_agreement_increasetype_allusers,increasetype all users,model_agreement_increasetype,,1,1,1,1
access_agreement_allusers,agreement all users,model_agreement,agreement.group_agreement_user,1,1,1,0
access_agreement_allusers,agreement all users,model_agreement,agreement.group_agreement_manager,1,1,1,1
access_agreement_section_allusers,section all users,model_agreement_section,agreement.group_agreement_user,1,1,1,0
access_agreement_section_allusers,section all users,model_agreement_section,agreement.group_agreement_manager,1,1,1,1
access_agreement_clause_allusers,clause all users,model_agreement_clause,agreement.group_agreement_user,1,1,1,0
access_agreement_clause_allusers,clause all users,model_agreement_clause,agreement.group_agreement_manager,1,1,1,1
access_agreement_stage_allusers,stage all users,model_agreement_stage,agreement.group_agreement_user,1,0,0,0
access_agreement_stage_allusers,stage all users,model_agreement_stage,agreement.group_agreement_manager,1,1,1,1
access_agreement_type_allusers,type all users,model_agreement_type,agreement.group_agreement_user,1,0,0,0
access_agreement_type_allusers,type all users,model_agreement_type,agreement.group_agreement_manager,1,1,1,1
access_agreement_subtype_allusers,subtype all users,model_agreement_subtype,agreement.group_agreement_user,1,0,0,0
access_agreement_subtype_allusers,subtype all users,model_agreement_subtype,agreement.group_agreement_manager,1,1,1,1
access_agreement_renewaltype_allusers,renewaltype all users,model_agreement_renewaltype,agreement.group_agreement_user,1,0,0,0
access_agreement_renewaltype_allusers,renewaltype all users,model_agreement_renewaltype,agreement.group_agreement_manager,1,1,1,1
access_agreement_increasetype_allusers,increasetype all users,model_agreement_increasetype,agreement.group_agreement_user,1,0,0,0
access_agreement_increasetype_allusers,increasetype all users,model_agreement_increasetype,agreement.group_agreement_manager,1,1,1,1

19
agreement/security/res_groups.xml

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- User group -->
<record id="group_agreement_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="agreement"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
</record>
<!-- Manager group -->
<record id="group_agreement_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="agreement"/>
<field name="implied_ids" eval="[(4, ref('group_agreement_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
</odoo>

32
agreement/views/agreement.xml

@ -295,34 +295,4 @@
<field name="view_mode">tree,kanban,form</field>
</record>
<!-- Top menu item -->
<menuitem
name="Agreements"
id="partner_agreement_menu_root"
web_icon="agreement,static/description/icon.png"
sequence="51"/>
<!-- menu categories -->
<menuitem
name="Agreements"
id="partner_agreement_menu_1"
parent="partner_agreement_menu_root"
sequence="10"
action="partner_agreement_agreement"/>
<menuitem
name="Templates"
id="partner_agreement_menu_4"
parent="partner_agreement_menu_root"
sequence="20"
action="partner_agreement_agreement_templates"/>
<menuitem
name="Agreement Parts"
id="partner_agreement_menu_2"
sequence="30"
parent="partner_agreement_menu_root"/>
<menuitem
name="Configuration"
id="partner_agreement_menu_3"
sequence="40"
parent="partner_agreement_menu_root"/>
</odoo>
</odoo>

9
agreement/views/agreement_clause.xml

@ -92,11 +92,4 @@
<field name="view_mode">tree,pivot,form</field>
</record>
<!-- Menu Items -->
<menuitem
name="Clauses"
id="partner_agreement_clauses_menu_1"
parent="agreement.partner_agreement_menu_2"
sequence="32"
action="partner_agreement_action_clause"/>
</odoo>
</odoo>

9
agreement/views/agreement_increasetype.xml

@ -41,11 +41,4 @@
<field name="view_mode">tree,form</field>
</record>
<!-- Menu Items -->
<menuitem
name="Increase Types"
id="partner_agreement_increasetype_menu_1"
parent="agreement.partner_agreement_menu_3"
sequence="45"
action="partner_agreement_action_increasetype"/>
</odoo>
</odoo>

9
agreement/views/agreement_renewaltype.xml

@ -39,11 +39,4 @@
<field name="view_mode">tree,form</field>
</record>
<!-- Menu Items -->
<menuitem
name="Renewal Types"
id="partner_agreement_renewaltype_menu_1"
parent="agreement.partner_agreement_menu_3"
sequence="44"
action="partner_agreement_action_renewaltype"/>
</odoo>
</odoo>

9
agreement/views/agreement_section.xml

@ -86,11 +86,4 @@
<field name="view_mode">tree,form</field>
</record>
<!-- Menu Items -->
<menuitem
name="Sections"
id="partner_agreement_sections_menu_1"
parent="agreement.partner_agreement_menu_2"
sequence="31"
action="partner_agreement_action_section"/>
</odoo>
</odoo>

9
agreement/views/agreement_stages.xml

@ -40,11 +40,4 @@
<field name="view_mode">tree,form</field>
</record>
<!-- Menu Items -->
<menuitem
name="Stages"
id="partner_agreement_stage_menu_1"
parent="agreement.partner_agreement_menu_3"
sequence="41"
action="partner_agreement_action_stage"/>
</odoo>
</odoo>

9
agreement/views/agreement_subtype.xml

@ -39,11 +39,4 @@
<field name="view_mode">tree,form</field>
</record>
<!-- Menu Items -->
<menuitem
name="Sub-Types"
id="partner_agreement_subtype_menu_1"
parent="agreement.partner_agreement_menu_3"
sequence="43"
action="partner_agreement_action_subtype"/>
</odoo>
</odoo>

9
agreement/views/agreement_type.xml

@ -39,11 +39,4 @@
<field name="view_mode">tree,form</field>
</record>
<!-- Menu Items -->
<menuitem
name="Types"
id="partner_agreement_type_menu_1"
parent="agreement.partner_agreement_menu_3"
sequence="42"
action="partner_agreement_action_type"/>
</odoo>
</odoo>

101
agreement/views/menu.xml

@ -0,0 +1,101 @@
<?xml version="1.0"?>
<odoo>
<!-- Top menu item -->
<menuitem
name="Agreements"
id="agreement_root"
web_icon="agreement,static/description/icon.png"
sequence="80"
groups="agreement.group_agreement_user"/>
<!-- Dashboard -->
<menuitem
name="Dashboard"
id="agreement_dashboard"
parent="agreement_root"
sequence="10"/>
<!-- Operations -->
<menuitem
name="Operations"
id="agreement_operations"
parent="agreement_root"
sequence="20"/>
<menuitem
name="Agreements"
id="agreements"
parent="agreement_operations"
sequence="10"
action="partner_agreement_agreement"/>
<!-- Master Data -->
<menuitem
name="Master Data"
id="agreement_masterdata"
parent="agreement_root"
sequence="30"/>
<menuitem
name="Parts"
id="agreement_parts"
sequence="10"
parent="agreement_masterdata"/>
<menuitem
name="Clauses"
id="agreement_clauses"
parent="agreement_masterdata"
sequence="20"
action="partner_agreement_action_clause"/>
<menuitem
name="Sections"
id="agreement_sections"
parent="agreement_masterdata"
sequence="30"
action="partner_agreement_action_section"/>
<!-- Reporting -->
<menuitem
name="Reporting"
id="agreement_reporting"
sequence="40"
parent="agreement_root"
groups="agreement.group_agreement_manager"/>
<!-- Configuration -->
<menuitem
name="Configuration"
id="agreement_configuration"
sequence="50"
parent="agreement_root"
groups="agreement.group_agreement_manager"/>
<menuitem
name="Templates"
id="template"
parent="agreement_configuration"
sequence="20"
action="partner_agreement_agreement_templates"/>
<menuitem
name="Renewal Types"
id="agreement_renewaltype"
parent="agreement_configuration"
sequence="30"
action="partner_agreement_action_renewaltype"/>
<menuitem
name="Stages"
id="agreement_stages"
parent="agreement_configuration"
sequence="40"
action="partner_agreement_action_stage"/>
<menuitem
name="Types"
id="agreement_types"
parent="agreement_configuration"
sequence="50"
action="partner_agreement_action_type"/>
<menuitem
name="Sub-Types"
id="agreement_subtypes"
parent="agreement_configuration"
sequence="60"
action="partner_agreement_action_subtype"/>
</odoo>
Loading…
Cancel
Save