From 6ce85630c606d8bbf89024e78232f13a80c6a1f9 Mon Sep 17 00:00:00 2001 From: GuillermoNforgeflow Date: Thu, 26 Feb 2026 15:36:52 +0100 Subject: [PATCH 1/7] [ADD]mail_notify_employee_leave --- mail_notify_employee_leave/README.rst | 104 ++++ mail_notify_employee_leave/__init__.py | 1 + mail_notify_employee_leave/__manifest__.py | 14 + mail_notify_employee_leave/i18n/es.po | 65 +++ mail_notify_employee_leave/models/__init__.py | 3 + .../models/hr_employee.py | 19 + mail_notify_employee_leave/models/hr_leave.py | 15 + .../models/mail_thread.py | 84 ++++ mail_notify_employee_leave/pyproject.toml | 3 + .../readme/CONTRIBUTORS.md | 2 + .../readme/DESCRIPTION.md | 3 + mail_notify_employee_leave/readme/USAGE.md | 16 + .../static/description/index.html | 453 ++++++++++++++++++ mail_notify_employee_leave/tests/__init__.py | 1 + .../tests/test_mail_notify_employee_leave.py | 102 ++++ 15 files changed, 885 insertions(+) create mode 100644 mail_notify_employee_leave/README.rst create mode 100644 mail_notify_employee_leave/__init__.py create mode 100644 mail_notify_employee_leave/__manifest__.py create mode 100644 mail_notify_employee_leave/i18n/es.po create mode 100644 mail_notify_employee_leave/models/__init__.py create mode 100644 mail_notify_employee_leave/models/hr_employee.py create mode 100644 mail_notify_employee_leave/models/hr_leave.py create mode 100644 mail_notify_employee_leave/models/mail_thread.py create mode 100644 mail_notify_employee_leave/pyproject.toml create mode 100644 mail_notify_employee_leave/readme/CONTRIBUTORS.md create mode 100644 mail_notify_employee_leave/readme/DESCRIPTION.md create mode 100644 mail_notify_employee_leave/readme/USAGE.md create mode 100644 mail_notify_employee_leave/static/description/index.html create mode 100644 mail_notify_employee_leave/tests/__init__.py create mode 100644 mail_notify_employee_leave/tests/test_mail_notify_employee_leave.py diff --git a/mail_notify_employee_leave/README.rst b/mail_notify_employee_leave/README.rst new file mode 100644 index 000000000..26dd5f9c5 --- /dev/null +++ b/mail_notify_employee_leave/README.rst @@ -0,0 +1,104 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +========================== +Mail Notify Employee Leave +========================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:5f7b7a7481f72c60524273bb94fd697a975d3547b0b94c1f823902dfdaf99387 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmail-lightgray.png?logo=github + :target: https://github.com/OCA/mail/tree/17.0/mail_notify_employee_leave + :alt: OCA/mail +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/mail-17-0/mail-17-0-mail_notify_employee_leave + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/mail&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module automatically notifies users when they mention or assign a +colleague who is out of office. The notification includes the expected +return date of the absent user and is sent only once per day per user. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To trigger the out-of-office notification: + +1. An employee must have an approved leave covering today's date. This + sets the employee's **Is Absent** field automatically. +2. The employee must be linked to an Odoo user. +3. Send any message that includes employee's partner in the recipients, + for example, by mentioning them with ``@name``. + +When these conditions are met, the sender receives an internal note with +the expected return date of the absent employee, calculated as the first +working day after the leave ends based on the employee's working +schedule and public holidays. + +The notification is sent at most once per user per day per employee. +Sending further messages to the same absent employee on the same day +will not produce additional notifications. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* ForgeFlow + +Contributors +------------ + +- `ForgeFlow `__: + + - Guillermo Navas + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/mail `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mail_notify_employee_leave/__init__.py b/mail_notify_employee_leave/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mail_notify_employee_leave/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mail_notify_employee_leave/__manifest__.py b/mail_notify_employee_leave/__manifest__.py new file mode 100644 index 000000000..4dd36844a --- /dev/null +++ b/mail_notify_employee_leave/__manifest__.py @@ -0,0 +1,14 @@ +# Copyright 2026 ForgeFlow S.L. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + "name": "Mail Notify Employee Leave", + "summary": """ + Notifies users when they mention or assign someone who is out of office. + """, + "version": "17.0.1.0.0", + "license": "AGPL-3", + "author": "ForgeFlow, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/mail", + "depends": ["mail", "hr_holidays"], +} diff --git a/mail_notify_employee_leave/i18n/es.po b/mail_notify_employee_leave/i18n/es.po new file mode 100644 index 000000000..5e8b157af --- /dev/null +++ b/mail_notify_employee_leave/i18n/es.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_notify_employee_leave +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-03-05 10:44+0000\n" +"PO-Revision-Date: 2026-03-05 10:44+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: mail_notify_employee_leave +#. odoo-python +#: code:addons/mail_notify_employee_leave/models/mail_thread.py:0 +#, python-format +msgid "%(name)s is out of office, expected back on %(date)s." +msgstr "%(name)s estará fuera de la oficina hasta el %(date)s." + +#. module: mail_notify_employee_leave +#: model:ir.model.fields,field_description:mail_notify_employee_leave.field_hr_employee__absence_notified_date +msgid "Date of Last Absence Notification" +msgstr "Fecha de la última notificación" + +#. module: mail_notify_employee_leave +#: model:ir.model.fields,help:mail_notify_employee_leave.field_hr_employee__absence_notified_date +msgid "Date of the last notification record" +msgstr "Fecha del último registro de notificaciones" + +#. module: mail_notify_employee_leave +#: model:ir.model,name:mail_notify_employee_leave.model_mail_thread +msgid "Email Thread" +msgstr "Hilo de correo electrónico" + +#. module: mail_notify_employee_leave +#: model:ir.model,name:mail_notify_employee_leave.model_hr_employee +msgid "Employee" +msgstr "Empleado" + +#. module: mail_notify_employee_leave +#: model:ir.model,name:mail_notify_employee_leave.model_hr_leave +msgid "Time Off" +msgstr "Ausencias" + +#. module: mail_notify_employee_leave +#: model:ir.model.fields,field_description:mail_notify_employee_leave.field_hr_employee__absence_notified_user_ids +msgid "Users Notified Today" +msgstr "Usuarios notificados hoy" + +#. module: mail_notify_employee_leave +#: model:ir.model.fields,help:mail_notify_employee_leave.field_hr_employee__absence_notified_user_ids +msgid "Users who have already been notified today about this absence" +msgstr "Usuarios que ya fueron notificados hoy sobre esta ausencia" + +#. module: mail_notify_employee_leave +#. odoo-python +#: code:addons/mail_notify_employee_leave/models/mail_thread.py:0 +#, python-format +msgid "User out of office" +msgstr "Usuario fuera de la oficina" \ No newline at end of file diff --git a/mail_notify_employee_leave/models/__init__.py b/mail_notify_employee_leave/models/__init__.py new file mode 100644 index 000000000..c99dbc1e2 --- /dev/null +++ b/mail_notify_employee_leave/models/__init__.py @@ -0,0 +1,3 @@ +from . import mail_thread +from . import hr_leave +from . import hr_employee diff --git a/mail_notify_employee_leave/models/hr_employee.py b/mail_notify_employee_leave/models/hr_employee.py new file mode 100644 index 000000000..89363bd29 --- /dev/null +++ b/mail_notify_employee_leave/models/hr_employee.py @@ -0,0 +1,19 @@ +from odoo import fields, models + + +class HrEmployee(models.Model): + _inherit = "hr.employee" + + absence_notified_user_ids = fields.Many2many( + "res.users", + string="Users Notified Today", + readonly=True, + copy=False, + help="Users who have already been notified today about this absence", + ) + absence_notified_date = fields.Date( + string="Date of Last Absence Notification", + readonly=True, + copy=False, + help="Date of the last notification record", + ) diff --git a/mail_notify_employee_leave/models/hr_leave.py b/mail_notify_employee_leave/models/hr_leave.py new file mode 100644 index 000000000..781e67b89 --- /dev/null +++ b/mail_notify_employee_leave/models/hr_leave.py @@ -0,0 +1,15 @@ +from odoo import models + + +class HrLeave(models.Model): + _inherit = "hr.leave" + + def _validate_leave_request(self): + """ + Override _validate_leave_request to skip absence notifications when + approving leaves. The context flag 'skip_absence_notification' prevents + _notify_thread from sending messages, + """ + return super( + HrLeave, self.with_context(skip_absence_notification=True) + )._validate_leave_request() diff --git a/mail_notify_employee_leave/models/mail_thread.py b/mail_notify_employee_leave/models/mail_thread.py new file mode 100644 index 000000000..a60952c21 --- /dev/null +++ b/mail_notify_employee_leave/models/mail_thread.py @@ -0,0 +1,84 @@ +from datetime import timedelta + +from odoo import _, fields, models + + +class MailThread(models.AbstractModel): + _inherit = "mail.thread" + + def _notify_thread(self, message, msg_vals=False, **kwargs): + recipients_data = super()._notify_thread(message, msg_vals=msg_vals, **kwargs) + if self.env.context.get("skip_absence_notification"): + return recipients_data + + affected_partner_ids = message.partner_ids.ids + + today = fields.Date.today() + + for partner_id in affected_partner_ids: + partner = self.env["res.partner"].browse(partner_id) + employee = self.env["hr.employee"].search( + [("user_id.partner_id", "=", partner.id)], limit=1 + ) + if employee and employee.is_absent: + if employee.absence_notified_date != today: + employee.absence_notified_user_ids = [(5, 0, 0)] + employee.absence_notified_date = today + + if self.env.user not in employee.absence_notified_user_ids: + leave_date = fields.Date.from_string(employee.leave_date_to) + back_date = self.add_working_day(leave_date, employee) + body = _( + "%(name)s is out of office, expected back on %(date)s." + ) % { + "name": employee.name, + "date": fields.Date.to_string(back_date), + } + self.message_notify( + partner_ids=[self.env.user.partner_id.id], + body=body, + subject=_("User out of office"), + subtype_xmlid="mail.mt_note", + notify_author=True, + ) + employee.absence_notified_user_ids = [(4, self.env.user.id)] + + return recipients_data + + def add_working_day(self, date_obj, employee): + """ + Returns the next working day after `date_obj` considering + the employee's calendar. + """ + if not employee.resource_calendar_id: + return date_obj + timedelta(days=1) + + calendar = employee.resource_calendar_id + working_days = set(int(a.dayofweek) for a in calendar.attendance_ids) + next_day = date_obj + timedelta(days=1) + + while True: + if not working_days: + break + + if next_day.weekday() not in working_days: + next_day += timedelta(days=1) + continue + + holiday = self.env["resource.calendar.leaves"].search( + [ + ("calendar_id", "in", [calendar.id, False]), + ("resource_id", "=", False), + ("date_from", "<=", next_day), + ("date_to", ">=", next_day), + ], + limit=1, + ) + + if holiday: + next_day += timedelta(days=1) + continue + + break + + return next_day diff --git a/mail_notify_employee_leave/pyproject.toml b/mail_notify_employee_leave/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/mail_notify_employee_leave/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/mail_notify_employee_leave/readme/CONTRIBUTORS.md b/mail_notify_employee_leave/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..2f1465d02 --- /dev/null +++ b/mail_notify_employee_leave/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- [ForgeFlow](https://www.forgeflow.com): + - Guillermo Navas \<\> diff --git a/mail_notify_employee_leave/readme/DESCRIPTION.md b/mail_notify_employee_leave/readme/DESCRIPTION.md new file mode 100644 index 000000000..5e9f4bcf0 --- /dev/null +++ b/mail_notify_employee_leave/readme/DESCRIPTION.md @@ -0,0 +1,3 @@ +This module automatically notifies users when they mention or assign +a colleague who is out of office. The notification includes the expected +return date of the absent user and is sent only once per day per user. \ No newline at end of file diff --git a/mail_notify_employee_leave/readme/USAGE.md b/mail_notify_employee_leave/readme/USAGE.md new file mode 100644 index 000000000..f6a9fee86 --- /dev/null +++ b/mail_notify_employee_leave/readme/USAGE.md @@ -0,0 +1,16 @@ +To trigger the out-of-office notification: + +1. An employee must have an approved leave covering today's date. This sets + the employee's **Is Absent** field automatically. +2. The employee must be linked to an Odoo user. +3. Send any message that includes employee's partner in the recipients, + for example, by mentioning them with `@name`. + +When these conditions are met, the sender receives an internal note with the +expected return date of the absent employee, calculated as the first working +day after the leave ends based on the employee's working schedule and public +holidays. + +The notification is sent at most once per user per day per employee. Sending +further messages to the same absent employee on the same day will not produce +additional notifications. diff --git a/mail_notify_employee_leave/static/description/index.html b/mail_notify_employee_leave/static/description/index.html new file mode 100644 index 000000000..a524b601e --- /dev/null +++ b/mail_notify_employee_leave/static/description/index.html @@ -0,0 +1,453 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Mail Notify Employee Leave

