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

[16.0][ADD] hr_timesheet_overtime_rate: Add hours_worked field #41

Open
wants to merge 8 commits into
base: 16.0
Choose a base branch
from

Conversation

carmenbianca
Copy link
Member

@carmenbianca carmenbianca commented Jul 4, 2024

Description

This should hopefully fix the problem described in #33 (comment)

I'm not 100% about this PR at time of writing:

  • The summary page doesn't work.
  • I feel like everything related to different rates on certain days is not at all related to the rest of this module. This is a part of that. Maybe it should be factored out? Done.

Odoo task (if applicable)

T12629

Checklist before approval

  • Tests are present (or not needed).
  • Credits/copyright have been changed correctly.
  • Change log snippet is present.
  • (If a new module) Moving this to OCA has been considered.

This functionality was completely unlinked from the rest of
hr_timesheet_overtime.

I would have done this in two commits, but then the files wouldn't move
over cleanly, losing history.

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
@carmenbianca carmenbianca changed the title [16.0][REF] hr_timesheet_overtime: Add hours_worked field [16.0][ADD] hr_timesheet_overtime_rate: Add hours_worked field Jul 5, 2024
@carmenbianca carmenbianca force-pushed the 16.0-refactor-overtime-compute branch from df0bc5c to 90d017e Compare July 11, 2024 11:27
@carmenbianca carmenbianca marked this pull request as ready for review July 11, 2024 12:22
@carmenbianca
Copy link
Member Author

@huguesdk ready for review

…pi.model method

This makes it easier to extend with additional available information on
the record.

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
@carmenbianca carmenbianca force-pushed the 16.0-refactor-overtime-compute branch from a111618 to 22179d1 Compare July 18, 2024 13:18
Copy link
Member

@huguesdk huguesdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work! almost there.

note that the hours_worked field doesn’t appear in the timesheet lines of tasks (on the task form). i think that this should be added.

hr_timesheet_overtime_rate/__manifest__.py Outdated Show resolved Hide resolved
hr_timesheet_overtime_rate/__manifest__.py Outdated Show resolved Hide resolved
hr_timesheet_overtime_rate/models/account_analytic_line.py Outdated Show resolved Hide resolved
hr_timesheet_overtime_rate/readme/ROADMAP.rst Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this module doesn’t depend on hr_timesheet_overtime, shouldn’t it be named something like hr_timesheet_worktime_rate? all its ui mentions “overtime rate”, though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're technically right, but this would require more refactoring and migration scripts. I propose we don't do this because there is no real need for this at the moment.

hr_timesheet_overtime_rate/__manifest__.py Show resolved Hide resolved
No functional differences; code is a little prettier.

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
@carmenbianca carmenbianca force-pushed the 16.0-refactor-overtime-compute branch from 8e9dc38 to 509de5b Compare September 16, 2024 13:01
By decreasing the priority, we make sure that hours_worked is as close
to unit_amount as possible.

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
@carmenbianca carmenbianca force-pushed the 16.0-refactor-overtime-compute branch from 2136f92 to faf9def Compare September 16, 2024 13:58
Copy link
Member

@huguesdk huguesdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay, lgtm! 🎉

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

Successfully merging this pull request may close these issues.

3 participants