Skip to content

Commit

Permalink
Merge 09480ca into 30e1efa
Browse files Browse the repository at this point in the history
  • Loading branch information
mikevhe18 committed Feb 16, 2017
2 parents 30e1efa + 09480ca commit 1c44867
Show file tree
Hide file tree
Showing 18 changed files with 644 additions and 0 deletions.
74 changes: 74 additions & 0 deletions hr_payslip_import_input/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
.. 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

========================================
Import Other Inputs From Payslip Batches
========================================

This module adds wizard to import other inputs from a CSV file.


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

To install this module, you need to:

1. Clone the branch 8.0 of the repository https://github.com/open-synergy/opnsynid-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 *Import Other Inputs From Payslip Batches*
6. Install the module

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

Configure CSV File:
-------------------

The file must have 3 columns head keys, which is:

1. employee
2. code
3. amount

Usage
=====

Import Mekanism:
----------------

You need to:

1. Go to *Human Resources -> Payroll -> Payslip Batches*
2. Create/Open data
3. Click "Generate Payslip" Button
4. Open *Imported Files* tab
5. Click "Import File"
4. Add file

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

Bugs are tracked on `GitHub Issues
<https://github.com/open-synergy/opnsynid-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.

Credits
=======

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

* Michael Viriyananda <viriyananda.michael@gmail.com>

Maintainer
----------

.. image:: https://opensynergy-indonesia.com/logo.png
:alt: OpenSynergy Indonesia
:target: https://opensynergy-indonesia.org

This module is maintained by the OpenSynergy Indonesia.
6 changes: 6 additions & 0 deletions hr_payslip_import_input/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
from . import wizards
22 changes: 22 additions & 0 deletions hr_payslip_import_input/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# Copyright 2017 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Import Other Inputs From Payslip Batches",
"version": "8.0.1.0.0",
"summary": "Adds wizard to import other inputs from a CSV file",
"category": "Human Resources",
"website": "https://opensynergy-indonesia/",
"author": "OpenSynergy Indonesia",
"license": "AGPL-3",
"installable": True,
"depends": [
"hr_payroll",
"hr_employee_id"
],
"data": [
"security/ir.model.access.csv",
"views/hr_payslip_import_input.xml",
"views/hr_payslip_run_views.xml"
],
}
7 changes: 7 additions & 0 deletions hr_payslip_import_input/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright 2017 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import hr_payslip_process_line
from . import hr_payslip_imported_line
from . import hr_payroll_run
22 changes: 22 additions & 0 deletions hr_payslip_import_input/models/hr_payroll_run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# Copyright 2017 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openerp import models, fields


class HrPayslipRun(models.Model):
_inherit = "hr.payslip.run"

process_inputs = fields.One2many(
string="Process Inputs",
comodel_name="hr.payslip_run_process_input_line",
inverse_name="run_id",
readonly=True
)
imported_files = fields.One2many(
string="Imported Files",
comodel_name="hr.payslip_run_imported_input_file",
inverse_name="run_id",
readonly=True
)
19 changes: 19 additions & 0 deletions hr_payslip_import_input/models/hr_payslip_imported_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# Copytright 2017 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import models, fields


class HrPayslipRunImportedInputLine(models.Model):
_name = "hr.payslip_run_imported_input_file"
_description = "HR Payslip Run Imported Input Line"

name = fields.Char(
string="Filename",
required=True
)
run_id = fields.Many2one(
string="Payslip Run",
comodel_name="hr.payslip.run"
)
32 changes: 32 additions & 0 deletions hr_payslip_import_input/models/hr_payslip_process_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
# Copytright 2017 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import models, fields


class HrPayslipRunProcessInputLine(models.Model):
_name = "hr.payslip_run_process_input_line"
_description = "HR Payslip Run Process Input Line"

name = fields.Many2one(
string="Filename",
comodel_name="hr.payslip_run_imported_input_file"
)
employee_code = fields.Char(
string="Employee Code"
)
input_code = fields.Char(
string="Code"
)
amount = fields.Float(
string="Amount"
)
input_id = fields.Many2one(
string="Input",
comodel_name="hr.payslip.input"
)
run_id = fields.Many2one(
string="Payslip Run",
comodel_name="hr.payslip.run"
)
3 changes: 3 additions & 0 deletions hr_payslip_import_input/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_hr_payslip_run_imported_input_file,HR Payslip Run Imported Input Line,model_hr_payslip_run_imported_input_file,,1,1,1,1
access_hr_payslip_run_process_input_line,HR Payslip Run Process Input Line,model_hr_payslip_run_process_input_line,,1,1,1,1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions hr_payslip_import_input/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Michael Viriyananda
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import test_import
Binary file not shown.
5 changes: 5 additions & 0 deletions hr_payslip_import_input/tests/data/import_error_2.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
code,amount
BSC001,120000
BSC001,65000
BSC002,900000
BSC002,35000
5 changes: 5 additions & 0 deletions hr_payslip_import_input/tests/data/test_import.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
employee,code,amount
001,SALEURO,120000
002,SALEURO,65000
001,SALASIA,900000
002,SALASIA,35000
Loading

0 comments on commit 1c44867

Please sign in to comment.