-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] hr_attendance_resume_of: New menu "Imputations resume R".
- Loading branch information
1 parent
a502938
commit bbfab85
Showing
11 changed files
with
701 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 resume of | ||
======================= | ||
|
||
* New menu "Imputations resume R". The new menu option for this object is | ||
found in Attendances - Manage attendances - Imputations resume R. To see this | ||
new menu option, the user must be in the group "Attendance-User". | ||
|
||
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. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
* Ana Juaristi <[email protected]> | ||
* Alfredo de la Fuente <[email protected]> | ||
|
||
Do not contact contributors directly about support or help with technical issues. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Copyright 2019 Alfredo de la Fuente - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2019 Alfredo de la Fuente - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
{ | ||
"name": "Hr Attendance Resume OF", | ||
"version": "12.0.1.0.0", | ||
"license": "AGPL-3", | ||
"depends": [ | ||
"hr_attendance_resume_anomaly", | ||
"resource_gesalaga", | ||
], | ||
"author": "AvanzOSC", | ||
"website": "http://www.avanzosc.es", | ||
"category": "Human Resources", | ||
"data": [ | ||
"views/hr_attendance_resume_view.xml", | ||
], | ||
"installable": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Copyright 2019 Alfredo de la Fuente - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
from datetime import date as datetype | ||
from dateutil.relativedelta import relativedelta | ||
from pytz import timezone, utc | ||
from odoo import fields | ||
|
||
str2datetime = fields.Datetime.from_string | ||
date2str = fields.Date.to_string | ||
|
||
|
||
def _convert_to_local_date(date, tz=u'UTC'): | ||
if not date: | ||
return False | ||
if not tz: | ||
tz = u'UTC' | ||
new_date = str2datetime(date) if isinstance(date, str) else date | ||
new_date = new_date.replace(tzinfo=utc) | ||
local_date = new_date.astimezone(timezone(tz)).replace(tzinfo=None) | ||
return local_date | ||
|
||
|
||
def _convert_time_to_float(date, tz=u'UTC'): | ||
if not date: | ||
return False | ||
if not tz: | ||
tz = u'UTC' | ||
local_time = _convert_to_local_date(date, tz=tz) | ||
hour = float(local_time.hour) | ||
minutes = float(local_time.minute) / 60 | ||
seconds = float(local_time.second) / 360 | ||
return (hour + minutes + seconds) | ||
|
||
|
||
def _convert_to_utc_date(date, time=0.0, tz=u'UTC'): | ||
if not date: | ||
return False | ||
if not tz: | ||
tz = u'UTC' | ||
date = date2str(date) if isinstance(date, datetype) else date | ||
date = str2datetime(date) if isinstance(date, str) else date | ||
date += relativedelta(hours=float(time)) | ||
local = timezone(tz) | ||
local_date = local.localize(date, is_dst=None) | ||
utc_date = local_date.astimezone(utc).replace(tzinfo=None) | ||
return utc_date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * hr_attendance_resume_of | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2020-03-03 13:40+0000\n" | ||
"PO-Revision-Date: 2020-03-03 13:40+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_resume_of | ||
#: model:ir.model,name:hr_attendance_resume_of.model_hr_attendance | ||
msgid "Attendance" | ||
msgstr "Asistencia" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance_resume__difference_hours_of | ||
msgid "Difference hours" | ||
msgstr "Diferencia horas" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance_resume__difference_minutes_of | ||
msgid "Difference minutes" | ||
msgstr "Diferencia minutos" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model,name:hr_attendance_resume_of.model_hr_employee | ||
msgid "Employee" | ||
msgstr "Empleado" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model,name:hr_attendance_resume_of.model_hr_attendance_resume | ||
msgid "Hours imputations resume" | ||
msgstr "Resumen horas imputaciones" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance_resume__imputable_time_of | ||
msgid "Imputable time of" | ||
msgstr "Tiempo imputable" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.actions.act_window,name:hr_attendance_resume_of.action_hr_attendance_resume_of | ||
#: model:ir.ui.menu,name:hr_attendance_resume_of.hr_attendance_resume_of_group_view | ||
msgid "Imputations resume R" | ||
msgstr "Resumen imputaciones R" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance_resume__markings_of | ||
msgid "Markings of (E=Entrance, O=Output)" | ||
msgstr "Fichajes (E=Entrada, S=Salida)" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance_resume__presence_time_of | ||
msgid "Presence time of" | ||
msgstr "Tiempo presencia" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance_resume__theoretical_time_final_of | ||
msgid "Theoretical time" | ||
msgstr "Tiempo teorico" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance__theoretical_time_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance_resume__theoretical_time_of | ||
msgid "Theoretical time of" | ||
msgstr "Tiempo teorico" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model,name:hr_attendance_resume_of.model_resource_calendar_attendance | ||
msgid "Work Detail" | ||
msgstr "Detalle del trabajo" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance_resume__work_time_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_resource_calendar_attendance__work_time_of | ||
msgid "Work time of" | ||
msgstr "Tiempo trabajo" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: code:addons/hr_attendance_resume_of/models/hr_attendance.py:230 | ||
#, python-format | ||
msgid "{}/{}:{}E{}:{}O" | ||
msgstr "" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: code:addons/hr_attendance_resume_of/models/hr_attendance.py:218 | ||
#, python-format | ||
msgid "{}:{}E{}:{}O" | ||
msgstr "" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: code:addons/hr_attendance_resume_of/models/hr_attendance.py:224 | ||
#, python-format | ||
msgid "{}{}:{}E{}:{}O" | ||
msgstr "" | ||
|
103 changes: 103 additions & 0 deletions
103
hr_attendance_resume_of/i18n/hr_attendance_resume_of.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * hr_attendance_resume_of | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2020-03-03 13:39+0000\n" | ||
"PO-Revision-Date: 2020-03-03 13:39+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_resume_of | ||
#: model:ir.model,name:hr_attendance_resume_of.model_hr_attendance | ||
msgid "Attendance" | ||
msgstr "" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance_resume__difference_hours_of | ||
msgid "Difference hours" | ||
msgstr "" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance_resume__difference_minutes_of | ||
msgid "Difference minutes" | ||
msgstr "" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model,name:hr_attendance_resume_of.model_hr_employee | ||
msgid "Employee" | ||
msgstr "" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model,name:hr_attendance_resume_of.model_hr_attendance_resume | ||
msgid "Hours imputations resume" | ||
msgstr "" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance_resume__imputable_time_of | ||
msgid "Imputable time of" | ||
msgstr "" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.actions.act_window,name:hr_attendance_resume_of.action_hr_attendance_resume_of | ||
#: model:ir.ui.menu,name:hr_attendance_resume_of.hr_attendance_resume_of_group_view | ||
msgid "Imputations resume R" | ||
msgstr "" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance_resume__markings_of | ||
msgid "Markings of (E=Entrance, O=Output)" | ||
msgstr "" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance_resume__presence_time_of | ||
msgid "Presence time of" | ||
msgstr "" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance_resume__theoretical_time_final_of | ||
msgid "Theoretical time" | ||
msgstr "" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance__theoretical_time_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance_resume__theoretical_time_of | ||
msgid "Theoretical time of" | ||
msgstr "" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model,name:hr_attendance_resume_of.model_resource_calendar_attendance | ||
msgid "Work Detail" | ||
msgstr "" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_hr_attendance_resume__work_time_of | ||
#: model:ir.model.fields,field_description:hr_attendance_resume_of.field_resource_calendar_attendance__work_time_of | ||
msgid "Work time of" | ||
msgstr "" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: code:addons/hr_attendance_resume_of/models/hr_attendance.py:230 | ||
#, python-format | ||
msgid "{}/{}:{}E{}:{}O" | ||
msgstr "" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: code:addons/hr_attendance_resume_of/models/hr_attendance.py:218 | ||
#, python-format | ||
msgid "{}:{}E{}:{}O" | ||
msgstr "" | ||
|
||
#. module: hr_attendance_resume_of | ||
#: code:addons/hr_attendance_resume_of/models/hr_attendance.py:224 | ||
#, python-format | ||
msgid "{}{}:{}E{}:{}O" | ||
msgstr "" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright 2019 Alfredo de la Fuente - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
from . import hr_attendance | ||
from . import resource_calendar_attendance | ||
from . import hr_employee |
Oops, something went wrong.