Browse Source

Add security groups and accesses

pull/208/head
Guewen Baconnier 9 years ago
parent
commit
860be445db
  1. 4
      partner_revision/__openerp__.py
  2. 10
      partner_revision/security/ir.model.access.csv
  3. 19
      partner_revision/security/security.xml
  4. 1
      partner_revision/views/menu.xml
  5. 1
      partner_revision/views/revision_field_rule_views.xml

4
partner_revision/__openerp__.py

@ -27,7 +27,9 @@
'depends': ['base',
],
'website': 'http://www.camptocamp.com',
'data': ['views/menu.xml',
'data': ['security/security.xml',
'security/ir.model.access.csv',
'views/menu.xml',
'views/res_partner_revision_views.xml',
'views/revision_field_rule_views.xml',
],

10
partner_revision/security/ir.model.access.csv

@ -0,0 +1,10 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_view_revision_field_rule_partner_manager,revision field rules for partner managers,model_revision_field_rule,base.group_partner_manager,1,0,0,0
access_view_revision_field_rule_user,revision field rules for revision users,model_revision_field_rule,group_revision_user,1,0,0,0
access_view_revision_field_rule_manager,revision field rules for revision managers,model_revision_field_rule,group_revision_user,1,1,1,1
access_view_res_partner_revision_partner_manager,revision for partner managers,model_res_partner_revision,base.group_partner_manager,1,0,1,0
access_view_res_partner_revision_change_partner_manager,revision change for partner managers,model_res_partner_revision_change,base.group_partner_manager,1,0,1,0
access_view_res_partner_revision_user,revision for revision users,model_res_partner_revision,group_revision_user,1,1,1,0
access_view_res_partner_revision_change_user,revision change for revision users,model_res_partner_revision_change,group_revision_user,1,1,1,0
access_view_res_partner_revision_manager,revision for revision managers,model_res_partner_revision,group_revision_manager,1,1,1,1
access_view_res_partner_revision_change_manager,revision change for revision managers,model_res_partner_revision_change,group_revision_manager,1,1,1,1

19
partner_revision/security/security.xml

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="group_revision_manager" model="res.groups">
<field name="name">Revision Configuration</field>
<field name="comment">The user will have an access to the configuration of the revision rules.</field>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
<record id="group_revision_user" model="res.groups">
<field name="name">Revisions Validations </field>
<field name="comment">The user will be able to apply or reject revisions.</field>
<field name="implied_ids" eval="[(4, ref('group_revision_manager'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
</data>
</openerp>

1
partner_revision/views/menu.xml

@ -3,6 +3,7 @@
<data noupdate="0">
<menuitem id="menu_revision"
name="Partner Revisions"
groups="group_revision_user"
parent="base.menu_base_config"
sequence="20"/>
</data>

1
partner_revision/views/revision_field_rule_views.xml

@ -55,6 +55,7 @@
<menuitem id="menu_revision_field_rule"
parent="menu_revision"
groups="group_revision_manager"
sequence="20"
action="action_revision_field_rule_view"/>
</data>

Loading…
Cancel
Save