+ +

Beta License: AGPL-3 OCA/mail Translate me on Weblate Try me on Runboat

+

This module automatically notifies users when they mention or assign a +colleague who is out of office. The notification includes the expected +return date of the absent user and is sent only once per day per user.

+

Table of contents

+ +
+

Usage

+

To trigger the out-of-office notification:

+
    +
  1. An employee must have an approved leave covering today’s date. This +sets the employee’s Is Absent field automatically.
  2. +
  3. The employee must be linked to an Odoo user.
  4. +
  5. Send any message that includes employee’s partner in the recipients, +for example, by mentioning them with @name.
  6. +
+

When these conditions are met, the sender receives an internal note with +the expected return date of the absent employee, calculated as the first +working day after the leave ends based on the employee’s working +schedule and public holidays.

+

The notification is sent at most once per user per day per employee. +Sending further messages to the same absent employee on the same day +will not produce additional notifications.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • ForgeFlow
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/mail project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+
+ + diff --git a/mail_notify_employee_leave/tests/__init__.py b/mail_notify_employee_leave/tests/__init__.py new file mode 100644 index 000000000..ddabba994 --- /dev/null +++ b/mail_notify_employee_leave/tests/__init__.py @@ -0,0 +1 @@ +from . import test_mail_notify_employee_leave diff --git a/mail_notify_employee_leave/tests/test_mail_notify_employee_leave.py b/mail_notify_employee_leave/tests/test_mail_notify_employee_leave.py new file mode 100644 index 000000000..662186234 --- /dev/null +++ b/mail_notify_employee_leave/tests/test_mail_notify_employee_leave.py @@ -0,0 +1,102 @@ +# Copyright 2026 ForgeFlow S.L. +# (http://www.forgeflow.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from datetime import datetime, time + +from odoo import fields +from odoo.tests.common import TransactionCase + + +class TestNotifyEmployeeLeave(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + + cls.user = cls.env["res.users"].create( + { + "name": "Test User", + "login": "test_user", + "email": "test@example.com", + "notification_type": "inbox", + } + ) + + cls.absent_user = cls.env["res.users"].create( + { + "name": "Absent User", + "login": "absent_user", + "email": "absent@example.com", + "notification_type": "inbox", + } + ) + + cls.partner = cls.absent_user.partner_id + + cls.employee = cls.env["hr.employee"].create( + { + "name": "Absent Employee", + "user_id": cls.absent_user.id, + } + ) + + cls.leave_type = cls.env["hr.leave.type"].create( + { + "name": "Test Leave", + "leave_validation_type": "no_validation", + "requires_allocation": "no", + } + ) + + cls.record = cls.env["res.partner"].create({"name": "Test Record"}) + + @classmethod + def _create_validated_leave(cls): + today = fields.Date.today() + leave = ( + cls.env["hr.leave"] + .with_context(skip_absence_notification=True) + .create( + { + "holiday_status_id": cls.leave_type.id, + "employee_id": cls.employee.id, + "date_from": datetime.combine(today, time(0, 0, 0)), + "date_to": datetime.combine(today, time(23, 59, 59)), + } + ) + ) + leave.sudo().action_validate() + return leave + + def test_no_notify_when_user_not_absent(self): + self.record.with_user(self.user).message_post( + body="Test message", partner_ids=[self.partner.id] + ) + + self.assertNotIn(self.user, self.employee.absence_notified_user_ids) + + def test_notify_when_user_absent(self): + self._create_validated_leave() + + self.record.with_user(self.user).message_post( + body="Test message", partner_ids=[self.partner.id] + ) + + self.assertIn(self.user, self.employee.absence_notified_user_ids) + self.assertEqual(self.employee.absence_notified_date, fields.Date.today()) + + def test_only_one_notification_per_day(self): + self._create_validated_leave() + + self.record.with_user(self.user).message_post( + body="Test message 1", partner_ids=[self.partner.id] + ) + + self.record.with_user(self.user).message_post( + body="Test message 2", partner_ids=[self.partner.id] + ) + + notified_users = self.employee.absence_notified_user_ids + self.assertEqual(len(notified_users), 1) + self.assertIn(self.user, notified_users) + self.assertEqual(self.employee.absence_notified_date, fields.Date.today()) From 5c400f0ee4374bd712c73bdbe301cab523afdc02 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Mon, 11 May 2026 06:36:51 +0000 Subject: [PATCH 2/7] [UPD] Update mail_notify_employee_leave.pot --- mail_notify_employee_leave/i18n/es.po | 15 ++--- .../i18n/mail_notify_employee_leave.pot | 63 +++++++++++++++++++ 2 files changed, 71 insertions(+), 7 deletions(-) create mode 100644 mail_notify_employee_leave/i18n/mail_notify_employee_leave.pot diff --git a/mail_notify_employee_leave/i18n/es.po b/mail_notify_employee_leave/i18n/es.po index 5e8b157af..954d0afbb 100644 --- a/mail_notify_employee_leave/i18n/es.po +++ b/mail_notify_employee_leave/i18n/es.po @@ -10,6 +10,7 @@ msgstr "" "PO-Revision-Date: 2026-03-05 10:44+0000\n" "Last-Translator: \n" "Language-Team: \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -47,6 +48,13 @@ msgstr "Empleado" msgid "Time Off" msgstr "Ausencias" +#. module: mail_notify_employee_leave +#. odoo-python +#: code:addons/mail_notify_employee_leave/models/mail_thread.py:0 +#, python-format +msgid "User out of office" +msgstr "Usuario fuera de la oficina" + #. module: mail_notify_employee_leave #: model:ir.model.fields,field_description:mail_notify_employee_leave.field_hr_employee__absence_notified_user_ids msgid "Users Notified Today" @@ -56,10 +64,3 @@ msgstr "Usuarios notificados hoy" #: model:ir.model.fields,help:mail_notify_employee_leave.field_hr_employee__absence_notified_user_ids msgid "Users who have already been notified today about this absence" msgstr "Usuarios que ya fueron notificados hoy sobre esta ausencia" - -#. module: mail_notify_employee_leave -#. odoo-python -#: code:addons/mail_notify_employee_leave/models/mail_thread.py:0 -#, python-format -msgid "User out of office" -msgstr "Usuario fuera de la oficina" \ No newline at end of file diff --git a/mail_notify_employee_leave/i18n/mail_notify_employee_leave.pot b/mail_notify_employee_leave/i18n/mail_notify_employee_leave.pot new file mode 100644 index 000000000..b2f2a98b5 --- /dev/null +++ b/mail_notify_employee_leave/i18n/mail_notify_employee_leave.pot @@ -0,0 +1,63 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_notify_employee_leave +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: mail_notify_employee_leave +#. odoo-python +#: code:addons/mail_notify_employee_leave/models/mail_thread.py:0 +#, python-format +msgid "%(name)s is out of office, expected back on %(date)s." +msgstr "" + +#. module: mail_notify_employee_leave +#: model:ir.model.fields,field_description:mail_notify_employee_leave.field_hr_employee__absence_notified_date +msgid "Date of Last Absence Notification" +msgstr "" + +#. module: mail_notify_employee_leave +#: model:ir.model.fields,help:mail_notify_employee_leave.field_hr_employee__absence_notified_date +msgid "Date of the last notification record" +msgstr "" + +#. module: mail_notify_employee_leave +#: model:ir.model,name:mail_notify_employee_leave.model_mail_thread +msgid "Email Thread" +msgstr "" + +#. module: mail_notify_employee_leave +#: model:ir.model,name:mail_notify_employee_leave.model_hr_employee +msgid "Employee" +msgstr "" + +#. module: mail_notify_employee_leave +#: model:ir.model,name:mail_notify_employee_leave.model_hr_leave +msgid "Time Off" +msgstr "" + +#. module: mail_notify_employee_leave +#. odoo-python +#: code:addons/mail_notify_employee_leave/models/mail_thread.py:0 +#, python-format +msgid "User out of office" +msgstr "" + +#. module: mail_notify_employee_leave +#: model:ir.model.fields,field_description:mail_notify_employee_leave.field_hr_employee__absence_notified_user_ids +msgid "Users Notified Today" +msgstr "" + +#. module: mail_notify_employee_leave +#: model:ir.model.fields,help:mail_notify_employee_leave.field_hr_employee__absence_notified_user_ids +msgid "Users who have already been notified today about this absence" +msgstr "" From 73ad70076838c0c85bc436ea6710c869a4067119 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 11 May 2026 06:39:26 +0000 Subject: [PATCH 3/7] [BOT] post-merge updates --- mail_notify_employee_leave/README.rst | 2 +- .../static/description/icon.png | Bin 0 -> 10254 bytes .../static/description/index.html | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 mail_notify_employee_leave/static/description/icon.png diff --git a/mail_notify_employee_leave/README.rst b/mail_notify_employee_leave/README.rst index 26dd5f9c5..1797f8bf6 100644 --- a/mail_notify_employee_leave/README.rst +++ b/mail_notify_employee_leave/README.rst @@ -11,7 +11,7 @@ Mail Notify Employee Leave !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:5f7b7a7481f72c60524273bb94fd697a975d3547b0b94c1f823902dfdaf99387 + !! source digest: sha256:d842cebb8364c632fefac6bb11811aceb16efe2d3aa4910c51a56368df2e9bba !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/mail_notify_employee_leave/static/description/icon.png b/mail_notify_employee_leave/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..1dcc49c24f364e9adf0afbc6fc0bac6dbecdeb11 GIT binary patch literal 10254 zcmbt)WmufcvhH9Zc!C8B?l8#UE&&o;gF7=g3=D(IAOS+K1lK^25Zv7%L4sRw_uvvF z*qyAk?>c**=lnR&y+1yw{;I3Hy6Ua2{<d0kcR+VvBo; zA_X`>;1;xAPL9rQqFxd#f5{a^zW*uaW+r3+U{|fRunu`GZhy$X z8_|Zi{zd#vIokczl8Xh*4Wi@i0+C?Rg1AB5VOEg8B>buLFCi~r5DPd2ED7QP2>^LO zKpr7+?*I1bPaFSLLEa0l2$tj*;u8Qtc=&(RUc*VK@ zjIN{I--GfO@vl+&r^eqy_BZ3dndN_PDzMc*W^!?dIsWAWU@LBjBg6^f4F6*!-hUYh zY$Xb}gF8b0%S1Ac@c%Rs()UCiEu3v6SiFE>h_!{gBb-H2{e=wB5o!YkT0>#LKZFw$ z?CuD0Gvfsb(|XbVxx0AL0%`gG2X+6|f;jiTHU9shtjoW-{2!| zMN*WuOj6elhD4zqgjNpX>F#JP{)hAbenX<+FPr>7jXM&q{|x+pbj8cU<=>Ej zWE1_%qoFVzDAZB%g@v<+1ud%<#2E~ML11jOV5pUZoXktGmzB38%te^i-3o9i$lge>z>tBcK|P2K0H9w{l#|i%$~egM)Ys{q>p<9yaE*%v2cy1wXE{AXqG1_b znfyg@Fq*e@yC)^(@$R*j^E;sky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ASiJpmv`@oR!k;&$`h8!)$uS=}d-fPddfIdMDUW@%3y1LI(1Q=e$)sz(QC*E;Nfl99YTgk+|@jl`+iF?<_D?4YqV0Zl)lO8YWC@1ZWW^mi{5ePQN<~FQ2NMG$|K{py5akJa zkezmqhN)>MGMp$7=sOo2(7ppv``dCIwf&MaQQis7S596kkiw8Do(jO?EY4iJ4Hec6 z4Hymzu`w)cI9Pbq6GPtTP)x&Lmk;FT=ZCB4>(5}c0?;2l`p&?>&<;2(P8a3lOTNP# zdEzF5qDpkRR&PZC&cS{7xD@qV;(g5X%xI?m$9QMail Notify Employee Leave !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:5f7b7a7481f72c60524273bb94fd697a975d3547b0b94c1f823902dfdaf99387 +!! source digest: sha256:d842cebb8364c632fefac6bb11811aceb16efe2d3aa4910c51a56368df2e9bba !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/mail Translate me on Weblate Try me on Runboat

