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

76 lines
4.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<flectra>
<record id="group_pos_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="base.module_category_point_of_sale"/>
</record>
<record id="group_pos_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="base.module_category_point_of_sale"/>
<field name="implied_ids" eval="[(4, ref('group_pos_user')), (4, ref('stock.group_stock_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
<record id="rule_pos_bank_statement_user" model="ir.rule">
<field name="name">Point Of Sale Bank Statement POS User</field>
<field name="model_id" ref="account.model_account_bank_statement" />
<field name="groups" eval="[(4, ref('group_pos_user'))]"/>
<field name="domain_force">[('pos_session_id', '!=', False)]</field>
</record>
<record id="rule_pos_bank_statement_account_user" model="ir.rule">
<field name="name">Point Of Sale Bank Statement Accountant</field>
<field name="model_id" ref="account.model_account_bank_statement" />
<field name="groups" eval="[(4, ref('account.group_account_user'))]"/>
<field name="domain_force">[(1, '=', 1)]</field>
</record>
<record id="rule_pos_bank_statement_line_user" model="ir.rule">
<field name="name">Point Of Sale Bank Statement Line POS User</field>
<field name="model_id" ref="account.model_account_bank_statement_line" />
<field name="groups" eval="[(4, ref('group_pos_user'))]"/>
<field name="domain_force">[('statement_id.pos_session_id', '!=', False)]</field>
</record>
<record id="rule_pos_bank_statement_line_account_user" model="ir.rule">
<field name="name">Point Of Sale Bank Statement Line Accountant</field>
<field name="model_id" ref="account.model_account_bank_statement_line" />
<field name="groups" eval="[(4, ref('account.group_account_user'))]"/>
<field name="domain_force">[(1, '=', 1)]</field>
</record>
<record id="rule_pos_cashbox_line_accountant" model="ir.rule">
<field name="name">Point Of Sale Cashbox Line Accountant</field>
<field name="model_id" ref="account.model_account_cashbox_line" />
<field name="groups" eval="[(4, ref('account.group_account_user'))]"/>
<field name="domain_force">[(1, '=', 1)]</field>
</record>
<record id="rule_pos_multi_company" model="ir.rule">
<field name="name">Point Of Sale Order</field>
<field name="model_id" ref="model_pos_order" />
<field name="global" eval="True" />
<field name="domain_force">[('company_id', '=', user.company_id.id)]</field>
</record>
<record id="rule_pos_session_multi_company" model="ir.rule">
<field name="name">Point Of Sale Session</field>
<field name="model_id" ref="model_pos_session" />
<field name="global" eval="True" />
<field name="domain_force">[('config_id.company_id', '=', user.company_id.id)]</field>
</record>
<record id="rule_pos_config_multi_company" model="ir.rule">
<field name="name">Point Of Sale Config</field>
<field name="model_id" ref="model_pos_config" />
<field name="global" eval="True" />
<field name="domain_force">[('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="rule_pos_order_report_multi_company" model="ir.rule">
<field name="name">Point Of Sale Order Analysis multi-company</field>
<field name="model_id" ref="model_report_pos_order"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<data noupdate="1">
<record id="base.default_user" model="res.users">
<field name="groups_id" eval="[(4,ref('point_of_sale.group_pos_manager'))]"/>
</record>
</data>
</flectra>