flectra/addons/hr_expense/security/ir_rule.xml
2018-01-16 02:34:37 -08:00

35 lines
1.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<flectra>
<data noupdate="1">
<record id="property_rule_expense_manager" model="ir.rule">
<field name="name">Manager Expense</field>
<field name="model_id" ref="model_hr_expense"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[
(4, ref('account.group_account_user')),
(4, ref('hr_expense.group_hr_expense_manager')),
(4, ref('hr_expense.group_hr_expense_user'))]"/>
</record>
<record id="property_rule_expense_employee" model="ir.rule">
<field name="name">Employee Expense</field>
<field name="model_id" ref="model_hr_expense"/>
<field name="domain_force">[('employee_id.user_id', '=', user.id)]</field>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
</record>
<record id="hr_expense_comp_rule" model="ir.rule">
<field name="name">Expense multi company rule</field>
<field name="model_id" ref="model_hr_expense"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
</record>
<record id="hr_expense_report_comp_rule" model="ir.rule">
<field name="name">Expense Report multi company rule</field>
<field name="model_id" ref="model_hr_expense_sheet"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
</record>
</data>
</flectra>