[trunk/7.0]Access error on payslip

Bug #1116129 reported by Mihalache Ciprian
52
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Medium
OpenERP R&D Addons Team 3

Bug Description

openerp - 5 February 2013 release

When a human resources -> manager try to create a payslip to a employee who has attached a contract and an Working Schedule attached to that contract he gets this error.

I don't think it is necessary that a human resources manager to have access to admin settings.

Access Denied

Sorry, you are not allowed to access this document. Only users with the following access level are currently allowed to do that:
- Administration/Settings

(Document model: resource.calendar.attendance)

Second bug:

Let's say I give access to admin->settings to the human resources manager

After that I get another error when the human resources manager try to save the payslip.

Access Denied

The requested operation cannot be completed due to security restrictions. Please contact your system administrator.

(Document type: Pay Slip, Operation: create)

PS: Actually only admin with full user right can create a payslip in v7

Tags: v7

Related branches

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Mihalache,

I have faced only one error which is the access error of (Document model: (Document model: resource.calendar.attendance)).

Then after I have assign the right is (Document model: resource.calendar.attendance) to human resource manager group then all are working fine. I didn't face the 2nd error.

So I am confirming this only for the 1st access error and then request to RD team would you please double check the 2nd access error whether its exist or not.??

Thannk you!

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Medium
status: New → Confirmed
summary: - Payslip restriction v7
+ Access error on payslip
Revision history for this message
Mihalache Ciprian (ciprian-mihalache) wrote : Re: Access error on payslip

Great !! Thanks.

One more question ?

After you update the next release with the right access the databases will automatically update or I need to add manually the right rule for the resource.calendar.attendance object ?

I attached a document with what I have now. I don't know how to change to the right rule so the others objects depending on this, will not be affected. (calendar object)

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Mihalanche,

After this bug has been fixed you have to take the latest code(or update your code), then after you can update your database by following command.
-u module name -d db name or you have to update via module list after server is restart.

Now another thing you have given a wrong group on your access rights, If you want to assign it manually please select the "Human Resource/Manager" group instead of "Administrator/Setting".

Thank you!

Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Chandni Gandhi(OpenERP) (cga-openerp) wrote :

Hello,

It has been fixed in to : https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1116129-cga

Revision No:8534
Revision ID: <email address hidden>

It will be merged soon.

Thanks.

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Mihalache Ciprian (ciprian-mihalache) wrote :

Thanks for reply.

Second bug still persist when I try to create a payslip. I don't know how to debug this. What rule to check or what file. Maybe a language problem (I switched to English and no change)

Access Denied

The requested operation cannot be completed due to security restrictions. Please contact your system administrator.

(Document type: Pay Slip, Operation: create)

I attached the access rules on payslip.

Revision history for this message
Amit Bhavsar (Open ERP) (amb-openerp) wrote :

Hello Mihalanche,

I have checked your second Issue with latest trunk and 7.0. and I have faced the same Access rights problem while create a payslip with hr/Manger rights. That's why I am set this Issue confirmed again.

So I requested to CGA, please fix this Issue also in same branch.

Thanks!

Changed in openobject-addons:
status: Fix Committed → Confirmed
Revision history for this message
Chandni Gandhi(OpenERP) (cga-openerp) wrote :

Hello Amit Bhavsar ,

In comment #5 & 6 mention that there is still need to fix following problem of creation payslip.
But as per my R&D it is not a bug it's a feature of openERP.
There is a recordrule for payslip.
['|', ('employee_id.user_id', '=', user.id), ('employee_id.department_id.manager_id.user_id', '=', user.id)]

@ Mihalanche:

At the time of creation employee payslip please check following points:
1) login user is also employee related user
or
2) login user is department manager of employee's department

For now I set this bug as fix commited
Hope it will help you.

Thanks & Regards,
Chandni Gandhi

Changed in openobject-addons:
status: Confirmed → Fix Committed
Changed in openobject-addons:
status: Fix Committed → Fix Released
Revision history for this message
Mihalache Ciprian (ciprian-mihalache) wrote :

I checked and attached the user rights,

The error is still there.

Only as admin with almost all options checked I can create a payslip.

summary: - Access error on payslip
+ [trunk/7.0]Access error on payslip
Changed in openobject-addons:
status: Fix Released → Confirmed
Revision history for this message
Mihalache Ciprian (ciprian-mihalache) wrote :

I am using openerp-7.0-20130217-002303 and the problem is still here.

I really need this bug fixed.

Revision history for this message
Mihalache Ciprian (ciprian-mihalache) wrote :

Same with 20130218

Gabriel Uma (gabriumaa)
Changed in openobject-addons:
status: Confirmed → In Progress
status: In Progress → Confirmed
Revision history for this message
ernest (lokyizp) wrote :

I am using openerp-7.0-20130404-232436 and the problem is still here.

Revision history for this message
Eu (eusave) wrote :

same here, in fact this issue is affecting my daily operation, I appreciate your help to resolve this.
thanks in advance

version: openerp-7.0-20130415-092548

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.