This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: mkumar-02 <[email protected]>
- Loading branch information
Showing
21 changed files
with
1,299 additions
and
4 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
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,57 @@ | ||
================================ | ||
OpenG2P Social Registry Importer | ||
================================ | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:b33dbddef64baabd6fefe0ff59dca3cad6aedc06a140b4106270a205258f0703 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Alpha | ||
.. |badge2| image:: https://img.shields.io/badge/github-OpenG2P%2Fopeng2p--importers-lightgray.png?logo=github | ||
:target: https://github.com/OpenG2P/openg2p-importers/tree/15.0-develop/g2p_social_registry_importer | ||
:alt: OpenG2P/openg2p-importers | ||
|
||
|badge1| |badge2| | ||
|
||
G2P Social Registry Importer | ||
|
||
.. IMPORTANT:: | ||
This is an alpha version, the data model and design can change at any time without warning. | ||
Only for development or testing purpose, do not use in production. | ||
`More details on development status <https://odoo-community.org/page/development-status>`_ | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OpenG2P/openg2p-importers/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OpenG2P/openg2p-importers/issues/new?body=module:%20g2p_social_registry_importer%0Aversion:%2015.0-develop%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* OpenG2P | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is part of the `OpenG2P/openg2p-importers <https://github.com/OpenG2P/openg2p-importers/tree/15.0-develop/g2p_social_registry_importer>`_ project on GitHub. | ||
|
||
You are welcome to contribute. |
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 @@ | ||
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,29 @@ | ||
# Part of openG2P. See LICENSE file for full copyright and licensing details. | ||
|
||
{ | ||
"name": "OpenG2P Social Registry Importer", | ||
"category": "G2P", | ||
"summary": "Import records from Social Registry", | ||
"version": "15.0.1.1.0", | ||
"author": "OpenG2P", | ||
"development_status": "Alpha", | ||
"website": "https://github.com/OpenG2P/openg2p-auth", | ||
"license": "Other OSI approved licence", | ||
"depends": [ | ||
"g2p_programs", | ||
"g2p_registry_membership", | ||
"spp_registry_data_source", | ||
], | ||
"data": [ | ||
"data/ir_config_params.xml", | ||
"data/social_registry_data_source.xml", | ||
"data/search_criteria.xml", | ||
# "security/groups.xml", | ||
"security/ir.model.access.csv", | ||
"views/fetch_social_registry_beneficiary_views.xml", | ||
], | ||
"external_dependencies": {"python": ["camel_converter"]}, | ||
"application": True, | ||
"auto_install": False, | ||
"installable": 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,23 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<function | ||
model="ir.config_parameter" | ||
name="set_param" | ||
eval="('g2p_import_social_registry.client_id', 'openg2p-admin-client')" | ||
/> | ||
<function | ||
model="ir.config_parameter" | ||
name="set_param" | ||
eval="('g2p_import_social_registry.client_password', '')" | ||
/> | ||
<function | ||
model="ir.config_parameter" | ||
name="set_param" | ||
eval="('g2p_import_social_registry.grant_type', 'client_credentials')" | ||
/> | ||
<function | ||
model="ir.config_parameter" | ||
name="set_param" | ||
eval="('g2p_import_social_registry.max_registrants_count_job_queue', 100)" | ||
/> | ||
</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,64 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo noupdate="1"> | ||
<record id="g2p_fetch_sr_data" model="g2p.fetch.social.registry.beneficiary"> | ||
<field name="name">Fetch Social Registry Data</field> | ||
<field name="data_source_id" ref="g2p_social_registry_importer.g2p_social_registry_data_source" /> | ||
<field name="import_registrant_without_id">False</field> | ||
<field name="target_registry">individual</field> | ||
<field name="target_program" /> | ||
<field name="query"> | ||
{ | ||
getRegistrants(isGroup: true, limit:2){ | ||
name, | ||
isGroup, | ||
givenName, | ||
familyName, | ||
groupMembershipIds{ | ||
individual{ | ||
name, | ||
gender, | ||
givenName, | ||
familyName, | ||
addlName, | ||
email, | ||
gender, | ||
address, | ||
registrationDate, | ||
birthPlace, | ||
birthdate, | ||
createDate, | ||
writeDate, | ||
regIds{ | ||
idTypeAsStr, | ||
value, | ||
expiryDate | ||
}, | ||
phoneNumberIds{ | ||
phoneNo, | ||
phoneSanitized, | ||
dateCollected, | ||
disabled | ||
} | ||
}, | ||
kind{ | ||
name | ||
}, | ||
createDate, | ||
writeDate | ||
}, | ||
phoneNumberIds{ | ||
phoneNo, | ||
phoneSanitized, | ||
dateCollected, | ||
disabled | ||
}, | ||
regIds{ | ||
idTypeAsStr, | ||
value, | ||
expiryDate | ||
} | ||
} | ||
} | ||
</field> | ||
</record> | ||
</odoo> |
24 changes: 24 additions & 0 deletions
24
g2p_social_registry_importer/data/social_registry_data_source.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,24 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<record id="g2p_social_registry_data_source" model="spp.data.source"> | ||
<field name="name">Social Registry</field> | ||
<field name="url">http://social-registry-odoo.social-registry/api/v1/g2p-connect</field> | ||
<field name="auth_type">bearer_authentication</field> | ||
</record> | ||
<record id="g2p_social_registry_oauth2_path" model="spp.data.source.path"> | ||
<field | ||
name="data_source_id" | ||
eval="ref('g2p_social_registry_importer.g2p_social_registry_data_source')" | ||
/> | ||
<field name="key">Authentication</field> | ||
<field name="value">http://keycloak.keycloak/realms/openg2p/protocol/openid-connect/token</field> | ||
</record> | ||
<record id="g2p_social_registry_registry_path" model="spp.data.source.path"> | ||
<field | ||
name="data_source_id" | ||
eval="ref('g2p_social_registry_importer.g2p_social_registry_data_source')" | ||
/> | ||
<field name="key">Registry Sync Search</field> | ||
<field name="value">/registry/sync/search</field> | ||
</record> | ||
</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,4 @@ | ||
from . import constants | ||
from . import fetch_social_registry_beneficiary | ||
from . import imported_registrants | ||
from . import res_partner |
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,7 @@ | ||
GRAPHQL = "graphql" | ||
|
||
DATA_SOURCE_NAME = "Social Registry" | ||
DATA_SOURCE_SEARCH_PATH_NAME = "Registry Sync Search" | ||
DATA_SOURCE_AUTH_PATH_NAME = "Authentication" | ||
|
||
REQUEST_TIMEOUT = 10 |
Oops, something went wrong.