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

[18.0][MIG] hr_employee_birthday_mail: Migration to 18.0 #1444

Open
wants to merge 22 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b2c16bb
[ADD] hr_employee_birthday_mail: birthday message and coworkers alert
JoanSForgeFlow Jun 6, 2023
0c19824
[UPD] Update hr_employee_birthday_mail.pot
Jun 6, 2023
abcb3f8
[UPD] README.rst
OCA-git-bot Jun 6, 2023
faa9a84
[ADD] icon.png
OCA-git-bot Jun 6, 2023
81086a1
Added translation using Weblate (Italian)
mymage Jun 12, 2023
ad8dcd5
Translated using Weblate (Italian)
mymage Jun 12, 2023
b295ffd
Added translation using Weblate (Spanish)
Ivorra78 Aug 3, 2023
c0b91db
Translated using Weblate (Spanish)
Ivorra78 Aug 4, 2023
4502774
[UPD] README.rst
OCA-git-bot Sep 3, 2023
00be3cd
Update translation files
weblate Oct 9, 2023
bcbb7d8
Added translation using Weblate (French)
gva-acsone Feb 22, 2024
961c53f
Added translation using Weblate (French (France) (fr_FR))
gva-acsone Feb 22, 2024
cf0b86d
Translated using Weblate (French)
gva-acsone Feb 22, 2024
6d6b07f
[FIX] hr_employee_birthay_mail: res_users configurable
JoanSForgeFlow Jul 10, 2023
582ab95
[UPD] Update hr_employee_birthday_mail.pot
Dec 10, 2024
5641d73
[BOT] post-merge updates
OCA-git-bot Dec 10, 2024
b9a7da0
Update translation files
weblate Dec 10, 2024
5665bd4
Translated using Weblate (Italian)
mymage Dec 11, 2024
0760b03
[IMP] hr_employee_birthday_mail: pre-commit auto fixes
ArnauCForgeFlow Jan 29, 2025
6fc4593
[MIG] hr_employee_birthday_mail: Migration to 17.0
ArnauCForgeFlow Jan 29, 2025
c4c869c
[IMP] hr_employee_birthday_mail: pre-commit auto fixes
ArnauCForgeFlow Feb 24, 2025
7c5171a
[MIG] hr_employee_birthday_mail: Migration to 18.0
ArnauCForgeFlow Feb 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 107 additions & 0 deletions hr_employee_birthday_mail/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
=========================
HR Employee Birthday Mail
=========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d36cbb615ef09bd9ba7f4e776801c06e79d00bad7726fb0a12af4c34afe24834
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/licence-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%2Fhr-lightgray.png?logo=github
:target: https://github.com/OCA/hr/tree/18.0/hr_employee_birthday_mail
:alt: OCA/hr
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/hr-18-0/hr-18-0-hr_employee_birthday_mail
: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/hr&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

The module automates the process of sending out personalized birthday
emails to the celebrating employee while also informing their coworkers
about the special day. It encourages a culture of mutual respect,
camaraderie, and celebration within the team.

In essence, the 'hr_employee_birthday_mail' module ensures that every
birthday is acknowledged and celebrated, thereby promoting a positive
and unified work environment.

**Table of contents**

.. contents::
:local:

Configuration
=============

Steps to Configure:

1. Go to My Profile > Private Information.

2. Add your date of birth.

3. Check the option Allow Birthday Wishes if you want colleagues to be
notified on your birthday.

4. Check the option Notify Others' Birthday if you want to receive
notifications about your colleagues' birthdays.

5. Save the changes.

Usage
=====

Just install and configure in the scheduled action the hour you want to
run the check daily.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr/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 <https://github.com/OCA/hr/issues/new?body=module:%20hr_employee_birthday_mail%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* ForgeFlow

Contributors
------------

- Joan Sisquella <[email protected]>
- Mateu Griful <[email protected]>

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/hr <https://github.com/OCA/hr/tree/18.0/hr_employee_birthday_mail>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions hr_employee_birthday_mail/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
22 changes: 22 additions & 0 deletions hr_employee_birthday_mail/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2023 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "HR Employee Birthday Mail",
"summary": """
Automating birthday mail messages and fostering for a positive work environment.
""",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/hr",
"depends": ["hr", "mail"],
"data": [
"data/data.xml",
"data/ir_cron.xml",
"views/hr_employee_views.xml",
"views/res_user_views.xml",
],
"installable": True,
"application": False,
"auto_install": False,
}
177 changes: 177 additions & 0 deletions hr_employee_birthday_mail/data/data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
<odoo noupdate="1">
<record id="email_template_birthday_1" model="mail.template">
<field name="name">Birthday Email 1</field>
<field name="model_id" ref="hr.model_hr_employee" />
<field name="subject">🎂 Happy Birthday, {{ object.name }}!</field>
<field name="email_from">{{ object.company_id.email }}</field>
<field name="email_to">{{ object.work_email }}</field>
<field name="body_html" type="html">
<div style="background-color:#f2f3f5; padding:20px;">
<h2 style="color:#4267b2; text-align:center;">Happy Birthday, <t
t-out="object.name"
/>!</h2>
<p
style="font-size:16px; text-align:center;"
>Another trip around the sun, and you don't look a day older! We wish you a fantastic day full of joy and surprises. May this year bring you closer to your dreams and bless you with abundance and joy. 🎉</p>
<p
style="font-size:16px; text-align:center;"
>Remember, you're not getting older, you're gaining more experience. And with each passing year, you become a more valuable member of our team. Here's to an amazing birthday and a year filled with adventure! 🥳</p>
<p
style="font-size:16px; text-align:center;"
>Cheers to you on your special day, <t t-out="object.name" />!</p>
</div>
</field>
</record>

<record id="email_template_birthday_2" model="mail.template">
<field name="name">Birthday Email 2</field>
<field name="model_id" ref="hr.model_hr_employee" />
<field name="subject">🎂 Celebrating You Today, {{ object.name }}!</field>
<field name="email_from">{{ object.company_id.email }}</field>
<field name="email_to">{{ object.work_email }}</field>
<field name="body_html" type="html">
<div style="background-color:#f2f3f5; padding:20px;">
<h2 style="color:#4267b2; text-align:center;">🎉 Let's Celebrate, <t
t-out="object.name"
/>! 🎉</h2>
<p
style="font-size:16px; text-align:center;"
>Today, we celebrate not just any birthday, but YOUR birthday: a day when a truly exceptional person came into this world.</p>
<p
style="font-size:16px; text-align:center;"
>Age is just a number, and the wrinkles are merely where the smiles have been. Remember, you're not getting older, you're just becoming a classic!</p>
<p
style="font-size:16px; text-align:center;"
>Your birthday is a special milestone on this journey of life, and we're thrilled to share it with you. Today is about celebrating all that you are and all that you will be.</p>
<p style="font-size:16px; text-align:center;">So here's to you, <t
t-out="object.name"
/>! Wishing you an abundance of fun, joy and cake on your special day. Have an unforgettable birthday! 🥳🎈</p>
</div>
</field>
</record>

<record id="email_template_birthday_3" model="mail.template">
<field name="name">Birthday Email 3</field>
<field name="model_id" ref="hr.model_hr_employee" />
<field name="subject">🎂 {{ object.name }}!, It's Your Day!</field>
<field name="email_from">{{ object.company_id.email }}</field>
<field name="email_to">{{ object.work_email }}</field>
<field name="body_html" type="html">
<div style="background-color:#f2f3f5; padding:20px;">
<h2 style="color:#4267b2; text-align:center;">🎂 Hey there, <t
t-out="object.name"
/>! It's Your Special Day! 🎂</h2>
<p
style="font-size:16px; text-align:center;"
>Birthdays are nature's way of telling us to eat more cake and ice cream. And, as it happens to be your birthday, we feel you deserve to have as much as you want!</p>
<p
style="font-size:16px; text-align:center;"
>Today, we're not just celebrating your birthday. We're celebrating you: the invaluable part of our team, the cheer-bringer, the problem-solver, the ray of sunshine in the office.</p>
<p
style="font-size:16px; text-align:center;"
>On this day, we hope you enjoy all the wonderful things life has to offer and spend it doing what you love the most. Remember, today is about you and only you. Make sure you enjoy it to the fullest!</p>
<p
style="font-size:16px; text-align:center;"
>So sit back, relax, and let the good vibes roll. Happy Birthday, <t
t-out="object.name"
/>! We hope this day brings you nothing but joy and happiness. 🥳🎉</p>
</div>
</field>
</record>

<record id="email_template_coworkers_1" model="mail.template">
<field name="name">Coworker's Birthday Email 1</field>
<field name="model_id" ref="hr.model_hr_employee" />
<field
name="subject"
>🎉 Birthday Alert: It's {{ ctx['birthday_employee'] }}'s special day!</field>
<field name="email_from">{{ object.company_id.email }}</field>
<field name="email_to">{{ object.work_email }}</field>
<field name="body_html" type="html">
<div style="background-color:#f2f3f5; padding:20px;">
<h2 style="color:#4267b2; text-align:center;">🎉 Birthday Alert 🎉</h2>
<p style="font-size:16px; text-align:center;">Hi <t
t-out="object.name"
/>,</p>
<p
style="font-size:16px; text-align:center;"
>Something feels different today, right? There's an extra sparkle in the air and a spring in our steps. Wondering why?</p>
<p style="font-size:16px; text-align:center;">It's because it's <b>
<t t-out="ctx['birthday_employee']" />
</b>'s birthday! 🎂</p>
<p
style="font-size:16px; text-align:center;"
>So, let's crank up the joy and celebration in the office today. Don't forget to wish them a happy birthday and make this day even more special for them! 🎈🎁</p>
</div>
</field>
</record>

<record id="email_template_coworkers_2" model="mail.template">
<field name="name">Coworker's Birthday Email 2</field>
<field name="model_id" ref="hr.model_hr_employee" />
<field name="subject">🎉 Cake Alert: {{ ctx['birthday_employee']}}</field>
<field name="email_from">{{ object.company_id.email }}</field>
<field name="email_to">{{ object.work_email }}</field>
<field name="body_html" type="html">
<div style="background-color:#f2f3f5; padding:20px;">
<h2 style="color:#4267b2; text-align:center;">🎉 Birthday Alert: <t
t-out="ctx['birthday_employee']"
/> is another year wiser! 🎉</h2>
<p style="font-size:16px; text-align:center;">Hey there, <t
t-out="object.name"
/>,</p>
<p
style="font-size:16px; text-align:center;"
>Guess what? We're fortunate enough to have a birthday in our midst today! Yes, it's <b
><t t-out="ctx['birthday_employee']" />'s</b> big day!</p>
<p
style="font-size:16px; text-align:center;"
>Take a moment, when you can, to send them your good wishes and contribute to a positive atmosphere today. Remember, even a simple 'Happy Birthday' can make someone's day!</p>
<p style="font-size:16px; text-align:center;">Let's all help make <t
t-out="ctx['birthday_employee']"
/> feel appreciated and valued on their special day! 🎈🎁</p>
<p
style="font-size:16px; text-align:center;"
>Thank you for your continuous effort in making our workplace a supportive and friendly environment!</p>
</div>
</field>
</record>

<record id="email_template_coworkers_3" model="mail.template">
<field name="name">Coworker's Birthday Email 3</field>
<field name="model_id" ref="hr.model_hr_employee" />
<field
name="subject"
>🎉 Time to Celebrate: {{ ctx['birthday_employee'] }}'s Birthday!</field>
<field name="email_from">{{ object.company_id.email }}</field>
<field name="email_to">{{ object.work_email }}</field>
<field name="body_html" type="html">
<div style="background-color:#f2f3f5; padding:20px;">
<h2
style="color:#4267b2; text-align:center;"
>🎂 It's Time to Celebrate: <t
t-out="ctx['birthday_employee']"
/>'s Birthday!</h2>
<p style="font-size:16px; text-align:center;">Hello, <t
t-out="object.name"
/>!</p>
<p
style="font-size:16px; text-align:center;"
>Today, we're celebrating the birthday of a valued team member, <b>
<t t-out="ctx['birthday_employee']" />
</b>. </p>
<p
style="font-size:16px; text-align:center;"
>This day is a special one, and we encourage you to reach out and wish them a 'Happy Birthday'. A small gesture can make a big difference! </p>
<p
style="font-size:16px; text-align:center;"
>Let's make this day memorable for <t
t-out="ctx['birthday_employee']"
/>! 🎉🎁</p>
<p
style="font-size:16px; text-align:center;"
>Remember, our team is our greatest strength. Thanks for contributing to this wonderful work environment!</p>
</div>
</field>
</record>
</odoo>
13 changes: 13 additions & 0 deletions hr_employee_birthday_mail/data/ir_cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<odoo noupdate="1">
<record id="ir_cron_check_employee_birthdays" model="ir.cron">
<field name="name">Check Employee Birthdays</field>
<field name="model_id" ref="hr.model_hr_employee" />
<field name="state">code</field>
<field name="code">model._check_birthdays()</field>
<field name="active" eval="True" />
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="priority">5</field>
</record>
</odoo>
Loading