Skip to content

Commit

Permalink
Add multicompany security rule
Browse files Browse the repository at this point in the history
  • Loading branch information
astirpe committed Jul 3, 2017
1 parent 5f555b2 commit 79df52d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions l10n_nl_tax_statement/__manifest__.py
Expand Up @@ -15,6 +15,7 @@
],
'data': [
'security/ir.model.access.csv',
'security/tax_statement_security_rule.xml',
'data/report_layouts.xml',
'views/l10n_nl_vat_statement.xml',
'report/reports.xml',
Expand Down
11 changes: 11 additions & 0 deletions l10n_nl_tax_statement/security/tax_statement_security_rule.xml
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">

<record id="tax_statement_security_rule" model="ir.rule">
<field name="name">NL Tax Statement multicompany</field>
<field name="model_id" ref="model_l10n_nl_vat_statement"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>

</odoo>

0 comments on commit 79df52d

Please sign in to comment.