'Use domain to filter where users are displayed in odoo enterprise 15

I have multiple locations in inventory and I know it is location_id of stock.quant object and field type is many2one. How can i use domain to filter users to only see a certain repository, I have tried [('location_id','=' ,'Stock_df')] but it doesn't work.

enter image description here



Solution 1:[1]

Him Thanh,

You can try with below code

<filter name="shelf_loc" string="Shelf Locations" domain="[('location_id.name','ilike', 'Shelf')]"/>

Here is the sample code screenshot. enter image description here

Here is the result of code. enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Synodica Solutions Pvt. Ltd.