Skip to content

[16.0][MIG] resource_work_time_from_contracts: forward-port changes from 12.0.2.0.0 - #407

Open
huguesdk wants to merge 10 commits into
16.0from
16.0-mig-forward-port-resource_work_time_from_contracts-12.0.2.0.0
Open

huguesdk wants to merge 10 commits into
16.0from
16.0-mig-forward-port-resource_work_time_from_contracts-12.0.2.0.0

Conversation

@huguesdk

@huguesdk huguesdk commented Aug 26, 2026 •

Copy link
Copy Markdown
Member

description

huguesdk and others added 9 commits August 25, 2026 14:46
* allow contracts with different workday lengths for different employees
  of the same company.
* use only the resource.calendar of the contracts to define the length
  of a workday, instead of using the resource.calendar of the company.
* improve compatibility with hr_holidays.
* test and fix access rights.
By splitting this method up, it will be easier for me to do some
extension work elsewhere.

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
…eger id

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
avoid error with contracts without a resource_calendar_id.
* forward-port changes from resource_work_time_from_contracts
  12.0.2.0.0.
* remove useless patch hook as the code has been refactored into a
  separate method: hr.leave._get_attendances().
* fix hr.leave.type create values in test.
* replace call to hr.leave._onchange_request_parameters() to
  _compute_date_from_to() in tests, as the former doesn't exist anymore
  and has been replaced by the latter.
* replace calls to the deprecated
  resource.mixin.list_normal_work_time_per_day() by
  list_attendance_time_per_day() in tests.
* fix result of resource.mixin._get_work_days_data_batch(): it must be a
  dict containing the results for all records, indexed by id.
* remove redundant readonly=True arguments on related fields.
* remove warning "Redundant default on resource.resource.calendar_id"
use the same default rounding mechanism as in 16.0: round only the total
number of days instead of using per-day rounding with a factor.
@huguesdk
huguesdk force-pushed the 16.0-mig-forward-port-resource_work_time_from_contracts-12.0.2.0.0 branch from 63b39d8 to e2f831b Compare September 9, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redundant default on warnings on models implementing resource_mixin

3 participants