Skip to content
Snippets Groups Projects
Commit f207e6da authored by Santiago Said's avatar Santiago Said
Browse files

[ADD] Ir.rule to filter by user the warehouse for picking types

parent 93a0d969
Branches 8.0
No related tags found
No related merge requests found
......@@ -47,6 +47,7 @@
"views/invoice_view.xml",
"views/menuitems.xml",
"security/ir.model.access.csv",
"security/security_rules.xml",
"static/src/xml/financing.xml",
],
"qweb": ["static/src/xml/pos.xml"],
......
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="ir_rule_pos_user_see_own_picking_types" model="ir.rule">
<field name="name">Rule for PoS Users to see only their picking types assigned to PoS</field>
<field name="active" eval="1"/>
<field name="model_id" ref="stock.model_stock_picking_type"/>
<field name="groups" eval='[(6, 0, [ref("point_of_sale.group_pos_user")])]'/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_create" eval="0"/>
<field name="perm_unlink" eval="0"/>
<field name="domain_force">
[
'|',
('warehouse_id', '=', user.pos_config.stock_location_id.get_warehouse(user.pos_config.stock_location_id)),
('warehouse_id', '=', False)
]
</field>
</record>
</data>
</openerp>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment