Skip to content

[20.0][MIG] hr_holidays_microsoft_calendar: Migration to 20.0 - #79

Closed
mav-adhoc wants to merge 3 commits into
ingadhoc:20.0from
adhoc-dev:20.0-t-76816-mav
Closed

mav-adhoc wants to merge 3 commits into
ingadhoc:20.0from
adhoc-dev:20.0-t-76816-mav

Conversation

@mav-adhoc

Copy link
Copy Markdown
Contributor
  • calendar.event._microsoft_values keeps its signature in 20.0 (microsoft_calendar/models/calendar_event.py:538; the file was renamed, the method was not), the Graph payload still builds the attendees key, and hr_holidays still creates the leave event with no_mail_to_attendees=True (hr_holidays/models/hr_leave.py:2064), so the override migrates unchanged.
  • Tests added: the module shipped without any. They cover both call shapes 20.0 uses for _microsoft_values — microsoft_sync passes fields_to_sync only, calendar.recurrence adds initial_values — and fail if the attendees key survives in the payload.
  • i18n regenerated; module name and summary translated. The first commit is the Weblate translation that landed in 19.0 after the branch point, cherry-picked.
  • depends and auto_install unchanged. No data migration script is needed: the module declares no fields, models or data.

Checks: migrator and upgrade_code (no changes), static checks, imports, permissions, pre-commit. Installed on a clean 20.0 database — it installs on its own, auto_install with hr_holidays and microsoft_calendar — and its 2 tests pass.

Heads-up for review, not introduced here: in 20.0 this module no longer changes anything in the time off flow. A leave event for an employee without an Odoo user has no calendar_id, and 20.0 requires one both for the immediate insert (microsoft_calendar/models/microsoft_sync.py:110-114) and in the cron domain (microsoft_calendar/models/calendar_event.py:320-321, new in 20.0), so it never reaches Outlook — and that was the case this module was written for. For an employee with an Odoo user the only attendee hr_holidays adds is the organizer, which the core already filters out (calendar_event.py:571). Whether to adopt the 20.0 behaviour or extend the module is a product decision pending in the internal task; the override is untouched here.

Tarea: https://www.adhoc.inc/odoo/project.task/76816

weblate and others added 3 commits November 5, 2026 10:32
The override needed no change: in 20.0 calendar.event._microsoft_values keeps
the signature (microsoft_calendar/models/calendar_event.py:538), the Graph
payload still carries the attendees key, and hr_holidays still creates the
leave event with no_mail_to_attendees=True (hr_holidays/models/hr_leave.py:2064).

Regenerate i18n and translate the module name and summary.
…attendees

The module shipped without tests: ingadhoc#64 added one and dropped it
before merging. This covers both call shapes 20.0 uses for _microsoft_values
-microsoft_sync passes fields_to_sync only, calendar.recurrence adds
initial_values- and fails if the attendees key survives in the payload.
@roboadhoc

Copy link
Copy Markdown
Contributor

Pull request status dashboard

@jcadhoc

jcadhoc commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@roboadhoc r+ nobump rebase-ff

@roboadhoc

Copy link
Copy Markdown
Contributor

Merge method set to rebase and fast-forward.

roboadhoc pushed a commit that referenced this pull request Nov 12, 2026
(cherry picked from commit 811db64)

Part-of: #79
Signed-off-by: Juan Carreras <[email protected]>
roboadhoc pushed a commit that referenced this pull request Nov 12, 2026
The override needed no change: in 20.0 calendar.event._microsoft_values keeps
the signature (microsoft_calendar/models/calendar_event.py:538), the Graph
payload still carries the attendees key, and hr_holidays still creates the
leave event with no_mail_to_attendees=True (hr_holidays/models/hr_leave.py:2064).

Regenerate i18n and translate the module name and summary.

Part-of: #79
Signed-off-by: Juan Carreras <[email protected]>
@roboadhoc roboadhoc closed this in 698f528 Nov 12, 2026
@roboadhoc roboadhoc added the 19.1 label Nov 12, 2026
@roboadhoc
roboadhoc deleted the 20.0-t-76816-mav branch November 12, 2026 15:58

This branch was previously deployed

1 inactive deployment
merge — 1696a8b7 Deployed Nov 12, 2026 by roboadhoc
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.

4 participants