Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
5555 Zobrazení


How to restrict Warehouse access to certain users

Avatar
Zrušit

this is working for the Inventory module, but in the Sales module, when the user select Product he get following error:

ValueError: Invalid field stock.location.x_warehouse_id in leaf ('x_warehouse_id', '=', False)


Autor Nejlepší odpověď

How to give access to certain warehouses to a specific user ?

> The idea is to limit the access to all the data of that warehouse.


1) Create a new field x_warehouse on model "res.users"
























2) On the user, edit the form view and add the bold code (tag enables to choose multiple warehouses) in the inherited view created with Studio:

Only take the bold code in the following path.


<data>

  <xpath expr="//field[@name='company_id']" position="after">

    <field name="x_warehouse_ids" widget="many2many_tags"/>   

  </xpath>

 </data>


3) Create a record rule :

3.1 For the Warehouse





















3.2. For the locations 





















3.3. For the pickings

Avatar
Zrušit

please re-insert the images!

Nejlepší odpověď

Hello, I see your very functional responses and they would help me solve a problem that I have just about this, but I cannot view the images, could you provide them to me through a link or some other way please?
Thank you

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
dub 25
1154
4
pro 24
16404
1
srp 24
3173
1
srp 24
9210
3
bře 24
7553