Skip to content

Commit

Permalink
[MIG][11.0] hr_attendance_reason
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaime Arroyo committed May 2, 2019
1 parent 72ce556 commit 6584ff4
Show file tree
Hide file tree
Showing 12 changed files with 152 additions and 37 deletions.
19 changes: 8 additions & 11 deletions hr_attendance_reason/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@ HR Attendance Reason
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr-lightgray.png?logo=github
:target: https://github.com/OCA/hr/tree/10.0/hr_attendance_reason
:alt: OCA/hr
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr_attendance_reason-lightgray.png?logo=github
:target: https://github.com/OCA/hr_attendance_reason/tree/11.0/hr_attendance_reason
:alt: OCA/hr_attendance_reason
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/hr-10-0/hr-10-0-hr_attendance_reason
:target: https://translation.odoo-community.org/projects/hr_attendance_reason-11-0/hr_attendance_reason-11-0-hr_attendance_reason
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/116/10.0
:alt: Try me on Runbot

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

This module allows to define reasons why the attendance is not what expected.
Some example reasons are
Expand All @@ -48,10 +45,10 @@ Usage
Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr/issues>`_.
Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr_attendance_reason/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/hr/issues/new?body=module:%20hr_attendance_reason%0Aversion:%2010.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/hr_attendance_reason/issues/new?body=module:%20hr_attendance_reason%0Aversion:%2011.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.

Expand Down Expand Up @@ -82,6 +79,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/hr <https://github.com/OCA/hr/tree/10.0/hr_attendance_reason>`_ project on GitHub.
This module is part of the `OCA/hr_attendance_reason <https://github.com/OCA/hr_attendance_reason/tree/11.0/hr_attendance_reason>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 0 additions & 1 deletion hr_attendance_reason/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# -*- coding: utf-8 -*-
from . import models
3 changes: 1 addition & 2 deletions hr_attendance_reason/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Odoo S.A.
# Copyright 2018 Eficent Business and IT Consulting Services, S.L.
# License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html

{
'name': 'HR Attendance Reason',
'version': '10.0.1.0.0',
'version': '11.0.1.0.0',
'category': 'Human Resources',
'website': 'https://github.com/OCA/hr',
'author': 'Odoo S.A.,'
Expand Down
10 changes: 3 additions & 7 deletions hr_attendance_reason/data/hr_attendance_reason_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,21 @@
<record id="hr_act_reason_2" model="hr.attendance.reason">
<field name="name">Felt Sick</field>
<field name="code">FS</field>
<field name="action_type">sign_out</field>
<field name="action_type">check_out</field>
</record>
<record id="hr_act_reason_3" model="hr.attendance.reason">
<field name="name">Visit Customer</field>
<field name="code">VS</field>
<field name="action_type">sign_in</field>
<field name="action_type">check_in</field>
</record>
<record id="hr_act_reason_4" model="hr.attendance.reason">
<field name="name">Bad Weather</field>
<field name="code">BW</field>
</record>
<record id="hr_act_reason_5" model="hr.attendance.reason">
<field name="name">Bad Weather</field>
<field name="code">BW</field>
</record>
<record id="hr_act_reason_6" model="hr.attendance.reason">
<field name="name">Public Transport Strike</field>
<field name="code">PTS</field>
<field name="action_type">sign_in</field>
<field name="action_type">check_in</field>
</record>

</odoo>
129 changes: 129 additions & 0 deletions hr_attendance_reason/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_attendance_reason
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-02 07:56+0000\n"
"PO-Revision-Date: 2019-05-02 10:06+0200\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"Language: es\n"
"X-Generator: Poedit 2.0.6\n"

#. module: hr_attendance_reason
#: model:ir.model.fields,field_description:hr_attendance_reason.field_hr_attendance_reason_action_type
msgid "Action Type"
msgstr "Tipo de acción"

#. module: hr_attendance_reason
#: model:ir.model,name:hr_attendance_reason.model_hr_attendance
msgid "Attendance"
msgstr "Asistencias"

#. module: hr_attendance_reason
#: model:ir.model,name:hr_attendance_reason.model_hr_attendance_reason
#: model:ir.model.fields,field_description:hr_attendance_reason.field_hr_attendance_attendance_reason_ids
msgid "Attendance Reason"
msgstr "Motivo"

#. module: hr_attendance_reason
#: model:ir.actions.act_window,name:hr_attendance_reason.attendance_hr_attendance_reason
msgid "Attendance Reasons"
msgstr "Motivos"

#. module: hr_attendance_reason
#: model:ir.ui.view,arch_db:hr_attendance_reason.view_attendance_reason
msgid "Attendance reasons"
msgstr "Motivos"

#. module: hr_attendance_reason
#: model:ir.ui.menu,name:hr_attendance_reason.menu_hr_attendance_settings_redefinition
msgid "Configuration"
msgstr "Configuración"

#. module: hr_attendance_reason
#: model:ir.model.fields,field_description:hr_attendance_reason.field_hr_attendance_reason_create_uid
msgid "Created by"
msgstr "Creado por"

#. module: hr_attendance_reason
#: model:ir.model.fields,field_description:hr_attendance_reason.field_hr_attendance_reason_create_date
msgid "Created on"
msgstr "Creado el"

#. module: hr_attendance_reason
#: model:ir.ui.view,arch_db:hr_attendance_reason.edit_attendance_reason
msgid "Define attendance reason"
msgstr "Definir un motivo"

#. module: hr_attendance_reason
#: model:ir.model.fields,field_description:hr_attendance_reason.field_hr_attendance_reason_display_name
msgid "Display Name"
msgstr "Nombre a Mostrar"

#. module: hr_attendance_reason
#: model:ir.model.fields,field_description:hr_attendance_reason.field_hr_attendance_reason_id
msgid "ID"
msgstr "ID"

#. module: hr_attendance_reason
#: model:ir.model.fields,field_description:hr_attendance_reason.field_hr_attendance_reason___last_update
msgid "Last Modified on"
msgstr "Última Modificación en"

#. module: hr_attendance_reason
#: model:ir.model.fields,field_description:hr_attendance_reason.field_hr_attendance_reason_write_uid
msgid "Last Updated by"
msgstr "Última Actualización por"

#. module: hr_attendance_reason
#: model:ir.model.fields,field_description:hr_attendance_reason.field_hr_attendance_reason_write_date
msgid "Last Updated on"
msgstr "Última Actualización el"

#. module: hr_attendance_reason
#: model:ir.model.fields,help:hr_attendance_reason.field_hr_attendance_reason_action_type
msgid "Leave empty if it is independent"
msgstr "Dejar vacío si es independiente"

#. module: hr_attendance_reason
#: model:ir.model.fields,field_description:hr_attendance_reason.field_hr_attendance_reason_name
msgid "Name"
msgstr "Nombre"

#. module: hr_attendance_reason
#: model:ir.model.fields,field_description:hr_attendance_reason.field_hr_attendance_reason_code
msgid "Reason Code"
msgstr "Código del Motivo"

#. module: hr_attendance_reason
#: model:ir.ui.menu,name:hr_attendance_reason.menu_hr_attendance_reason
msgid "Reasons"
msgstr "Motivos"

#. module: hr_attendance_reason
#: selection:hr.attendance.reason,action_type:0
msgid "Check in"
msgstr "Entrada"

#. module: hr_attendance_reason
#: selection:hr.attendance.reason,action_type:0
msgid "Check out"
msgstr "Salida"

#. module: hr_attendance_reason
#: model:ir.model.fields,help:hr_attendance_reason.field_hr_attendance_attendance_reason_ids
msgid "Specifies the reason for Checking In/Checking Out in case of less or extra hours."
msgstr "Especifica el motivo de Entrada/Salida en caso de menos horas trabajadas o de horas extra."

#. module: hr_attendance_reason
#: model:ir.model.fields,help:hr_attendance_reason.field_hr_attendance_reason_name
msgid "Specifies the reason leaving soon or arriving late"
msgstr "Especifica el motivo por llegar demasiado pronto o tarde."
6 changes: 3 additions & 3 deletions hr_attendance_reason/i18n/hr_attendance_reason.pot
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,17 @@ msgstr ""

#. module: hr_attendance_reason
#: selection:hr.attendance.reason,action_type:0
msgid "Sign in"
msgid "Check in"
msgstr ""

#. module: hr_attendance_reason
#: selection:hr.attendance.reason,action_type:0
msgid "Sign out"
msgid "Check out"
msgstr ""

#. module: hr_attendance_reason
#: model:ir.model.fields,help:hr_attendance_reason.field_hr_attendance_attendance_reason_ids
msgid "Specifies the reason for Signing In/Signing Out in case of less or extra hours."
msgid "Specifies the reason for Checking In/Checking Out in case of less or extra hours."
msgstr ""

#. module: hr_attendance_reason
Expand Down
1 change: 0 additions & 1 deletion hr_attendance_reason/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# -*- coding: utf-8 -*-
from . import hr_attendance_reason
from . import hr_attendance
3 changes: 1 addition & 2 deletions hr_attendance_reason/models/hr_attendance.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Odoo S.A.
# Copyright 2018 Eficent Business and IT Consulting Services, S.L.
# License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html
Expand All @@ -12,5 +11,5 @@ class HrAttendance(models.Model):
attendance_reason_ids = fields.Many2many(
comodel_name="hr.attendance.reason",
string="Attendance Reason",
help='Specifies the reason for Signing In/Signing Out in case of '
help='Specifies the reason for checking In/checking Out in case of '
'less or extra hours.')
5 changes: 2 additions & 3 deletions hr_attendance_reason/models/hr_attendance_reason.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Odoo S.A.
# Copyright 2018 Eficent Business and IT Consulting Services, S.L.
# License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html
Expand All @@ -16,6 +15,6 @@ class HrAttendanceReason(models.Model):
required=True, index=True)
code = fields.Char('Reason Code')
action_type = fields.Selection(
[('sign_in', 'Sign in'),
('sign_out', 'Sign out')],
[('check_in', 'Check in'),
('check_out', 'Check out')],
string="Action Type", help="Leave empty if it is independent")
8 changes: 4 additions & 4 deletions hr_attendance_reason/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">HR Attendance Reason</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/hr/tree/10.0/hr_attendance_reason"><img alt="OCA/hr" src="https://img.shields.io/badge/github-OCA%2Fhr-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/hr-10-0/hr-10-0-hr_attendance_reason"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/116/10.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/hr_attendance_reason/tree/11.0/hr_attendance_reason"><img alt="OCA/hr_attendance_reason" src="https://img.shields.io/badge/github-OCA%2Fhr_attendance_reason-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/hr_attendance_reason-11-0/hr_attendance_reason-11-0-hr_attendance_reason"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a></p>
<p>This module allows to define reasons why the attendance is not what expected.
Some example reasons are</p>
<ul class="simple">
Expand Down Expand Up @@ -399,10 +399,10 @@ <h1><a class="toc-backref" href="#id1">Usage</a></h1>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/hr/issues">GitHub Issues</a>.
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/hr_attendance_reason/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/hr/issues/new?body=module:%20hr_attendance_reason%0Aversion:%2010.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/hr_attendance_reason/issues/new?body=module:%20hr_attendance_reason%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -427,7 +427,7 @@ <h2><a class="toc-backref" href="#id6">Maintainers</a></h2>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/hr/tree/10.0/hr_attendance_reason">OCA/hr</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/hr_attendance_reason/tree/11.0/hr_attendance_reason">OCA/hr_attendance_reason</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion hr_attendance_reason/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# -*- coding: utf-8 -*-
from . import test_hr_attendance_reason
3 changes: 1 addition & 2 deletions hr_attendance_reason/tests/test_hr_attendance_reason.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Odoo S.A.
# Copyright 2018 Eficent Business and IT Consulting Services, S.L.
# License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html
Expand All @@ -18,7 +17,7 @@ def setUp(self):
self.att_reason = self.att_reason_model.create(
{'name': 'Bus did not come',
'code': 'BB',
'action_type': 'sign_in'})
'action_type': 'check_in'})

def test_employee_edit(self):
att = self.att_model.create(
Expand Down

0 comments on commit 6584ff4

Please sign in to comment.