user3405520
user3405520

Reputation: 61

Odoo Security Error [ Stock Location ]

Security In Odoo.

in stock location form , i need to assign users to particular stock-location.

i have make record rule and works fine. But i am facing the error for "Inventoried Location from warehouse / Inventory Control / inventory adjustments".

I have added rule and Please find video from dropbox link for more description.

https://www.dropbox.com/s/hhho1hsyg3y06f5/odoo_security_error.ogv?dl=0

security.xml file

rule : [('user_ids','in',[user.id])]

Thanks.

Upvotes: 0

Views: 723

Answers (1)

It gives you security restriction message because you have not set users for all the location, so where it's not found any allowed users then it will raise security message.

Because when you click on location, the security rules will applicable to all the data of the stock.location, and few of them will not fulfill the rules criteria that's the reason why you got this message.

You should try this,

['!','!',('usage','=','view'),('user_ids','=',False),('user_ids','in',[user.id])]

Ignore checking if allowed users not set or location type is view, and if then also you faces problem then you need to add parent location in to the restriction because in location there is parent-child structure so you may need to add it in rules.

['!','!','!',('usage','=','view'),('user_ids','=',False),('location_id.user_ids','in',[user.id]),('user_ids','in',[user.id])]

Upvotes: 0

Related Questions