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

[WIP][8.0][hr_infraction] Migrate + Refactoring #207

Closed
wants to merge 21 commits into from
Closed
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
144 changes: 144 additions & 0 deletions hr_infraction/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
.. 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 Infraction Management
========================

This module add employee infraction management

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain a bit more the concept of "infraction management" and the scope of the module here? An "executive summary" would be nice to help people decide if the module applies to their need.

Installation
============

To install this module, you need to:

1. Clone the branch 8.0 of the repository https://github.com/OCA/hr
2. Add the path to this repository in your configuration (addons-path)
3. Update the module list
4. Go to menu *Setting -> Modules -> Local Modules*
5. Search For *HR Infraction Management*
6. Install the module

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

To configure this module, you need to:

**Configure Infraction Category**

1. Go to menu *Human Resources -> Configuration -> Infraction Category*

**Configure Infraction Warning**

1. Go to menu *Human Resources -> Configuration -> Infraction Warning*

Usage
=====

**To see your infraction data, you need to:**

1. Got to menu *Human Resources -> Human Resources -> Employee*
2. Open your employee data
3. Infraction data will be shown on *Diciplinary Information*


**To see your subordinate infraction infraction data(s), you need to:**

1. Go to menu *Human Resources -> Infraction -> Infractions*

Note:
* You have to be a member on *Infraction Management / User* to see your subordinate data


**To create infraction document, you need to:**

1. Go to menu *Human Resources -> Infraction -> Infractions*

Note:
* To create infraction document user has to belong to *Infraction Management / User* or *Infraction Management / Officer* group
* User who belong to *Infraction Management / User* can only create infraction document for his/her subordinate
* User who belong to *Infraction Management / Officer* can create infraction document for all employee

**To confirm infraction document, you need to:**

1. Go to menu *Human Resources -> Infraction -> Infractions*
2. Open an infraction document that has *draft* state
3. Make sure all entries are correct
4. Click *Confirm* button

Note:
* To confirm infraction document user has to belong to *Infraction Management / User* or *Infraction Management / Officer* group
* User who belong to *Infraction Management / User* can only confirm infraction document for his/her subordinate
* User who belong to *Infraction Management / Officer* can confirm infraction document for all employee

**To approve infraction document, you need to:**

1. Go to menu *Human Resources -> Infraction -> Infractions*
2. Open an infraction document that has *confirmed*
3. Fill (1) *Category*, and (2) *Warning*
4. Click *Approve* button

Note:
* To approve infraction document user has to belong to *Infraction Management / Officer* group

**To execute infraction document, you need to:**

1. Go to menu *Human Resources -> Infraction -> Infractions*
2. Open an infraction document that has *Approved*
3. Make sure (1) *Category*, and (2) *Warning* is correct. You still can edit both fields.
4. Click *Valid* button

Note:
* To execute infraction document user has to belong to *Infraction Management / Manager* group

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/116/8.0

Known issues / Roadmap
======================

* This module does not inted to execute any action related to infraction (e.g. demotion, transfer to other department, etc)
* Incompatible data model when migrated from 7.0
* No revision mecanism avalaible

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

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:%20
hr_infraction%0Aversion:%20
8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Credits
=======

Images
------

* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.

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

* Andhitia Rama <andhitia.r@gmail.com>

Maintainer
----------

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

This module is maintained by the OCA.

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.
27 changes: 5 additions & 22 deletions hr_infraction/__init__.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
# -*- coding:utf-8 -*-
#
#
# Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>.
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#
# -*- coding: utf-8 -*-
# © 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>
# © 2016 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import hr_infraction
from . import wizard
from . import models, tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to import tests...

50 changes: 15 additions & 35 deletions hr_infraction/__openerp__.py
Original file line number Diff line number Diff line change
@@ -1,49 +1,29 @@
# -*- coding:utf-8 -*-
#
#
# Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>.
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#
# -*- coding: utf-8 -*-
# © 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>
# © 2016 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
'name': 'Employee Infraction Management',
'version': '1.0',
'version': '8.0.1.0.0',
'category': 'Generic Modules/Human Resources',
'description': """
Warning/Disciplinary Action Management
========================================
""",
'author': "Michael Telahun Makonnen <mmakonnen@gmail.com>,Odoo Community Association (OCA)",
'author': 'OpenSynergy Indonesia,'
'Michael Telahun Makonnen <mmakonnen@gmail.com>,'
'Odoo Community Association (OCA)',
'website': 'http://miketelahun.wordpress.com',
'license': 'AGPL-3',
'depends': [
'hr',
'hr_employee_state',
'hr_security',
'hr_transfer',
],
'data': [
'security/hr_infraction_security.xml',
'security/ir.model.access.csv',
'wizard/action.xml',
'hr_infraction_data.xml',
'hr_infraction_view.xml',
'hr_infraction_workflow.xml',
'datas/hr_infraction_data.xml',
'views/hr_infraction_views.xml',
'views/hr_employee_views.xml',
],
'test': [
'demo': [
'demo/hr_infraction_demo.xml',
],
'installable': False,
'installable': True,
}
18 changes: 18 additions & 0 deletions hr_infraction/datas/hr_infraction_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">

<record model="ir.sequence.type" id="seq_type_infraction">
<field name="name">Infraction sequence</field>
<field name="code">hr.infraction</field>
</record>

<record model="ir.sequence" id="seq_infraction">
<field name="name">Default infraction sequence</field>
<field name="code">hr.infraction</field>
<field name="padding" eval="4"/>
<field name="prefix">INF/</field>
</record>

</data>
</openerp>
40 changes: 40 additions & 0 deletions hr_infraction/demo/hr_infraction_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="infraction_category_lt" model="hr.infraction.category">
<field name="name">Light</field>
<field name="code">LGT</field>
</record>

<record id="infraction_category_mo" model="hr.infraction.category">
<field name="name">Moderate</field>
<field name="code">MOD</field>
</record>

<record id="infraction_category_hv" model="hr.infraction.category">
<field name="name">Heavy</field>
<field name="code">HEA</field>
</record>

<record id="infraction_warning_vw" model="hr.infraction.warning">
<field name="name">Verbal Warning</field>
<field name="code">VW</field>
</record>

<record id="infraction_warning_wl1" model="hr.infraction.warning">
<field name="name">Warning Letter 1</field>
<field name="code">WL1</field>
</record>

<record id="infraction_warning_wl2" model="hr.infraction.warning">
<field name="name">Warning Letter 2</field>
<field name="code">WL2</field>
</record>

<record id="infraction_warning_wl3" model="hr.infraction.warning">
<field name="name">Warning Letter 3</field>
<field name="code">WL3</field>
</record>

</data>
</openerp>
Loading