Skip to content

Commit

Permalink
Copied PBMS modules from other repos
Browse files Browse the repository at this point in the history
Signed-off-by: Lalith Kota <[email protected]>
  • Loading branch information
lalithkota committed Sep 5, 2024
1 parent 36265df commit 97e4cf3
Show file tree
Hide file tree
Showing 358 changed files with 24,356 additions and 20 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
exclude: |
(?x)
# NOT INSTALLABLE ADDONS
^g2p_notifications_rest_api/|
^g2p_program_registrant_info_rest_api/|
^g2p_programs_rest_api/|
# END NOT INSTALLABLE ADDONS
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ addon | version | maintainers | summary
[g2p_entitlement_differential](g2p_entitlement_differential/) | 17.0.0.0.0 | | OpenG2P Entitlement: Differential
[g2p_entitlement_in_kind](g2p_entitlement_in_kind/) | 17.0.0.0.0 | | OpenG2P Entitlement: In-Kind
[g2p_entitlement_voucher](g2p_entitlement_voucher/) | 17.0.0.0.0 | | OpenG2P Entitlement: Voucher
[g2p_formio](g2p_formio/) | 17.0.0.0.0 | | Form builders allow you to create, manage, and use dynamic forms with ease.
[g2p_mis_importer](g2p_mis_importer/) | 17.0.0.0.0 | | G2P MIS Importer
[g2p_notifications_base](g2p_notifications_base/) | 17.0.0.0.0 | | G2P Notifications: Base
[g2p_notifications_fast2sms](g2p_notifications_fast2sms/) | 17.0.0.0.0 | | G2P Notifications: Fast2SMS Service Provider
[g2p_notifications_voucher](g2p_notifications_voucher/) | 17.0.0.0.0 | | G2P Notifications: Voucher
[g2p_notifications_wiserv](g2p_notifications_wiserv/) | 17.0.0.0.0 | | G2P Notifications: Wiserv SMS Service Provider
[g2p_odk_importer_program](g2p_odk_importer_program/) | 17.0.0.0.0 | | Import records from ODK and add then into Program
[g2p_openid_vci_programs](g2p_openid_vci_programs/) | 17.0.0.0.0 | | G2P OpenID VCI: Program Beneficiaries
[g2p_payment_cash](g2p_payment_cash/) | 17.0.0.0.0 | | OpenG2P Program Payment: Cash
[g2p_payment_files](g2p_payment_files/) | 17.0.0.0.0 | | OpenG2P Program Payments: In Files
[g2p_payment_g2p_connect](g2p_payment_g2p_connect/) | 17.0.0.0.0 | | OpenG2P Program Payment: G2P Connect Payment Manager
Expand All @@ -39,12 +47,19 @@ addon | version | maintainers | summary
[g2p_program_reimbursement](g2p_program_reimbursement/) | 17.0.0.0.0 | | OpenG2P Programs: Reimbursement
[g2p_programs](g2p_programs/) | 17.0.0.0.0 | | OpenG2P Programs
[g2p_proxy_means_test](g2p_proxy_means_test/) | 17.0.0.0.0 | | G2P: Proxy Means Test
[g2p_self_service_portal](g2p_self_service_portal/) | 17.0.0.0.0 | | G2P Self Service Portal
[g2p_service_provider_beneficiary_management](g2p_service_provider_beneficiary_management/) | 17.0.0.0.0 | | G2P Service Provider Beneficiary Management
[g2p_service_provider_portal](g2p_service_provider_portal/) | 17.0.0.0.0 | | G2P Service Provider Portal
[g2p_service_provider_portal_base](g2p_service_provider_portal_base/) | 17.0.0.0.0 | | G2P Service Provider Portal: Base
[g2p_social_registry_importer](g2p_social_registry_importer/) | 17.0.0.0.0 | | Import records from Social Registry
[g2p_theme](g2p_theme/) | 17.0.0.0.0 | | OpenG2P Theme


