Browse Source

[IMP] agreement_legal: add readonly group

pull/336/head
Maxime Chambreuil 6 years ago
parent
commit
a9cf084915
  1. 16
      agreement_legal/security/ir.model.access.csv
  2. 10
      agreement_legal/security/res_groups.xml
  3. 2
      agreement_legal/views/menu.xml

16
agreement_legal/security/ir.model.access.csv

@ -1,23 +1,29 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_agreement_readonly,agreement readonly,model_agreement,group_agreement_readonly,1,0,0,0
access_agreement_allusers,agreement all users,model_agreement,group_agreement_user,1,1,1,0
access_agreement_manager,agreement manager,model_agreement,group_agreement_manager,1,1,1,1
access_agreement_recital_readonly,recital readonly,model_agreement_recital,group_agreement_readonly,1,0,0,0
access_agreement_recital_allusers,recital all users,model_agreement_recital,group_agreement_user,1,1,1,0
access_agreement_recital_manager,recital manager,model_agreement_recital,group_agreement_manager,1,1,1,1
access_agreement_section_readonly,section readonly,model_agreement_section,group_agreement_readonly,1,0,0,0
access_agreement_section_allusers,section all users,model_agreement_section,group_agreement_user,1,1,1,0
access_agreement_section_manager,section manager,model_agreement_section,group_agreement_manager,1,1,1,1
access_agreement_clause_readonly,clause readonly,model_agreement_clause,group_agreement_readonly,1,0,0,0
access_agreement_clause_allusers,clause all users,model_agreement_clause,group_agreement_user,1,1,1,0
access_agreement_clause_manager,clause manager,model_agreement_clause,group_agreement_manager,1,1,1,1
access_agreement_appendix_readonly,appendix readonly,model_agreement_appendix,group_agreement_readonly,1,0,0,0
access_agreement_appendix_allusers,appendix all users,model_agreement_appendix,group_agreement_user,1,1,1,0
access_agreement_appendix_manager,appendix manager,model_agreement_appendix,group_agreement_manager,1,1,1,1
access_agreement_line_readonly,agreement line readonly,model_agreement_line,group_agreement_readonly,1,0,0,0
access_agreement_line_allusers,agreement line all users,model_agreement_line,group_agreement_user,1,1,1,0
access_agreement_line_manager,agreement line manager,model_agreement_line,group_agreement_manager,1,1,1,1
access_agreement_stage_allusers,stage all users,model_agreement_stage,group_agreement_user,1,0,0,0
access_agreement_stage_readonly,stage readonly,model_agreement_stage,group_agreement_readonly,1,0,0,0
access_agreement_stage_manager,stage manager,model_agreement_stage,group_agreement_manager,1,1,1,1
access_agreement_type_allusers,type all users,model_agreement_type,group_agreement_user,1,0,0,0
access_agreement_type_readonly,type readonly,model_agreement_type,group_agreement_readonly,1,0,0,0
access_agreement_type_manager,type manager,model_agreement_type,group_agreement_manager,1,1,1,1
access_agreement_subtype_allusers,subtype all users,model_agreement_subtype,group_agreement_user,1,0,0,0
access_agreement_subtype_readonly,subtype readonly,model_agreement_subtype,group_agreement_readonly,1,0,0,0
access_agreement_subtype_manager,subtype manager,model_agreement_subtype,group_agreement_manager,1,1,1,1
access_agreement_renewaltype_allusers,renewaltype all users,model_agreement_renewaltype,group_agreement_user,1,0,0,0
access_agreement_renewaltype_readonly,renewaltype readonly,model_agreement_renewaltype,group_agreement_readonly,1,0,0,0
access_agreement_renewaltype_manager,renewaltype manager,model_agreement_renewaltype,group_agreement_manager,1,1,1,1
access_agreement_increasetype_allusers,increasetype all users,model_agreement_increasetype,group_agreement_user,1,0,0,0
access_agreement_increasetype_readonly,increasetype readonly,model_agreement_increasetype,group_agreement_readonly,1,0,0,0
access_agreement_increasetype_manager,increasetype manager,model_agreement_increasetype,group_agreement_manager,1,1,1,1

10
agreement_legal/security/res_groups.xml

@ -4,11 +4,19 @@
<field name ="name">Agreement</field>
<field name ="sequence">17</field>
</record>
<!-- Readonly group -->
<record id="group_agreement_readonly" model="res.groups">
<field name="name">Read-Only Users</field>
<field name="category_id" ref="module_agreement_legal_category"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
</record>
<!-- User group -->
<record id="group_agreement_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="module_agreement_legal_category"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="implied_ids" eval="[(4, ref('group_agreement_readonly'))]"/>
</record>
<!-- Manager group -->

2
agreement_legal/views/menu.xml

@ -11,7 +11,7 @@
web_icon="agreement_legal,static/description/icon.png"
sequence="80"
action="agreement_dashboard_agreement"
groups="agreement_legal.group_agreement_user"/>
groups="agreement_legal.group_agreement_readonly"/>
<!-- Dashboard -->
<menuitem
name="Dashboard"

Loading…
Cancel
Save