diff --git a/__manifest__.py b/__manifest__.py index 1b4807bc1b0e3faa6003a9af452861aa6e9507d3..ae601e0672772db167b58d9afa9e2b392a769b5e 100755 --- a/__manifest__.py +++ b/__manifest__.py @@ -12,6 +12,7 @@ "cgscop_cotisation", ], "data": [ + "security/security_rules.xml", "security/ir.model.access.csv", "views/res_config_settings.xml", "views/scop_cotisation.xml", diff --git a/security/security_rules.xml b/security/security_rules.xml new file mode 100644 index 0000000000000000000000000000000000000000..bdda16b51736d72937bf25ed2544a1321f0ad4e2 --- /dev/null +++ b/security/security_rules.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2020 Le Filament + License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> + +<odoo> + <data noupdate="0"> + + <record id="cg_cotisation_cg_rule" model="ir.rule"> + <field name="name">Cotisations consultables que pour sa société</field> + <field name="model_id" ref="cgscop_cotisation_cg.model_scop_cotisation"/> + <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> + <field name="perm_read" eval="True"/> + <field name="perm_write" eval="True"/> + <field name="perm_create" eval="True"/> + <field name="perm_unlink" eval="True"/> + </record> + + </data> +</odoo> \ No newline at end of file