odoo/addons/portal_stock/security/portal_security.xml

21 lines
1.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Stock Portal Access Rules -->
<record id="portal_stock_picking_portal_user_rule" model="ir.rule">
<field name="name">Portal Follower Pickings</field>
<field name="model_id" ref="stock.model_stock_picking"/>
<field name="domain_force">['|', '|', ('message_partner_ids', 'in', [user.partner_id.id]), ('partner_id.id', '=', user.partner_id.id), ('sale_id.partner_id.id', '=', user.partner_id.id)]</field>
<field name="groups" eval="[(4, ref('base.group_portal'))]"/>
</record>
<record id="portal_stock_pack_operation_portal_user_rule" model="ir.rule">
<field name="name">Portal Follower Pack Operations</field>
<field name="model_id" ref="stock.model_stock_pack_operation"/>
<field name="domain_force">['|', ('picking_id.message_partner_ids','in',[user.partner_id.id]), ('picking_id.partner_id.id','=',user.partner_id.id)]</field>
<field name="groups" eval="[(4, ref('base.group_portal'))]"/>
</record>
</data>
</odoo>