Community mailing list archives

Hiding the cost of the employee

Eficent Business and IT Consulting Services, S.L.
- 05/12/2015 09:02:35
Dear community members,

I am getting nuts trying to hide the cost of the employees, but at the same time letting users view the cost of products in other categories.

My typical use case is an engineer that generally purchases material, and needs to know the product cost. But at the same time the cost of the employees show only be visible to a very limited subset of users (perhaps only Employee Managers).

It is not possible to use security rules to restrict the ability to read products that belong to an "Employees" category, because the hr_timesheet module needs to read data from the product.

In this sense one option would be to submit an Issue to Odoo to request that the read operations to the product from the analytic account  and hr timesheet to obtain the product details should be performed by a SUPERUSER.

Another option would be to store the employee cost out of the product itself, into a field of the employee, that only a certain group (such as HR/Manager) could access to.

I'm currently about to implement this last option, and will share the code. 

But any other options on how to come around this issue are very welcome.