Help

2

How to set restriction for users in Warehouse???

Avatar
Miel

Suppose I have Warehouse-A, Warehouse-B and Warehouse-C and I want User-A will only access Warehouse-A, same with Warehouse-B for User-B only and Warehouse-C for User-C. Is it possible to restrict warehouses for specific user? Please help anyone thank you so much in advance.

Avatar
Discard
2 Answers
2
Avatar
Miel
Best Answer

I've created security for this...

    <record id="group_warehouse_user" model="res.groups">
        <field name="name"> Warehouse Rules User</field>         
    </record> 
   
      <record id="group_warehouse_rules_member" model="ir.rule">
            <field name="name">Warehouse User</field>
            <field name="model_id" ref="model_stock_warehouse"/>
            <field name="domain_force">[('partner_id.id','=',user.warehouse_id.id)]</field>
            <field name="groups" eval="[(4, ref('group_warehouse_user'))]"/>
        
    </record>

Avatar
Discard
0
Best Answer

For Miel, can you give me a step by step tutorial for creating security as you mention above. I have no idea how to do it. thanks

Avatar
Discard