This module automatically notifies users when they mention or assign a From c3a309785aeb2d5226c1444ae4c3199bbe5e3565 Mon Sep 17 00:00:00 2001 From: mymage Date: Mon, 11 May 2026 07:02:28 +0000 Subject: [PATCH 4/7] Added translation using Weblate (Italian) --- mail_notify_employee_leave/i18n/it.po | 64 +++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 mail_notify_employee_leave/i18n/it.po diff --git a/mail_notify_employee_leave/i18n/it.po b/mail_notify_employee_leave/i18n/it.po new file mode 100644 index 000000000..59eea4d01 --- /dev/null +++ b/mail_notify_employee_leave/i18n/it.po @@ -0,0 +1,64 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_notify_employee_leave +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: it\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: mail_notify_employee_leave +#. odoo-python +#: code:addons/mail_notify_employee_leave/models/mail_thread.py:0 +#, python-format +msgid "%(name)s is out of office, expected back on %(date)s." +msgstr "" + +#. module: mail_notify_employee_leave +#: model:ir.model.fields,field_description:mail_notify_employee_leave.field_hr_employee__absence_notified_date +msgid "Date of Last Absence Notification" +msgstr "" + +#. module: mail_notify_employee_leave +#: model:ir.model.fields,help:mail_notify_employee_leave.field_hr_employee__absence_notified_date +msgid "Date of the last notification record" +msgstr "" + +#. module: mail_notify_employee_leave +#: model:ir.model,name:mail_notify_employee_leave.model_mail_thread +msgid "Email Thread" +msgstr "" + +#. module: mail_notify_employee_leave +#: model:ir.model,name:mail_notify_employee_leave.model_hr_employee +msgid "Employee" +msgstr "" + +#. module: mail_notify_employee_leave +#: model:ir.model,name:mail_notify_employee_leave.model_hr_leave +msgid "Time Off" +msgstr "" + +#. module: mail_notify_employee_leave +#. odoo-python +#: code:addons/mail_notify_employee_leave/models/mail_thread.py:0 +#, python-format +msgid "User out of office" +msgstr "" + +#. module: mail_notify_employee_leave +#: model:ir.model.fields,field_description:mail_notify_employee_leave.field_hr_employee__absence_notified_user_ids +msgid "Users Notified Today" +msgstr "" + +#. module: mail_notify_employee_leave +#: model:ir.model.fields,help:mail_notify_employee_leave.field_hr_employee__absence_notified_user_ids +msgid "Users who have already been notified today about this absence" +msgstr "" From d85b7251f7b8001e9fc31844e4e9edb3e6928a15 Mon Sep 17 00:00:00 2001 From: mymage Date: Mon, 11 May 2026 15:14:29 +0000 Subject: [PATCH 5/7] Translated using Weblate (Italian) Currently translated at 100.0% (9 of 9 strings) Translation: mail-17.0/mail-17.0-mail_notify_employee_leave Translate-URL: https://translation.odoo-community.org/projects/mail-17-0/mail-17-0-mail_notify_employee_leave/it/ --- mail_notify_employee_leave/i18n/it.po | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/mail_notify_employee_leave/i18n/it.po b/mail_notify_employee_leave/i18n/it.po index 59eea4d01..f5bf1dfd3 100644 --- a/mail_notify_employee_leave/i18n/it.po +++ b/mail_notify_employee_leave/i18n/it.po @@ -6,59 +6,61 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 17.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2026-05-11 17:45+0000\n" +"Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\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" +"X-Generator: Weblate 5.15.2\n" #. module: mail_notify_employee_leave #. odoo-python #: code:addons/mail_notify_employee_leave/models/mail_thread.py:0 #, python-format msgid "%(name)s is out of office, expected back on %(date)s." -msgstr "" +msgstr "%(name)s è fuori dall'ufficio, previsto rientro il %(date)s." #. module: mail_notify_employee_leave #: model:ir.model.fields,field_description:mail_notify_employee_leave.field_hr_employee__absence_notified_date msgid "Date of Last Absence Notification" -msgstr "" +msgstr "Data ultima notifica assenza" #. module: mail_notify_employee_leave #: model:ir.model.fields,help:mail_notify_employee_leave.field_hr_employee__absence_notified_date msgid "Date of the last notification record" -msgstr "" +msgstr "Data dell'ultimo record di notifica" #. module: mail_notify_employee_leave #: model:ir.model,name:mail_notify_employee_leave.model_mail_thread msgid "Email Thread" -msgstr "" +msgstr "Discussione e-mail" #. module: mail_notify_employee_leave #: model:ir.model,name:mail_notify_employee_leave.model_hr_employee msgid "Employee" -msgstr "" +msgstr "Dipendente" #. module: mail_notify_employee_leave #: model:ir.model,name:mail_notify_employee_leave.model_hr_leave msgid "Time Off" -msgstr "" +msgstr "Ferie" #. module: mail_notify_employee_leave #. odoo-python #: code:addons/mail_notify_employee_leave/models/mail_thread.py:0 #, python-format msgid "User out of office" -msgstr "" +msgstr "Utente fuori ufficio" #. module: mail_notify_employee_leave #: model:ir.model.fields,field_description:mail_notify_employee_leave.field_hr_employee__absence_notified_user_ids msgid "Users Notified Today" -msgstr "" +msgstr "Utente avvisato oggi" #. module: mail_notify_employee_leave #: model:ir.model.fields,help:mail_notify_employee_leave.field_hr_employee__absence_notified_user_ids msgid "Users who have already been notified today about this absence" -msgstr "" +msgstr "Utenti che sono già stati informati oggi di questa assenza" From 560bf0b33ff7d18ab7e57c04c1808eb60a83de25 Mon Sep 17 00:00:00 2001 From: GuillermoNforgeflow Date: Tue, 7 Jul 2026 08:18:16 +0200 Subject: [PATCH 6/7] [MIG] mail_notify_employee_leave: Migration to 19.0 --- mail_notify_employee_leave/README.rst | 10 +-- mail_notify_employee_leave/__manifest__.py | 2 +- .../models/mail_thread.py | 64 ++++--------------- .../static/description/index.html | 6 +- .../tests/test_mail_notify_employee_leave.py | 15 +++-- 5 files changed, 31 insertions(+), 66 deletions(-) diff --git a/mail_notify_employee_leave/README.rst b/mail_notify_employee_leave/README.rst index 1797f8bf6..7acc97a56 100644 --- a/mail_notify_employee_leave/README.rst +++ b/mail_notify_employee_leave/README.rst @@ -21,13 +21,13 @@ Mail Notify Employee Leave :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmail-lightgray.png?logo=github - :target: https://github.com/OCA/mail/tree/17.0/mail_notify_employee_leave + :target: https://github.com/OCA/mail/tree/19.0/mail_notify_employee_leave :alt: OCA/mail .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/mail-17-0/mail-17-0-mail_notify_employee_leave + :target: https://translation.odoo-community.org/projects/mail-19-0/mail-19-0-mail_notify_employee_leave :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/mail&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/mail&target_branch=19.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -67,7 +67,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -99,6 +99,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/mail `_ project on GitHub. +This module is part of the `OCA/mail `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mail_notify_employee_leave/__manifest__.py b/mail_notify_employee_leave/__manifest__.py index 4dd36844a..7a51649de 100644 --- a/mail_notify_employee_leave/__manifest__.py +++ b/mail_notify_employee_leave/__manifest__.py @@ -6,7 +6,7 @@ "summary": """ Notifies users when they mention or assign someone who is out of office. """, - "version": "17.0.1.0.0", + "version": "19.0.1.0.0", "license": "AGPL-3", "author": "ForgeFlow, Odoo Community Association (OCA)", "website": "https://github.com/OCA/mail", diff --git a/mail_notify_employee_leave/models/mail_thread.py b/mail_notify_employee_leave/models/mail_thread.py index a60952c21..0729166a9 100644 --- a/mail_notify_employee_leave/models/mail_thread.py +++ b/mail_notify_employee_leave/models/mail_thread.py @@ -1,6 +1,4 @@ -from datetime import timedelta - -from odoo import _, fields, models +from odoo import fields, models class MailThread(models.AbstractModel): @@ -17,8 +15,10 @@ def _notify_thread(self, message, msg_vals=False, **kwargs): for partner_id in affected_partner_ids: partner = self.env["res.partner"].browse(partner_id) - employee = self.env["hr.employee"].search( - [("user_id.partner_id", "=", partner.id)], limit=1 + employee = ( + self.env["hr.employee"] + .sudo() + .search([("user_id.partner_id", "=", partner.id)], limit=1) ) if employee and employee.is_absent: if employee.absence_notified_date != today: @@ -26,59 +26,19 @@ def _notify_thread(self, message, msg_vals=False, **kwargs): employee.absence_notified_date = today if self.env.user not in employee.absence_notified_user_ids: - leave_date = fields.Date.from_string(employee.leave_date_to) - back_date = self.add_working_day(leave_date, employee) - body = _( - "%(name)s is out of office, expected back on %(date)s." - ) % { - "name": employee.name, - "date": fields.Date.to_string(back_date), - } + back_date = employee.leave_date_to + body = self.env._( + "%(name)s is out of office, expected back on %(date)s.", + name=employee.name, + date=fields.Date.to_string(back_date), + ) self.message_notify( partner_ids=[self.env.user.partner_id.id], body=body, - subject=_("User out of office"), + subject=self.env._("User out of office"), subtype_xmlid="mail.mt_note", notify_author=True, ) employee.absence_notified_user_ids = [(4, self.env.user.id)] return recipients_data - - def add_working_day(self, date_obj, employee): - """ - Returns the next working day after `date_obj` considering - the employee's calendar. - """ - if not employee.resource_calendar_id: - return date_obj + timedelta(days=1) - - calendar = employee.resource_calendar_id - working_days = set(int(a.dayofweek) for a in calendar.attendance_ids) - next_day = date_obj + timedelta(days=1) - - while True: - if not working_days: - break - - if next_day.weekday() not in working_days: - next_day += timedelta(days=1) - continue - - holiday = self.env["resource.calendar.leaves"].search( - [ - ("calendar_id", "in", [calendar.id, False]), - ("resource_id", "=", False), - ("date_from", "<=", next_day), - ("date_to", ">=", next_day), - ], - limit=1, - ) - - if holiday: - next_day += timedelta(days=1) - continue - - break - - return next_day diff --git a/mail_notify_employee_leave/static/description/index.html b/mail_notify_employee_leave/static/description/index.html index a1cfd8dad..709d24c33 100644 --- a/mail_notify_employee_leave/static/description/index.html +++ b/mail_notify_employee_leave/static/description/index.html @@ -374,7 +374,7 @@

