Skip to content

Commit

Permalink
[8.0.1.0.0] hr_employee_blood_type_from_home_address
Browse files Browse the repository at this point in the history
  • Loading branch information
andhit-r committed Dec 29, 2018
1 parent c98f02b commit 3e50036
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 0 deletions.
39 changes: 39 additions & 0 deletions hr_employee_blood_type_from_home_address/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 Blood Type From Home Address
=====================================



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 Blood Type From Home Address*
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_blood_type_from_home_address/__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_blood_type_from_home_address/__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).
# pylint: disable=locally-disabled, manifest-required-author
{
"name": "Employee Blood Type From Home Address",
"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_data_from_home_address",
"partner_contact_blood_type",
],
"data": [
"views/hr_employee_views.xml",
],
}
5 changes: 5 additions & 0 deletions hr_employee_blood_type_from_home_address/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_employee
30 changes: 30 additions & 0 deletions hr_employee_blood_type_from_home_address/models/hr_employee.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
# Copyright 2018 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import models, fields


class HrEmployee(models.Model):
_inherit = "hr.employee"

blood_type_aob = fields.Selection(
string="Blood Type (ABO)",
selection=[
("a", "A"),
("b", "B"),
("ab", "AB"),
("o", "O"),
],
related="address_home_id.blood_type_aob",
store=True,
)
blood_type_rh = fields.Selection(
string="Blood Type (Rh)",
selection=[
("+", "+"),
("-", "-"),
],
related="address_home_id.blood_type_rh",
store=True,
)
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,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2018 OpenSynergy Indonesia
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->

<openerp>
<data>

<record id="hr_employee_view_form" model="ir.ui.view">
<field name="name">hr.employee form</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="//group[@string='Status']" position="inside">
<field name="blood_type_aob"/>
<field name="blood_type_rh"/>
</xpath>
</data>
</field>
</record>

</data>
</openerp>

0 comments on commit 3e50036

Please sign in to comment.