-
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.
- Loading branch information
Showing
10 changed files
with
189 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 - Department Type | ||
================================ | ||
|
||
This module adds a type for Department. | ||
|
||
Installation | ||
============ | ||
|
||
To install this module, you need to: | ||
|
||
1. Clone the branch 10.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 - Department Type* | ||
6. Install the module | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Michael Viriyananda <viriyananda.michael@gmail.com> | ||
* Andhitia Rama <andhitia.r@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 2018 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,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2018 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
# pylint: disable=locally-disabled, manifest-required-author | ||
{ | ||
"name": "Human Resource - Department Type", | ||
"version": "10.0.1.0.0", | ||
"category": "Human Resource", | ||
"website": "https://opensynergy-indonesia.com", | ||
"author": "OpenSynergy Indonesia", | ||
"license": "AGPL-3", | ||
"installable": True, | ||
"depends": [ | ||
"hr" | ||
], | ||
"data": [ | ||
"security/ir.model.access.csv", | ||
"views/hr_department_type_views.xml", | ||
"views/hr_department_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,8 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2018 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import ( | ||
hr_department_type, | ||
hr_department | ||
) |
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 2018 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import models, fields | ||
|
||
|
||
class HrDepartment(models.Model): | ||
_inherit = "hr.department" | ||
|
||
department_type_id = fields.Many2one( | ||
string="Department Type", | ||
comodel_name="hr.department.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,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2018 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import models, fields | ||
|
||
|
||
class HrDepartmentType(models.Model): | ||
_name = "hr.department.type" | ||
|
||
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,3 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
access_hr_department_type_all_user,Department Type All User ,model_hr_department_type,,1,0,0,0 | ||
access_hr_department_type_employee,Department Type Employee,model_hr_department_type,base.group_user,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.
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,54 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright 2018 OpenSynergy Indonesia | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> | ||
|
||
<odoo> | ||
<record id="hr_department_type_view_tree" model="ir.ui.view"> | ||
<field name="name">Tree Hr Department Type</field> | ||
<field name="model">hr.department.type</field> | ||
<field name="arch" type="xml"> | ||
<tree> | ||
<field name="name"/> | ||
<field name="description"/> | ||
<field name="active"/> | ||
</tree> | ||
</field> | ||
</record> | ||
|
||
<record id="hr_department_type_view_form" model="ir.ui.view"> | ||
<field name="name">Form Hr Department Type</field> | ||
<field name="model">hr.department.type</field> | ||
<field name="arch" type="xml"> | ||
<form string="Department Type"> | ||
<sheet> | ||
<group col="4"> | ||
<field name="name"/> | ||
<field name="active"/> | ||
<field name="description"/> | ||
</group> | ||
</sheet> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<record id="hr_department_type_action" model="ir.actions.act_window"> | ||
<field name="name">Department Type</field> | ||
<field name="type">ir.actions.act_window</field> | ||
<field name="res_model">hr.department.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 Department Type. | ||
</p> | ||
</field> | ||
</record> | ||
|
||
<menuitem | ||
id="hr_department_type_menu" | ||
name="Department Type" | ||
parent="hr.menu_human_resources_configuration" | ||
action="hr_department_type_action" | ||
sequence="6" | ||
/> | ||
</odoo> |
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,24 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<record id="hr_department_view_tree" model="ir.ui.view"> | ||
<field name="name">Inherit HR Department Tree</field> | ||
<field name="model">hr.department</field> | ||
<field name="inherit_id" ref="hr.view_department_tree"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='manager_id']" position="after"> | ||
<field name="department_type_id" /> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
<record id="hr_department_view_form" model="ir.ui.view"> | ||
<field name="name">Inherit HR Department Form</field> | ||
<field name="model">hr.department</field> | ||
<field name="inherit_id" ref="hr.view_department_form"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='parent_id']" position="after"> | ||
<field name="department_type_id" /> | ||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |