-
-
Notifications
You must be signed in to change notification settings - Fork 667
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
Closed
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
c5c5f53
Change folder structur according OCA guidelines
andhit-r d2a9a7d
Adjusting manifest file according OCA guidelines. Make modul instllable
andhit-r ad8137a
Remove data files temporaly
andhit-r 5cebd0a
[WIP] migrate + refactor
andhit-r 5eba4cf
PEP8 adjustment. Remove wizard
andhit-r 02330f0
Add unittest
andhit-r 6eb628b
PEP8 fix
andhit-r 438de93
Add o2m infraction view on employee form
andhit-r 5049a5d
Add groups attribute to workflow button on infraction form
andhit-r 1b3e86a
Cosmetic touch on infraction form
andhit-r 5fff3c1
Add infraction search view
andhit-r b3cfa58
Add some information on README.rst
andhit-r 65fc2bc
Add translate property to some of the fields
andhit-r ac1ffd9
Fixing copyright on py files
andhit-r 0ffb355
Use same quote for manifest file dictionary
andhit-r fb32be7
Fix code format. Remove _name on hr.employee
andhit-r 72a32a0
Update readme with detail note regarding access right/record rules
andhit-r 5ad9c2c
Fix PEP8. Move demo file registration to demo section on manifest file
andhit-r 0d33311
code styling
andhit-r a2b6122
Change group category into Human Resource
andhit-r b0c6a1d
no need to parse the list
andhit-r File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,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 | ||
|
||
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. |
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 |
---|---|---|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no need to import tests... |
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 |
---|---|---|
@@ -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, | ||
} |
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 @@ | ||
<?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> |
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,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> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.