Community mailing list archives

community@mail.odoo.com

Re: Hiding the cost of the employee

by
Eficent Business and IT Consulting Services, S.L.
- 05/12/2015 14:19:47

Thanks! I'll follow up.

El dia 12/05/2015 20:18, "Pedro Manuel Baeza Romero" <pedro.baeza@gmail.com> va escriure:
I have made the review.

Regards.

2015-05-12 18:28 GMT+02:00 Jordi Ballester Alomar <jordi.ballester@eficent.com>:
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:

Inline image 1

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 actual
employee, only to the Human Resources / Manager group.

A company may want to record an actual hourly cost per employee, so that the
time entered by employees through timesheets can result in a more realistic
cost, but at the same time want to conceal this information to general
employees.


Usage
=====

A user in the group 'Human Resources / Manager' should go to the product form
and set the checkbox 'Is Employee'. This product will then be accessible only
by this group.


Regards,
Jordi.



On Tue, May 12, 2015 at 6:13 PM, Pedro Manuel Baeza Romero <pedro.baeza@gmail.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 <jordi.ballester@eficent.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.

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe