Skip to content

Commit

Permalink
[16.0][ADD] hr_attendance_reason_rest: In Attendance Reason new field…
Browse files Browse the repository at this point in the history
…: "Is Rest".
  • Loading branch information
alfredoavanzosc committed Feb 25, 2025
1 parent 75b86f0 commit 0819d3a
Show file tree
Hide file tree
Showing 10 changed files with 142 additions and 0 deletions.
29 changes: 29 additions & 0 deletions hr_attendance_reason_rest/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

====================
Hr attendance reason
====================

* In Attendance Reason new field: "Is Rest".


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

Bugs are tracked on `GitHub Issues
<https://github.com/avanzosc/hr-addons/issues>`_. In case of trouble,
please check there if your issue has already been reported. If you spotted
it first, help us smash it by providing detailed and welcomed feedback.

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

Credits
=======

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

* Ana Juaristi <anajuaristi@avanzosc.es>
* Alfredo de la Fuente <alfredodelafuente@avanzosc.es>
1 change: 1 addition & 0 deletions hr_attendance_reason_rest/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
15 changes: 15 additions & 0 deletions hr_attendance_reason_rest/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2025 Alfredo de la Fuente - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Hr Attendance Reason Rest",
"version": "16.0.1.0.0",
"category": "Human Resources",
"license": "AGPL-3",
"author": "AvanzOSC",
"website": "https://github.com/avanzosc/hr-addons",
"depends": ["hr_attendance_reason"],
"data": [
"views/hr_attendance_reason_views.xml",
],
"installable": True,
}
26 changes: 26 additions & 0 deletions hr_attendance_reason_rest/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_attendance_reason_rest
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-24 12:42+0000\n"
"PO-Revision-Date: 2025-02-24 12:42+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: hr_attendance_reason_rest
#: model:ir.model,name:hr_attendance_reason_rest.model_hr_attendance_reason
msgid "Attendance Reason"
msgstr "Motivo de alerta de asistencia"

#. module: hr_attendance_reason_rest
#: model:ir.model.fields,field_description:hr_attendance_reason_rest.field_hr_attendance_reason__is_rest
msgid "Is Rest"
msgstr "Es descanso"
26 changes: 26 additions & 0 deletions hr_attendance_reason_rest/i18n/hr_attendance_reason_rest.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_attendance_reason_rest
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-24 12:42+0000\n"
"PO-Revision-Date: 2025-02-24 12:42+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: hr_attendance_reason_rest
#: model:ir.model,name:hr_attendance_reason_rest.model_hr_attendance_reason
msgid "Attendance Reason"
msgstr ""

#. module: hr_attendance_reason_rest
#: model:ir.model.fields,field_description:hr_attendance_reason_rest.field_hr_attendance_reason__is_rest
msgid "Is Rest"
msgstr ""
1 change: 1 addition & 0 deletions hr_attendance_reason_rest/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import hr_attendance_reason
9 changes: 9 additions & 0 deletions hr_attendance_reason_rest/models/hr_attendance_reason.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright 2025 Alfredo de la Fuente - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models


class HrAttendanceReason(models.Model):
_inherit = "hr.attendance.reason"

is_rest = fields.Boolean(string="Is Rest", default=False)
28 changes: 28 additions & 0 deletions hr_attendance_reason_rest/views/hr_attendance_reason_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="hr_attendance_reason_view_form" model="ir.ui.view">
<field name="model">hr.attendance.reason</field>
<field
name="inherit_id"
ref="hr_attendance_reason.hr_attendance_reason_view_form"
/>
<field name="arch" type="xml">
<field name="company_id" position="before">
<field name="is_rest" />
</field>
</field>
</record>

<record id="hr_attendance_reason_view_tree" model="ir.ui.view">
<field name="model">hr.attendance.reason</field>
<field
name="inherit_id"
ref="hr_attendance_reason.hr_attendance_reason_view_tree"
/>
<field name="arch" type="xml">
<field name="company_id" position="before">
<field name="is_rest" />
</field>
</field>
</record>
</odoo>
6 changes: 6 additions & 0 deletions setup/hr_attendance_reason_rest/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit 0819d3a

Please sign in to comment.