Skip to content

Commit

Permalink
add service perm
Browse files Browse the repository at this point in the history
  • Loading branch information
svseas committed Mar 4, 2024
1 parent b9ddb1f commit c1213a8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
10 changes: 10 additions & 0 deletions local-addons/morons/security/security.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<field name="perm_create" eval="True" />
<field name="perm_unlink" eval="True" />
</record>

<!-- create 2 groups: PM, contributor - assign different rights (he will give sample) -->
<record model="ir.module.category" id="module_category_morons">
<field name="name">Morons</field>
Expand Down Expand Up @@ -173,6 +174,15 @@
<field name="domain_force">[('user_id','=',user.id)]</field>
<field name="groups" eval="[(4, ref('morons.group_pm'))]"/>
</record> -->
<record id="module_merctrans_service" model="ir.model.access">
<field name="name">MercTrans Services Access</field>
<field name="model_id" ref="morons.model_merctrans_services" />
<field name="group_id" ref="base.group_system" />
<field name="perm_read" eval="1" />
<field name="perm_write" eval="1" />
<field name="perm_create" eval="1" />
<field name="perm_unlink" eval="1" />
</record>

</data>
</odoo>
14 changes: 14 additions & 0 deletions local-addons/morons/views/invoice.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<!-- <record id="invoice_access_all_users" model="ir.model.access">
<field name="name">invoice access for all users</field>
<field name="model_id" ref="morons.model_invoice" />
<field name="group_id" ref="base.group_user" />
<field name="perm_read" eval="True" />
<field name="perm_write" eval="True" />
<field name="perm_create" eval="True" />
<field name="perm_unlink" eval="True" /> -->

</data>
</odoo>

0 comments on commit c1213a8

Please sign in to comment.