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

24 lines
1.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<flectra>
<data noupdate="1">
<record id="payment_transaction_user_rule" model="ir.rule">
<field name="name">Access own payment transaction only</field>
<field name="model_id" ref="payment.model_payment_transaction"/>
<field name="domain_force">[
'|',
('partner_id','=',False),
('partner_id','=',user.partner_id.id)
]</field>
<field name="groups" eval="[(4, ref('base.group_user')), (4, ref('base.group_portal')), (4, ref('base.group_public'))]"/>
</record>
<record id="payment_token_user_rule" model="ir.rule">
<field name="name">Access own payment tokens only</field>
<field name="model_id" ref="payment.model_payment_token"/>
<field name="domain_force">['|', ('partner_id','=',user.partner_id.id), ('partner_id', '=', user.partner_id.commercial_partner_id.id)]</field>
<field name="groups" eval="[(4, ref('base.group_user')), (4, ref('base.group_portal')), (4, ref('base.group_public'))]"/>
</record>
</data>
</flectra>