Skip to content

Commit

Permalink
[MIG] hr_attendance_rfid: Migration to 11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
HviorForgeFlow committed Oct 8, 2018
1 parent f4d65c1 commit b5bc12f
Show file tree
Hide file tree
Showing 13 changed files with 531 additions and 36 deletions.
66 changes: 49 additions & 17 deletions hr_attendance_rfid/README.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
.. 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 RFID
==================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/11.0/hr_attendance_rfid
:alt: OCA/hr
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/hr-11-0/hr-11-0-hr_attendance_rfid
: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/11.0
:alt: Try me on Runbot

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

This module extends the functionality of HR Attendance in order to allow
the logging of employee attendances using an RFID based employee
attendance system.

**Table of contents**

.. contents::
:local:

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

Expand Down Expand Up @@ -37,37 +61,45 @@ Usage
attendance system. It is expected that the system will provide some form
of output of the registration event.


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

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/{project_repo}/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.
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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/hr/issues/new?body=module:%20hr_attendance_rfid%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.

Credits
=======

Authors
~~~~~~~

* Comunitea
* Eficent

Contributors
------------
~~~~~~~~~~~~

* Omar Catiñeira Saavedra <omar@comunitea.com>
* Héctor Villarreal Ortega <hector.villarreal@eficent.com>
* Jordi Ballester Alomar <jordi.ballester@eficent.com>

Maintainers
~~~~~~~~~~~

Maintainer
----------
This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.
: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.

To contribute to this module, please visit https://odoo-community.org.
This module is part of the `OCA/hr <https://github.com/OCA/hr/tree/11.0/hr_attendance_rfid>`_ 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_rfid/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# -*- coding: utf-8 -*-
from . import models
5 changes: 2 additions & 3 deletions hr_attendance_rfid/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Comunitea Servicios Tecnológicos S.L.
# Copyright 2018 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

{
'name': 'HR Attendance RFID',
'version': '10.0.1.0.0',
'version': '11.0.1.0.0',
'category': 'Human Resources',
'website': 'https://github.com/OCA/hr',
'author': 'Comunitea,'
Expand All @@ -18,8 +17,8 @@
'hr_attendance',
],
'data': [
'views/hr_employee_view.xml',
'security/hr_attendance_rfid.xml',
'security/ir.model.access.csv',
'views/hr_employee_view.xml',
],
}
1 change: 0 additions & 1 deletion hr_attendance_rfid/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# -*- coding: utf-8 -*-
from . import hr_employee
8 changes: 3 additions & 5 deletions hr_attendance_rfid/models/hr_employee.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Comunitea Servicios Tecnológicos S.L.
# Copyright 2018 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

import logging
from odoo import api, models, fields, _
from odoo import api, fields, models, _
_logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -66,7 +65,6 @@ def register_attendance(self, card_code):
res['error_message'] = msg
return res
except Exception as e:
msg = e.message
_logger.error(msg)
res['error_message'] = msg
res['error_message'] = e
_logger.error(e)
return res
12 changes: 12 additions & 0 deletions hr_attendance_rfid/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
To use this module, you need to use an external system that calls the method
'register_attendance' of the model 'hr.employee' passing as parameter the
code of the RFID card.

Developers of a compatible RFID based employee attendance system should
be familiar with the outputs of this method and implement proper calls and
management of responses.

It is advisory to create an exclusive user to perform this task. As
user doesn't need several access, it is just essential to perform the check
in/out, a group has been created. Add your attendance device user to
RFID Attendance group.
3 changes: 3 additions & 0 deletions hr_attendance_rfid/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* Omar Catiñeira Saavedra <omar@comunitea.com>
* Héctor Villarreal Ortega <hector.villarreal@eficent.com>
* Jordi Ballester Alomar <jordi.ballester@eficent.com>
3 changes: 3 additions & 0 deletions hr_attendance_rfid/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This module extends the functionality of HR Attendance in order to allow
the logging of employee attendances using an RFID based employee
attendance system.
7 changes: 7 additions & 0 deletions hr_attendance_rfid/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#. The HR employee responsible to set up new employees should go to
'Attendances -> Manage Attendances -> Employees' and register the
RFID card code of each of your employees. You can use an USB plugged
RFID reader connected to your computer for this purpose.
#. The employee should put his/her card to the RFID based employee
attendance system. It is expected that the system will provide some form
of output of the registration event.
12 changes: 5 additions & 7 deletions hr_attendance_rfid/security/hr_attendance_rfid.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="0">
<record id="group_hr_attendance_rfid" model="res.groups">
<field name="name">RFID Attendance</field>
<field name="category_id" ref="base.module_category_hr_attendance"/>
</record>
</data>
</odoo>
<record id="group_hr_attendance_rfid" model="res.groups">
<field name="name">RFID Attendance</field>
<field name="category_id" ref="base.module_category_hr_attendance"/>
</record>
</odoo>
Loading

0 comments on commit b5bc12f

Please sign in to comment.