Skip to content

Commit

Permalink
[MIG][REF] Security groups.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbcosta committed Oct 14, 2020
1 parent 8d860bf commit 507f916
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion l10n_br_account_payment_order/demo/res_users.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<!-- Configure Users CNAB access -->
<record id="base.user_demo" model="res.users">
<field name="groups_id" eval="[(4, ref('l10n_br_account_payment_order.group_cnab_cobranca'))]"/>
<field name="groups_id" eval="[(4, ref('group_cnab_user'))]"/>
</record>

</odoo>
23 changes: 18 additions & 5 deletions l10n_br_account_payment_order/security/cnab_cobranca_security.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo noupdate="1">

<record id="group_cnab_cobranca" model="res.groups">
<field name="name">CNAB Cobranca</field>
<field name="category_id" ref="base.module_category_accounting_and_finance"/>
<record model="ir.module.category" id="module_category_cnab">
<field name="name">CNAB</field>
<field name="description">Helps you handle your CNAB needs.</field>
<field name="sequence">99</field>
</record>

<record id="group_cnab_user" model="res.groups">
<field name="name">CNAB User</field>
<field name="category_id" ref="module_category_cnab"/>
<field name="implied_ids" eval="[(4, ref('account_payment_order.group_account_payment'))]"/>
</record>

<record id="group_cnab_manager" model="res.groups">
<field name="name">CNAB Manager</field>
<field name="category_id" ref="module_category_cnab"/>
<field name="implied_ids" eval="[(4, ref('group_cnab_user'))]"/>
</record>

<record id="base.user_admin" model="res.users">
<field name="groups_id" eval="[(4, ref('l10n_br_account_payment_order.group_cnab_cobranca'))]"/>
<field name="groups_id" eval="[(4, ref('group_cnab_manager'))]"/>
</record>

<record id="base.group_system" model="res.groups">
<field name="implied_ids" eval="[(4, ref('l10n_br_account_payment_order.group_cnab_cobranca'))]"/>
<field name="implied_ids" eval="[(4, ref('group_cnab_manager'))]"/>
</record>

</odoo>
3 changes: 2 additions & 1 deletion l10n_br_account_payment_order/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
access_cnab_return_move_code,access_cnab_return_move_code,model_cnab_return_move_code,group_cnab_cobranca,1,1,1,1
access_cnab_return_move_code_user,access_cnab_return_move_code_user,model_cnab_return_move_code,group_cnab_user,1,0,0,0
access_cnab_return_move_code_manager,access_cnab_return_move_code_manager,model_cnab_return_move_code,group_cnab_manager,1,1,1,1

0 comments on commit 507f916

Please sign in to comment.