Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[quality_control_hr] Error when logging in #1244

Open
andreparames opened this issue May 27, 2016 · 0 comments
Open

[quality_control_hr] Error when logging in #1244

andreparames opened this issue May 27, 2016 · 0 comments

Comments

@andreparames
Copy link

The module quality_control_hr has a couple of security rule that assume the user has an associated employee, so they throw ValueError: "tuple index out of range" on login when a user doesn't have an employee.

The domain of the rules in question is:

['|',('department','=',user.employee_ids[0].department_id.id),('department','=',False)]

My suggestion would be to change it to:

['|',('department','=',user.employee_ids and user.employee_ids[0].department_id.id),('department','=',False)]

But I'm not sure it's the best way to deal with this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant