Community mailing list archives
Re: Hiding the cost of the employeeby
Pedro M. Baeza
Force in the context of the product_id field of HR form to use a specific view without that field (you can do it making a primary view inheriting the regular one an with attribute invisible).Regards.
2015-05-12 17:43 GMT+02:00 Jordi Ballester Alomar <email@example.com>:
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.