Unported addons
---------------
addon | version | maintainers | summary
--- | --- | --- | ---
[g2p_notifications_rest_api](g2p_notifications_rest_api/) | 17.0.0.0.0 (unported) | | G2P Notifications: REST API
[g2p_program_registrant_info_rest_api](g2p_program_registrant_info_rest_api/) | 17.0.0.0.0 (unported) | | G2P Program : Program Registrant Info Rest API
[g2p_programs_rest_api](g2p_programs_rest_api/) | 17.0.0.0.0 (unported) | | G2P Programs: REST API

Expand Down
2 changes: 1 addition & 1 deletion g2p_entitlement_differential/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sequence": 1,
"author": "OpenG2P",
"website": "https://openg2p.org",
"license": "LGPL-3",
"license": "LGPL-3.0",
"depends": ["g2p_entitlement_cash"],
"data": ["views/entitlement_manager_view.xml"],
"demo": [],
Expand Down
2 changes: 1 addition & 1 deletion g2p_entitlement_in_kind/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sequence": 1,
"author": "OpenG2P",
"website": "https://openg2p.org",
"license": "LGPL-3",
"license": "LGPL-3.0",
"depends": ["spp_programs", "spp_entitlement_in_kind"],
"data": [
"views/in_kind.xml",
Expand Down
2 changes: 1 addition & 1 deletion g2p_entitlement_voucher/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sequence": 1,
"author": "OpenG2P",
"website": "https://openg2p.org",
"license": "LGPL-3",
"license": "LGPL-3.0",
"depends": [
"g2p_encryption",
"g2p_programs",
Expand Down
3 changes: 3 additions & 0 deletions g2p_formio/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# OpenG2P Formio

Refer to https://docs.openg2p.org.
2 changes: 2 additions & 0 deletions g2p_formio/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizard
24 changes: 24 additions & 0 deletions g2p_formio/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Part of OpenG2P. See LICENSE file for full copyright and licensing details.
{
"name": "OpenG2P Formio",
"category": "G2P",
"version": "17.0.0.0.0",
"sequence": 1,
"summary": "Form builders allow you to create, manage, and use dynamic forms with ease.",
"author": "OpenG2P",
"website": "https://openg2p.org",
"license": "LGPL-3.0",
"depends": ["formio", "g2p_programs", "formio_storage_filestore"],
"data": [
"views/formio_builder.xml",
"views/program_view.xml",
"wizard/g2p_self_service_program_view_wizard.xml",
],
"external_dependencies": {"python": ["formio-data"]},
"assets": {},
"demo": [],
"images": [],
"application": True,
"installable": True,
"auto_install": False,
}
1 change: 1 addition & 0 deletions g2p_formio/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import program
9 changes: 9 additions & 0 deletions g2p_formio/models/program.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from odoo import fields, models


class G2PProgram(models.Model):
_inherit = "g2p.program"

self_service_portal_form = fields.Many2one("formio.builder", string="Program Form")

is_multiple_form_submission = fields.Boolean(default=False)
3 changes: 3 additions & 0 deletions g2p_formio/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
Binary file added g2p_formio/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions g2p_formio/views/formio_builder.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<odoo>
<record id="program_formio_builder_form" model="ir.ui.view">
<field name="name">program_formio_builder_form</field>
<field name="model">formio.builder</field>
<field name="inherit_id" ref="formio.view_formio_builder_form" />
<field name="priority" eval="100" />
<field name="arch" type="xml">

<xpath expr="//page[@name='actions_api']" position="replace" />
<!-- <xpath expr="//page[@name='extra_assets']" position="replace" /> -->
<xpath expr="//page[@name='form_display_settings']" position="replace" />
<xpath expr="//page[@name='form_permissions']" position="replace" />
<xpath expr="//page[@name='portal_settings']" position="replace" />
<xpath expr="//page[@name='public_settings']" position="replace" />
<xpath expr="//page[@name='formio_components_api']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//group[@name='integration_settings']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//group[@name='publish_settings']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//group[@name='other_settings']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<!-- <xpath expr="//group[@name='formiojs_settings']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath> -->
</field>
</record>

<record id="program_formio_builder_tree" model="ir.ui.view">
<field name="name">program_formio_builder_tree</field>
<field name="model">formio.builder</field>
<field name="inherit_id" ref="formio.view_formio_builder_tree" />
<field name="arch" type="xml">
<data>
<field name="public" position="attributes">
<attribute name="column_invisible">1</attribute>
</field>
<field name="formio_res_model_id" position="attributes">
<attribute name="column_invisible">1</attribute>
</field>record
<field name="portal" position="attributes">
<attribute name="column_invisible">1</attribute>
</field>
<field name="formio_version_id" position="attributes">
<attribute name="column_invisible">1</attribute>
</field>
</data>
</field>
</record>

<menuitem
id="formio.menu_formio_form"
name="Forms"
parent="formio.menu_formio_root"
sequence="70"
action="formio.action_formio_form"
active="false"
/>
<!-- <menuitem
id="formio.menu_formio_extra_asset"
name="Extra Assets"
parent="formio.menu_formio_configuration"
sequence="50"
action="formio.action_formio_extra_asset"
active="false"
/> -->

</odoo>
20 changes: 20 additions & 0 deletions g2p_formio/views/program_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!--
Part of OpenG2P. See LICENSE file for full copyright and licensing details.
-->
<odoo>
<record id="self_service_portal_form" model="ir.ui.view">
<field name="name">self.service.portal.form</field>
<field name="model">g2p.program</field>
<field name="inherit_id" ref="g2p_programs.view_program_list_form" />
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page string="Portal Form">
<group>
<field name="is_multiple_form_submission" />
<field name="self_service_portal_form" />
</group>
</page>
</xpath>
</field>
</record>
</odoo>
3 changes: 3 additions & 0 deletions g2p_formio/wizard/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Part of OpenG2P. See LICENSE file for full copyright and licensing details.

from . import program_form_mapping_wizard
21 changes: 21 additions & 0 deletions g2p_formio/wizard/g2p_self_service_program_view_wizard.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Part of OpenG2P. See LICENSE file for full copyright and licensing details.
-->
<odoo>
<record id="self_service_create_wizard_form" model="ir.ui.view">
<field name="name">self.service.create.wizard.form</field>
<field name="model">g2p.program.create.wizard</field>
<field name="inherit_id" ref="g2p_programs.create_program_wizard_form_view" />
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page string="Portal Form">
<group>
<field name="is_multiple_form_submission" />
<field name="self_service_portal_form" />
</group>
</page>
</xpath>
</field>
</record>
</odoo>
24 changes: 24 additions & 0 deletions g2p_formio/wizard/program_form_mapping_wizard.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Part of OpenG2P. See LICENSE file for full copyright and licensing details.

from odoo import fields, models


class G2PCreateProgramWizard(models.TransientModel):
_inherit = "g2p.program.create.wizard"

self_service_portal_form = fields.Many2one("formio.builder", string="Program Form")

is_multiple_form_submission = fields.Boolean(default=False)

def create_program(self):
res = super(G2PCreateProgramWizard, self).create_program()

program = self.env["g2p.program"].browse(res["res_id"])
portal_form = self.self_service_portal_form

if portal_form:
program.self_service_portal_form = portal_form

program.is_multiple_form_submission = self.is_multiple_form_submission

return res
3 changes: 3 additions & 0 deletions g2p_mis_importer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# G2P MIS Importer

Refer to https://docs.openg2p.org.
2 changes: 2 additions & 0 deletions g2p_mis_importer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Part of Newlogic G2P. See LICENSE file for full copyright and licensing details.
from . import models
19 changes: 19 additions & 0 deletions g2p_mis_importer/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Part of openG2P. See LICENSE file for full copyright and licensing details.

{
"name": "G2P MIS Importer",
"category": "G2P",
"version": "17.0.0.0.0",
"author": "OpenG2P",
"website": "https://openg2p.org",
"license": "LGPL-3.0",
"depends": ["g2p_programs", "queue_job"],
"data": [
"security/ir.model.access.csv",
"views/mis_config_views.xml",
"views/mis_menu.xml",
],
"application": True,
"installable": True,
"auto_install": False,
}
Loading

0 comments on commit 97e4cf3

Please sign in to comment.