Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Add multicompany security rule (OCA#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
astirpe committed Oct 18, 2018
1 parent ed229df commit a35fc4e
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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 a35fc4e

Please sign in to comment.