-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revision
- Loading branch information
Showing
12 changed files
with
259 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,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 | ||
|
||
============================= | ||
Human Resource - Payslip Type | ||
============================= | ||
|
||
This module adds a type for Payslip. | ||
|
||
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 *Human Resource - Payslip Type* | ||
6. Install the module | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Andhitia Rama <andhitia.r@gmail.com> | ||
* Michael Viriyananda <viriyananda.michael@gmail.com> | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://opensynergy-indonesia.com/logo.png | ||
:alt: OpenSynergy Indonesia | ||
:target: https://opensynergy-indonesia.com | ||
|
||
This module is maintained by the OpenSynergy Indonesia. |
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 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2017 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
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,22 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2017 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
{ | ||
"name": "Human Resource - Payslip Type", | ||
"version": "8.0.1.0.0", | ||
"category": "Human Resource", | ||
"website": "https://opensynergy-indonesia.com", | ||
"author": "OpenSynergy Indonesia", | ||
"license": "AGPL-3", | ||
"installable": True, | ||
"depends": [ | ||
"hr_payroll" | ||
], | ||
"data": [ | ||
"security/ir.model.access.csv", | ||
"data/hr_payslip_type_data.xml", | ||
"views/hr_payslip_type_views.xml", | ||
"views/hr_payslip_views.xml", | ||
"views/hr_payslip_run_views.xml" | ||
], | ||
} |
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,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<openerp> | ||
<data noupdate="1"> | ||
<record id="hr_payslip_type_normal" model="hr.payslip.type"> | ||
<field name="name">Normal</field> | ||
<field name="active" eval="True"/> | ||
</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,9 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2017 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import ( | ||
hr_payslip_type, | ||
hr_payslip, | ||
hr_payslip_run | ||
) |
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,22 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2017 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from openerp import models, api, fields | ||
|
||
|
||
class HrPayslip(models.Model): | ||
_inherit = "hr.payslip" | ||
|
||
@api.model | ||
def _default_payslip_type(self): | ||
payslip_type_normal = self.env.ref( | ||
"hr_payslip_type.hr_payslip_type_normal" | ||
) | ||
return payslip_type_normal.id | ||
|
||
payslip_type_id = fields.Many2one( | ||
string="Payslip Type", | ||
comodel_name="hr.payslip.type", | ||
default=_default_payslip_type | ||
) |
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,14 @@ | ||
# -*- 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" | ||
|
||
payslip_type_id = fields.Many2one( | ||
string="Payslip Type", | ||
comodel_name="hr.payslip.type" | ||
) |
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,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 HrPayslipType(models.Model): | ||
_name = "hr.payslip.type" | ||
_description = "Type of Payslip" | ||
|
||
name = fields.Char( | ||
string="Name", | ||
required=True | ||
) | ||
description = fields.Text( | ||
string="Description" | ||
) | ||
active = fields.Boolean( | ||
string="active", | ||
default=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,2 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
access_hr_payslip_type,hr.payslip.type,model_hr_payslip_type,base.group_hr_user,1,1,1,1 |
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,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<openerp> | ||
<data> | ||
<record id="hr_payslip_run_view_form" model="ir.ui.view"> | ||
<field name="name">Inherit HR Payslip Run Form</field> | ||
<field name="model">hr.payslip.run</field> | ||
<field name="inherit_id" ref="hr_payroll.hr_payslip_run_form"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='credit_note']" position="after"> | ||
<field name="payslip_type_id" /> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
<record id="hr_payslip_run_view_tree" model="ir.ui.view"> | ||
<field name="name">Inherit HR Payslip Run Tree</field> | ||
<field name="model">hr.payslip.run</field> | ||
<field name="inherit_id" ref="hr_payroll.hr_payslip_run_tree"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='credit_note']" position="after"> | ||
<field name="payslip_type_id" /> | ||
</xpath> | ||
</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,58 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright 2017 OpenSynergy Indonesia | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> | ||
|
||
<openerp> | ||
<data> | ||
|
||
<record id="hr_payslip_type_view_tree" model="ir.ui.view"> | ||
<field name="name">Tree Hr Payslip Type</field> | ||
<field name="model">hr.payslip.type</field> | ||
<field name="arch" type="xml"> | ||
<tree> | ||
<field name="name"/> | ||
<field name="description"/> | ||
<field name="active"/> | ||
</tree> | ||
</field> | ||
</record> | ||
|
||
<record id="hr_payslip_type_view_form" model="ir.ui.view"> | ||
<field name="name">Form Hr Payslip Type</field> | ||
<field name="model">hr.payslip.type</field> | ||
<field name="arch" type="xml"> | ||
<form string="Payslip Type"> | ||
<sheet> | ||
<group col="4"> | ||
<field name="name"/> | ||
<field name="active"/> | ||
<field name="description"/> | ||
</group> | ||
</sheet> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<record id="hr_payslip_type_action" model="ir.actions.act_window"> | ||
<field name="name">Payslip Type</field> | ||
<field name="type">ir.actions.act_window</field> | ||
<field name="res_model">hr.payslip.type</field> | ||
<field name="view_type">form</field> | ||
<field name="view_mode">tree,form</field> | ||
<field name="help" type="html"> | ||
<p class="oe_view_nocontent_create"> | ||
Click to add a Payslip Type. | ||
</p> | ||
</field> | ||
</record> | ||
|
||
<menuitem | ||
id="hr_payslip_type_menu" | ||
name="Payslip Type" | ||
parent="hr_payroll.payroll_configure" | ||
groups="base.group_hr_user" | ||
action="hr_payslip_type_action" | ||
/> | ||
|
||
</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,29 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<openerp> | ||
<data> | ||
|
||
<record id="hr_payslip_view_tree" model="ir.ui.view"> | ||
<field name="name">Inherit HR Payslip Tree</field> | ||
<field name="model">hr.payslip</field> | ||
<field name="inherit_id" ref="hr_payroll.view_hr_payslip_tree"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='name']" position="after"> | ||
<field name="payslip_type_id" /> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
<record id="hr_payslip_view_form" model="ir.ui.view"> | ||
<field name="name">Inherit HR Payslip Form</field> | ||
<field name="model">hr.payslip</field> | ||
<field name="inherit_id" ref="hr_payroll.view_hr_payslip_form"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='name']" position="after"> | ||
<field name="payslip_type_id" /> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
</data> | ||
</openerp> | ||
|