Community mailing list archives
Re: Hiding the cost of the employeeby
Pedro M. Baeza
I have made the review.Regards.
2015-05-12 18:28 GMT+02:00 Jordi Ballester Alomar <firstname.lastname@example.org>:
Hi Pedro,Thanks for your feedback. But someone from purchasing would still be able to access to the product that represents that employee and view the hourly cost.I have now implemented this feature, and submitted it to OCA for review:Description of the module:Manage products representing employees======================================This module was written to extend the Timesheet capabilities of Odoo.It allows to restrict the access to the products that represent an actualemployee, only to the Human Resources / Manager group.A company may want to record an actual hourly cost per employee, so that thetime entered by employees through timesheets can result in a more realisticcost, but at the same time want to conceal this information to generalemployees.Usage=====A user in the group 'Human Resources / Manager' should go to the product formand set the checkbox 'Is Employee'. This product will then be accessible onlyby this group.Regards,Jordi.On Tue, May 12, 2015 at 6:13 PM, Pedro Manuel Baeza Romero <email@example.com> wrote: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 <firstname.lastname@example.org>: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.