Mail Notify Employee Leave

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:d842cebb8364c632fefac6bb11811aceb16efe2d3aa4910c51a56368df2e9bba !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/mail Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/mail Translate me on Weblate Try me on Runboat

This module automatically notifies users when they mention or assign a colleague who is out of office. The notification includes the expected return date of the absent user and is sent only once per day per user.

@@ -414,7 +414,7 @@

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -443,7 +443,7 @@

Maintainers

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/mail project on GitHub.

+

This module is part of the OCA/mail project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/mail_notify_employee_leave/tests/test_mail_notify_employee_leave.py b/mail_notify_employee_leave/tests/test_mail_notify_employee_leave.py index 662186234..5e0decd5a 100644 --- a/mail_notify_employee_leave/tests/test_mail_notify_employee_leave.py +++ b/mail_notify_employee_leave/tests/test_mail_notify_employee_leave.py @@ -2,7 +2,7 @@ # (http://www.forgeflow.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from datetime import datetime, time +from datetime import timedelta from odoo import fields from odoo.tests.common import TransactionCase @@ -13,12 +13,16 @@ class TestNotifyEmployeeLeave(TransactionCase): def setUpClass(cls): super().setUpClass() + internal_group = cls.env.ref("base.group_user") + partner_manager_group = cls.env.ref("base.group_partner_manager") + cls.user = cls.env["res.users"].create( { "name": "Test User", "login": "test_user", "email": "test@example.com", "notification_type": "inbox", + "group_ids": [(4, internal_group.id), (4, partner_manager_group.id)], } ) @@ -28,6 +32,7 @@ def setUpClass(cls): "login": "absent_user", "email": "absent@example.com", "notification_type": "inbox", + "group_ids": [(4, internal_group.id)], } ) @@ -44,7 +49,7 @@ def setUpClass(cls): { "name": "Test Leave", "leave_validation_type": "no_validation", - "requires_allocation": "no", + "requires_allocation": False, } ) @@ -60,12 +65,12 @@ def _create_validated_leave(cls): { "holiday_status_id": cls.leave_type.id, "employee_id": cls.employee.id, - "date_from": datetime.combine(today, time(0, 0, 0)), - "date_to": datetime.combine(today, time(23, 59, 59)), + "request_date_from": today - timedelta(days=1), + "request_date_to": today + timedelta(days=1), } ) ) - leave.sudo().action_validate() + leave.sudo()._action_validate() return leave def test_no_notify_when_user_not_absent(self): From 51691af06a32651ef0266fbe33bcc8ba0f0d8131 Mon Sep 17 00:00:00 2001 From: GuillermoNforgeflow Date: Tue, 7 Jul 2026 10:24:22 +0200 Subject: [PATCH 7/7] [FIX] mail_post_defer: don't defer during tests unless explicitly requested --- mail_post_defer/models/mail_thread.py | 4 ++++ mail_post_defer/tests/test_mail.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/mail_post_defer/models/mail_thread.py b/mail_post_defer/models/mail_thread.py index 40ba0da2a..6da39f28b 100644 --- a/mail_post_defer/models/mail_thread.py +++ b/mail_post_defer/models/mail_thread.py @@ -4,6 +4,7 @@ from datetime import timedelta from odoo import fields, models +from odoo.tools import config class MailThread(models.AbstractModel): @@ -11,6 +12,9 @@ class MailThread(models.AbstractModel): def _notify_thread(self, message, msg_vals=False, **kwargs): """Defer emails by default.""" + # During tests, don't defer unless a test explicitly opts in + if config["test_enable"] and not self.env.context.get("test_mail_post_defer"): + return super()._notify_thread(message, msg_vals=msg_vals, **kwargs) # Don't defer automatically if forcing send _self = self if "mail_defer_seconds" not in _self.env.context: diff --git a/mail_post_defer/tests/test_mail.py b/mail_post_defer/tests/test_mail.py index 7122b3ac4..95a65f38a 100644 --- a/mail_post_defer/tests/test_mail.py +++ b/mail_post_defer/tests/test_mail.py @@ -17,6 +17,8 @@ class MailPostDeferCommon(MailCommon): def setUpClass(cls): super().setUpClass() cls.classPatch(cls.cr, "now", datetime.now) + # Opt in to deferring during tests + cls.env = cls.env(context=dict(cls.env.context, test_mail_post_defer=True)) cls._create_portal_user() # Notify employee by email cls.user_employee.notification_type = "email"