From 21f241da61aafcd21422d58ae29d23f7f3700961 Mon Sep 17 00:00:00 2001 From: Weblate Date: Fri, 2 Oct 2026 17:38:48 +0000 Subject: [PATCH 1/3] Added translation using Weblate (Spanish) (cherry picked from commit 811db64074f750b937a775c43ce6a3046ce0e530) --- hr_holidays_microsoft_calendar/i18n/es.po | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 hr_holidays_microsoft_calendar/i18n/es.po diff --git a/hr_holidays_microsoft_calendar/i18n/es.po b/hr_holidays_microsoft_calendar/i18n/es.po new file mode 100644 index 00000000..bfcad94b --- /dev/null +++ b/hr_holidays_microsoft_calendar/i18n/es.po @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_holidays_microsoft_calendar +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 19.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-17 15:20+0000\n" +"PO-Revision-Date: 2026-06-17 15:20+0000\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: hr_holidays_microsoft_calendar +#: model:ir.model,name:hr_holidays_microsoft_calendar.model_calendar_event +msgid "Calendar Event" +msgstr "" + +#. module: hr_holidays_microsoft_calendar +#: model:ir.model.fields,field_description:hr_holidays_microsoft_calendar.field_calendar_event__display_name +msgid "Display Name" +msgstr "" + +#. module: hr_holidays_microsoft_calendar +#: model:ir.model.fields,field_description:hr_holidays_microsoft_calendar.field_calendar_event__id +msgid "ID" +msgstr "" From 5f1eaaf96dfcbe831784cbab2349fc6ac6db3dfa Mon Sep 17 00:00:00 2001 From: mav-adhoc Date: Thu, 5 Nov 2026 10:32:59 -0300 Subject: [PATCH 2/3] [MIG] hr_holidays_microsoft_calendar: Migration to 20.0 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. --- .../__manifest__.py | 4 ++-- hr_holidays_microsoft_calendar/i18n/es.po | 20 ++++++++++++++----- .../i18n/hr_holidays_microsoft_calendar.pot | 16 ++++++++++++--- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/hr_holidays_microsoft_calendar/__manifest__.py b/hr_holidays_microsoft_calendar/__manifest__.py index a4ed861e..7f5e9e7f 100644 --- a/hr_holidays_microsoft_calendar/__manifest__.py +++ b/hr_holidays_microsoft_calendar/__manifest__.py @@ -19,7 +19,7 @@ ############################################################################## { "name": "Holidays Microsoft Calendar", - "version": "19.0.1.0.0", + "version": "20.0.1.0.0", "category": "Human Resources", "summary": "Suppress Outlook invitations when approving time off", "author": "ADHOC SA", @@ -31,7 +31,7 @@ ], "data": [], "demo": [], - "installable": False, + "installable": True, "auto_install": True, "application": False, } diff --git a/hr_holidays_microsoft_calendar/i18n/es.po b/hr_holidays_microsoft_calendar/i18n/es.po index bfcad94b..3b358b92 100644 --- a/hr_holidays_microsoft_calendar/i18n/es.po +++ b/hr_holidays_microsoft_calendar/i18n/es.po @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 19.0+e\n" +"Project-Id-Version: Odoo Server 20.0+e\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-17 15:20+0000\n" -"PO-Revision-Date: 2026-06-17 15:20+0000\n" +"POT-Creation-Date: 2026-11-05 13:41+0000\n" +"PO-Revision-Date: 2026-11-05 13:41+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" "Language: es\n" @@ -19,14 +19,24 @@ msgstr "" #. module: hr_holidays_microsoft_calendar #: model:ir.model,name:hr_holidays_microsoft_calendar.model_calendar_event msgid "Calendar Event" -msgstr "" +msgstr "Evento del calendario" #. module: hr_holidays_microsoft_calendar #: model:ir.model.fields,field_description:hr_holidays_microsoft_calendar.field_calendar_event__display_name msgid "Display Name" -msgstr "" +msgstr "Mostrar nombre" + +#. module: hr_holidays_microsoft_calendar +#: model:ir.module.module,shortdesc:base.module_hr_holidays_microsoft_calendar +msgid "Holidays Microsoft Calendar" +msgstr "Ausencias Microsoft Calendar" #. module: hr_holidays_microsoft_calendar #: model:ir.model.fields,field_description:hr_holidays_microsoft_calendar.field_calendar_event__id msgid "ID" msgstr "" + +#. module: hr_holidays_microsoft_calendar +#: model:ir.module.module,summary:base.module_hr_holidays_microsoft_calendar +msgid "Suppress Outlook invitations when approving time off" +msgstr "Suprime las invitaciones de Outlook al aprobar ausencias" diff --git a/hr_holidays_microsoft_calendar/i18n/hr_holidays_microsoft_calendar.pot b/hr_holidays_microsoft_calendar/i18n/hr_holidays_microsoft_calendar.pot index 536a25eb..8f383132 100644 --- a/hr_holidays_microsoft_calendar/i18n/hr_holidays_microsoft_calendar.pot +++ b/hr_holidays_microsoft_calendar/i18n/hr_holidays_microsoft_calendar.pot @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 19.0+e\n" +"Project-Id-Version: Odoo Server 20.0+e\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-17 15:20+0000\n" -"PO-Revision-Date: 2026-06-17 15:20+0000\n" +"POT-Creation-Date: 2026-11-05 13:40+0000\n" +"PO-Revision-Date: 2026-11-05 13:40+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -25,7 +25,17 @@ msgstr "" msgid "Display Name" msgstr "" +#. module: hr_holidays_microsoft_calendar +#: model:ir.module.module,shortdesc:base.module_hr_holidays_microsoft_calendar +msgid "Holidays Microsoft Calendar" +msgstr "" + #. module: hr_holidays_microsoft_calendar #: model:ir.model.fields,field_description:hr_holidays_microsoft_calendar.field_calendar_event__id msgid "ID" msgstr "" + +#. module: hr_holidays_microsoft_calendar +#: model:ir.module.module,summary:base.module_hr_holidays_microsoft_calendar +msgid "Suppress Outlook invitations when approving time off" +msgstr "" From 1696a8b76e95d7e5345196d0959108abd319c165 Mon Sep 17 00:00:00 2001 From: mav-adhoc Date: Thu, 5 Nov 2026 10:43:16 -0300 Subject: [PATCH 3/3] [ADD] hr_holidays_microsoft_calendar: test the Outlook payload drops attendees The module shipped without tests: ingadhoc/hr#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. --- .../tests/__init__.py | 1 + .../tests/test_calendar_event.py | 42 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 hr_holidays_microsoft_calendar/tests/__init__.py create mode 100644 hr_holidays_microsoft_calendar/tests/test_calendar_event.py diff --git a/hr_holidays_microsoft_calendar/tests/__init__.py b/hr_holidays_microsoft_calendar/tests/__init__.py new file mode 100644 index 00000000..1d2a24b0 --- /dev/null +++ b/hr_holidays_microsoft_calendar/tests/__init__.py @@ -0,0 +1 @@ +from . import test_calendar_event diff --git a/hr_holidays_microsoft_calendar/tests/test_calendar_event.py b/hr_holidays_microsoft_calendar/tests/test_calendar_event.py new file mode 100644 index 00000000..366f88f4 --- /dev/null +++ b/hr_holidays_microsoft_calendar/tests/test_calendar_event.py @@ -0,0 +1,42 @@ +from datetime import timedelta + +from odoo import fields +from odoo.tests.common import TransactionCase + + +class TestCalendarEventMicrosoftValues(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + now = fields.Datetime.now() + attendee = cls.env["res.partner"].create({"name": "Attendee", "email": "attendee@example.com"}) + cls.event = cls.env["calendar.event"].create( + { + "name": "Time off", + "start": now, + "stop": now + timedelta(hours=1), + "partner_ids": [(6, 0, attendee.ids)], + } + ) + cls.synced_fields = cls.env["calendar.event"]._get_microsoft_synced_fields() + + def test_microsoft_values_keeps_attendees_on_a_regular_event(self): + """Outside a time off nothing changes: Outlook still gets the attendees.""" + values = self.event._microsoft_values(self.synced_fields) + self.assertTrue(values["attendees"]) + + def test_microsoft_values_drops_attendees_for_a_time_off(self): + """An approved time off reaches Outlook without attendees, so Microsoft does + not send the invitation that hr_holidays asked to suppress. + """ + event = self.event.with_context(no_mail_to_attendees=True) + + with self.subTest("the call microsoft_sync makes on create and on write"): + values = event._microsoft_values(self.synced_fields) + self.assertNotIn("attendees", values) + self.assertEqual(values["subject"], "Time off") + + with self.subTest("the call calendar.recurrence makes for a series master"): + values = event._microsoft_values(self.synced_fields, initial_values={"type": "seriesMaster"}) + self.assertNotIn("attendees", values) + self.assertEqual(values["type"], "seriesMaster")