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

[FIX] resource, hr_payroll: fix hours_per_day onchange #29951

Closed

Conversation

LucasLefevre
Copy link
Contributor

In resource, calendar.attendances with a resource_id specified
were taken into account to compute the average hours per day.
This is incorrect and could lead to hours_per_day being > 24h.

Also when hr_payroll is installed, attendance_ids is replaced
by normal attendance (those without a resource_id set) in the view.
The onchange method was not called to recompute the average hours per day.

This commit fixes both issues.

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@C3POdoo C3POdoo added the RD research & development, internal work label Jan 4, 2019
@tivisse tivisse force-pushed the saas-12.1-resource-fix-hours-lul branch 3 times, most recently from 7ab54e2 to 914654c Compare January 9, 2019 13:27
@tivisse
Copy link
Contributor

tivisse commented Jan 9, 2019

@robodoo r+

@robodoo robodoo added the r+ 👌 label Jan 9, 2019
In resource, calendar.attendances with a resource_id specified
were taken into account to compute the average hours per day.
This is incorrect and could lead to hours_per_day being > 24h.

Also when hr_payroll is installed, attendance_ids is replaced
by normal attendance (those without a resource_id set) in the view.
The onchange method was not called to recompute the average hours per day.

This commit fixes both issues.
@LucasLefevre LucasLefevre force-pushed the saas-12.1-resource-fix-hours-lul branch from 914654c to 7791aea Compare January 9, 2019 15:09
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed r+ 👌 labels Jan 9, 2019
@LucasLefevre
Copy link
Contributor Author

@tivisse r+
Would it work !?

@tivisse
Copy link
Contributor

tivisse commented Jan 10, 2019

@robodoo r+

robodoo pushed a commit that referenced this pull request Jan 10, 2019
In resource, calendar.attendances with a resource_id specified
were taken into account to compute the average hours per day.
This is incorrect and could lead to hours_per_day being > 24h.

Also when hr_payroll is installed, attendance_ids is replaced
by normal attendance (those without a resource_id set) in the view.
The onchange method was not called to recompute the average hours per day.

This commit fixes both issues.

closes #29951
@robodoo
Copy link
Contributor

robodoo commented Jan 10, 2019

Merged, thanks!

@robodoo robodoo closed this Jan 10, 2019
@tivisse tivisse deleted the saas-12.1-resource-fix-hours-lul branch January 11, 2019 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants