Hello guys
Is there any way to hide product prices from users with a specific role? These users have to see products, but without any commercial info.
For example: I have a production engineer who can create new products. So he needs an access to all products. But if I give him permission to see products, he see the prices too, and it isn’t allowed. How to avoid this situation? Is it possible?
As I understand that I have to change the product-form view with some conditions for required fields (like prices, accounting family etc), but I don’t understand how to do it)
Permission system on Axelor is a bit ugly for what you want because you have a lot of modification to do everywhere,
You can check if user have permision by using if
conditions on fields :
<field name="salePrice" if="__user__.getRoles().contains(__repo__(Role).findByName("SPECIFIC.ROLE"))"
Dont’ forget to use extension views to apply if field !