Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Access denied with payslip

By
haraiguhan
on 8/16/13, 7:41 AM 4,442 views

Access Denied

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

(Document type: Pay Slip, Operation: read)

If you see an answer check it please !!

Yug Faa
on 8/19/13, 9:53 AM
5
Laura Jarvenpaa
On 8/16/13, 7:55 AM

This is because on settings->groups-> HR officer has a following record rule: Employee Payslip ['|', ('employee_id.user_id', '=', user.id), ('employee_id.department_id.manager_id.user_id', '=', user.id)] (this means that only employee whose payslip it is can edit or create it or the manager of the department where employee belongs to can edit it. Note: you have to define Manager of department from HR->configuration->Departments->select department->select manager) and because also Manager inherits from officer same rule restricts both user groups Manager and Officer.

If you don't want this restriction you can deactivate this record rule from Settings->Security->Record rules

Thanks a lot. I can solve it.

Naing Win
on 10/21/14, 5:06 AM

Thanks a lot. I can solve it.

Naing Win
on 10/21/14, 5:06 AM

I deactivates the rule, and now, I can make a payslip with my normal user! Thanks

Pascal Tremblay
on 12/7/14, 1:13 PM

Disabling this rule will make all employees to see other employees payslip ????

Jayanthi
on 10/18/16, 6:47 AM
2
Yug Faa
On 8/16/13, 9:42 AM

For our case we are changed the security to :

<record id="hr_payroll.property_rule_manager_payslip" model="ir.rule">
    <field name="name">Employee Payslip</field>
    <field model="ir.model" name="model_id" ref="model_hr_payslip"/>
    <field name="domain_force">[(1, '=', 1)]</field>
    <field name="groups" eval="[(4,ref('base.group_hr_manager'))]"/>
</record>

I explain : If a user is a HR Manager so he can generate ans see all payslip (our vision) So create/overwrite an other rule in the securtity with this information:

  • domain = [(1, '=', 1)]
  • groups = RH Manager
  • model = 'hr.payslip'

I see thuis more logic

Best regards

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 8/16/13, 7:41 AM
Seen: 4442 times
Last updated: 3/16/15, 8:10 AM