Skip to content

Commit

Permalink
Merge e2dc25b into 2e18914
Browse files Browse the repository at this point in the history
  • Loading branch information
andhit-r committed Jan 21, 2019
2 parents 2e18914 + e2dc25b commit 528dea4
Show file tree
Hide file tree
Showing 9 changed files with 134 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ virtualenv:
# - gem install compass --pre

install:
- sudo pip install openupgradelib
- git clone --depth=1 https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
- travis_install_nightly
Expand Down
47 changes: 47 additions & 0 deletions l10n_id_partner_identification_bpjs/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.. 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

=============================
Partner Identification - BPJS
=============================


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

To install this module, you need to:

1. Clone the branch 8.0 of the repository https://github.com/open-synergy/opnsynid-vertical-accountant
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 *Partner Identification - BPJS*
6. Install the module

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

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

* 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.
6 changes: 6 additions & 0 deletions l10n_id_partner_identification_bpjs/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2019 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
from .hooks import _load_partner_identification_data
24 changes: 24 additions & 0 deletions l10n_id_partner_identification_bpjs/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
# Copyright 2018 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Partner Identification - BPJS",
"version": "8.0.1.0.0",
"author": "OpenSynergy Indonesia",
"website": "https://opensynergy-indonesia.com",
"license": "AGPL-3",
"depends": [
"partner_identification",
],
"external_dependencies": {
"python": [
"openupgradelib",
],
},
"data": [
"data/res_partner_id_category_data.xml",
],
"installable": True,
"pre_init_hook": "_load_partner_identification_data",
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="res.partner.id_category" id="partner_identification_bpjs_kesehatan">
<field name="name">BPJS Kesehatan</field>
<field name="code">bpjs_kes</field>
</record>

<record model="res.partner.id_category" id="partner_identification_bpjs_ketenagakerjaan">
<field name="name">BPJS Ketenagakerjaan</field>
<field name="code">bpjs_tnk</field>
</record>
</data>
</openerp>
13 changes: 13 additions & 0 deletions l10n_id_partner_identification_bpjs/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
# Copyright 2018 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).


def _load_partner_identification_data(cr):
try:
from openupgradelib import load_data
load_data(
cr, "l10n_id_partner_identification_bpjs",
"/data/res_partner_id_category_data.xml")
except:
return
5 changes: 5 additions & 0 deletions l10n_id_partner_identification_bpjs/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2019 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

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

from openerp import models, fields


class ResPartner(models.Model):
_inherit = "res.partner"

bpjs_kesehatan_number = fields.Char(
string="# BPJS Kesehatan",
compute=lambda s: s._compute_identification(
"bpjs_kesehatan_number", "bpjs_kes"),
search=lambda s, *a: s._search_identification(
"bpjs_kes", *a),
)
bpjs_ketenagakerjaan_number = fields.Char(
string="# BPJS Ketenagakerjaan",
compute=lambda s: s._compute_identification(
"bpjs_ketenagakerjaan_number", "bpjs_tnk"),
search=lambda s, *a: s._search_identification(
"bpjs_tnk", *a),
)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 528dea4

Please sign in to comment.