Skip to content

Commit

Permalink
Merge 848790a into 69b0d20
Browse files Browse the repository at this point in the history
  • Loading branch information
andhit-r committed Jan 29, 2018
2 parents 69b0d20 + 848790a commit c3e93be
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 0 deletions.
39 changes: 39 additions & 0 deletions hr_employee_training_job_family_modelling/README.rst
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

====================================================
Employee Training - Job Family Modelling Integration
====================================================

This module adds field accounts for Expense.

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 *Employee Training - Job Family Modelling Integration*
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.
5 changes: 5 additions & 0 deletions hr_employee_training_job_family_modelling/__init__.py
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
20 changes: 20 additions & 0 deletions hr_employee_training_job_family_modelling/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Copyright 2018 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Employee Training - Job Family Modelling Integration",
"version": "8.0.1.0.0",
"category": "Human Resource",
"website": "https://opensynergy-indonesia.com",
"author": "OpenSynergy Indonesia",
"license": "AGPL-3",
"installable": True,
"depends": [
"hr_employee_training",
"hr_job_family_modelling",
],
"data": [
"views/hr_training_views.xml",
],
"auto_install": True,
}
5 changes: 5 additions & 0 deletions hr_employee_training_job_family_modelling/models/__init__.py
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 hr_training_participant
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
# Copyright 2018 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openerp import models, fields, api


class HrTrainingParticipant(models.Model):
_inherit = "hr.training_partisipant"

job_grade_id = fields.Many2one(
string="Job Grade",
comodel_name="hr.job_grade",
)
job_family_grade_id = fields.Many2one(
string="Job Family Grade",
comodel_name="hr.job_family_grade",
)

@api.onchange(
"partisipant_id",
)
def onchange_job_grade_id(self):
self.job_grade_id = False
if self.partisipant_id:
self.job_grade_id = self.partisipant_id.job_grade_id

@api.onchange(
"partisipant_id",
)
def onchange_job_family_grade_id(self):
self.job_family_grade_id = False
if self.partisipant_id:
self.job_family_grade_id = self.partisipant_id.job_family_grade_id
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?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_training_view_form" model="ir.ui.view">
<field name="name">hr.training form</field>
<field name="model">hr.training</field>
<field name="inherit_id" ref="hr_employee_training.hr_training_view_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='job_id']" position="after">
<field name="job_grade_id"/>
<field name="job_family_grade_id"/>
</xpath>
</data>
</field>
</record>


</data>
</openerp>

0 comments on commit c3e93be

Please sign in to comment.