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

[16.0] [MIG] hr_birthday_welcome_message: Migration to 16.0 #169

Open
wants to merge 14 commits into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
86 changes: 86 additions & 0 deletions hr_birthday_welcome_message/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
===========================
Hr Birthday Welcome Message
===========================

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

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

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

This addon adds a birthday message as welcome message when it is the employee's birthday.

**Table of contents**

.. contents::
:local:

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

Go to Employees > Select an employee > Private Information tab > Citizenship section > Set Date of Birth

Usage
=====

Go to Attendances and click check in. If month and day of the current date matches with the date of birth of the setted employee, a birthday wish will be displayed in the welcome message.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr-attendance/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-attendance/issues/new?body=module:%20hr_birthday_welcome_message%0Aversion:%2016.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
~~~~~~~

* CreuBlanca

Contributors
~~~~~~~~~~~~

* Alba Riera <alba.riera@creublanca.es>

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-attendance <https://github.com/OCA/hr-attendance/tree/16.0/hr_birthday_welcome_message>`_ 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_birthday_welcome_message/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
21 changes: 21 additions & 0 deletions hr_birthday_welcome_message/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2022 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Hr Birthday Welcome Message",
"summary": """
This addon adds a birthday message as welcome message
when it is the employee's birthday""",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "CreuBlanca,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/hr-attendance",
"depends": ["hr_attendance"],
"data": [],
"demo": [],
"assets": {
"web.assets_backend": [
"/hr_birthday_welcome_message/static/src/js/*.js",
],
},
}
45 changes: 45 additions & 0 deletions hr_birthday_welcome_message/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_birthday_welcome_message
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-01-10 21:35+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\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"
"X-Generator: Weblate 4.17\n"

#. module: hr_birthday_welcome_message
#: model:ir.model,name:hr_birthday_welcome_message.model_hr_employee_base
msgid "Basic Employee"
msgstr "Empleado Básico"

#. module: hr_birthday_welcome_message
#: model:ir.model.fields,field_description:hr_birthday_welcome_message.field_hr_employee_base__display_name
msgid "Display Name"
msgstr "Mostrar Nombre"

#. module: hr_birthday_welcome_message
#. openerp-web
#: code:addons/hr_birthday_welcome_message/static/src/js/greeting_message.js:0
#, python-format
msgid "Happy Birthday! <i class='fa fa-birthday-cake' /> <br/> Enjoy your day"
msgstr ""
"¡Feliz cumpleaños! <i class='fa fa-birthday-cake' /> <br/> Disfruta tu día"

#. module: hr_birthday_welcome_message
#: model:ir.model.fields,field_description:hr_birthday_welcome_message.field_hr_employee_base__id
msgid "ID"
msgstr "ID (identificación)"

#. module: hr_birthday_welcome_message
#: model:ir.model.fields,field_description:hr_birthday_welcome_message.field_hr_employee_base____last_update
msgid "Last Modified on"
msgstr "Última Modificación el"
41 changes: 41 additions & 0 deletions hr_birthday_welcome_message/i18n/hr_birthday_welcome_message.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_birthday_welcome_message
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.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: hr_birthday_welcome_message
#: model:ir.model,name:hr_birthday_welcome_message.model_hr_employee_base
msgid "Basic Employee"
msgstr ""

#. module: hr_birthday_welcome_message
#: model:ir.model.fields,field_description:hr_birthday_welcome_message.field_hr_employee_base__display_name
msgid "Display Name"
msgstr ""

#. module: hr_birthday_welcome_message
#. openerp-web
#: code:addons/hr_birthday_welcome_message/static/src/js/greeting_message.js:0
#, python-format
msgid "Happy Birthday! <i class='fa fa-birthday-cake' /> <br/> Enjoy your day"
msgstr ""

#. module: hr_birthday_welcome_message
#: model:ir.model.fields,field_description:hr_birthday_welcome_message.field_hr_employee_base__id
msgid "ID"
msgstr ""

#. module: hr_birthday_welcome_message
#: model:ir.model.fields,field_description:hr_birthday_welcome_message.field_hr_employee_base____last_update
msgid "Last Modified on"
msgstr ""
45 changes: 45 additions & 0 deletions hr_birthday_welcome_message/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_birthday_welcome_message
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-07-06 08:09+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\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 4.17\n"

#. module: hr_birthday_welcome_message
#: model:ir.model,name:hr_birthday_welcome_message.model_hr_employee_base
msgid "Basic Employee"
msgstr "Dipendente base"

#. module: hr_birthday_welcome_message
#: model:ir.model.fields,field_description:hr_birthday_welcome_message.field_hr_employee_base__display_name
msgid "Display Name"
msgstr "Nome visualizzato"

#. module: hr_birthday_welcome_message
#. openerp-web
#: code:addons/hr_birthday_welcome_message/static/src/js/greeting_message.js:0
#, python-format
msgid "Happy Birthday! <i class='fa fa-birthday-cake' /> <br/> Enjoy your day"
msgstr ""
"Buon compleanno! <i class='fa fa-birthday-cake' /> <br/> Goditi il tuo giorno"

#. module: hr_birthday_welcome_message
#: model:ir.model.fields,field_description:hr_birthday_welcome_message.field_hr_employee_base__id
msgid "ID"
msgstr "ID"

#. module: hr_birthday_welcome_message
#: model:ir.model.fields,field_description:hr_birthday_welcome_message.field_hr_employee_base____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"
1 change: 1 addition & 0 deletions hr_birthday_welcome_message/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import hr_employee
18 changes: 18 additions & 0 deletions hr_birthday_welcome_message/models/hr_employee.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2022 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class HrEmployeeBase(models.AbstractModel):
_inherit = "hr.employee"

def _attendance_action(self, next_action):
result = super()._attendance_action(next_action)
today = fields.Datetime.context_timestamp(self, fields.Datetime.now())
# We want to take the real employee in case we are using public employee,
# We are not adding the field directly in order to avoid adding it to public employee
birthday = self.env["hr.employee"].sudo().browse(self.id).birthday
if birthday and birthday.month == today.month and birthday.day == today.day:
result["action"]["is_birthday"] = True
return result
1 change: 1 addition & 0 deletions hr_birthday_welcome_message/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Go to Employees > Select an employee > Private Information tab > Citizenship section > Set Date of Birth
1 change: 1 addition & 0 deletions hr_birthday_welcome_message/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Alba Riera <alba.riera@creublanca.es>
1 change: 1 addition & 0 deletions hr_birthday_welcome_message/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This addon adds a birthday message as welcome message when it is the employee's birthday.
1 change: 1 addition & 0 deletions hr_birthday_welcome_message/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Go to Attendances and click check in. If month and day of the current date matches with the date of birth of the setted employee, a birthday wish will be displayed in the welcome message.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading