Skip to content

Commit e0755d1

Browse files
Merge pull request #326 from mkumar-02/1.3.0-temp
Merged develop into 1.3. Fixed g2pconnect json serialization. Fixed minor Odools errors.
2 parents 1ffc394 + 2d30e6b commit e0755d1

31 files changed

Lines changed: 1397 additions & 9 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ coverage.xml
4949
# Visual Studio cache/options directory
5050
.vs/
5151
.vscode
52+
**/odools.toml
5253

5354
# OSX Files
5455
.DS_Store

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ addon | version | maintainers | summary
5151
[g2p_proxy_means_test](g2p_proxy_means_test/) | 17.0.1.3.0 | | G2P: Proxy Means Test
5252
[g2p_reimbursement_portal](g2p_reimbursement_portal/) | 17.0.1.3.0 | | G2P Reimbursement Portal
5353
[g2p_social_registry_importer](g2p_social_registry_importer/) | 17.0.1.3.0 | | Import records from Social Registry
54+
[g2p_support_desk](g2p_support_desk/) | 17.0.1.3.0 | | OpenG2P Support Desk Management System
5455
[g2p_theme](g2p_theme/) | 17.0.1.3.0 | | OpenG2P Theme
5556

5657

g2p_bridge_configuration/models/payment_manager.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ def publish_bridge_benefit_program(self):
4646
},
4747
}
4848

49-
token = self.create_jwt_token(json.dumps(data, separators=(",", ":")))
49+
token = self.create_jwt_token(
50+
json.dumps(data, indent=None, separators=(",", ":"), sort_keys=True)
51+
)
5052
headers = {
5153
"Accept": "application/json",
5254
"Content-Type": "application/json",

g2p_payment_g2p_connect/models/cycle.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def generate_summary(self):
3737
"message": self.disbursement_envelope_id,
3838
}
3939

40-
token = payment_manager.create_jwt_token(json.dumps(data, separators=(",", ":")))
40+
token = payment_manager.create_jwt_token(
41+
json.dumps(data, indent=None, separators=(",", ":"), sort_keys=True)
42+
)
4143
headers = {
4244
"Accept": "application/json",
4345
"Content-Type": "application/json",

g2p_payment_g2p_connect/models/payment_manager.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ def _send_payments(self, batches):
179179
)
180180
try:
181181
_logger.info("G2P Bridge Disbursement Batch Data: %s", batch_data)
182-
token = self.create_jwt_token(json.dumps(batch_data, separators=(",", ":")))
182+
token = self.create_jwt_token(
183+
json.dumps(batch_data, indent=None, separators=(",", ":"), sort_keys=True)
184+
)
183185
headers = {
184186
"Accept": "application/json",
185187
"Content-Type": "application/json",
@@ -268,7 +270,9 @@ def payments_status_check(self, id_):
268270
}
269271
try:
270272
_logger.info("G2P Connect Disbursement Status Data: %s", status_data)
271-
token = payment_manager.create_jwt_token(json.dumps(status_data, separators=(",", ":")))
273+
token = payment_manager.create_jwt_token(
274+
json.dumps(status_data, indent=None, separators=(",", ":"), sort_keys=True)
275+
)
272276
headers = {
273277
"Accept": "application/json",
274278
"Content-Type": "application/json",
@@ -388,7 +392,9 @@ def _create_envelope_g2p_bridge(self, cycle):
388392
},
389393
}
390394
try:
391-
token = self.create_jwt_token(json.dumps(envelope_request_data, separators=(",", ":")))
395+
token = self.create_jwt_token(
396+
json.dumps(envelope_request_data, indent=None, separators=(",", ":"), sort_keys=True)
397+
)
392398
headers = {
393399
"Accept": "application/json",
394400
"Content-Type": "application/json",

g2p_program_registrant_info/wizard/g2p_program_registrant_info_wizard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def jsonize_form_data(self, data, program, membership=None):
6060
@api.model
6161
def add_files_to_store(self, files, store, program_membership=None, tags=None):
6262
file_details = []
63-
DOC_TAGS = self.env["g2p.document.tag"]
6463
try:
64+
DOC_TAGS = self.env["g2p.document.tag"]
6565
for file in files:
6666
if file and store:
6767
document_file = self.env["storage.file"].create(

g2p_programs/models/managers/payment_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class BasePaymentManager(models.AbstractModel):
3737
name = fields.Char("Manager Name", required=True)
3838
program_id = fields.Many2one("g2p.program", string="Program", required=True)
3939

40-
def prepare_payments(self, entitlements):
40+
def prepare_payments(self, cycle, entitlements):
4141
"""
4242
This method is used to prepare the payment list of the entitlements.
4343
:param entitlements: The entitlements.
@@ -142,7 +142,7 @@ def constrains_batch_tag_ids(self):
142142
if rec.batch_tag_ids.sorted("order")[-1].domain != "[]":
143143
raise ValidationError(_("Last tag in the Batch Tags list must contain empty domain."))
144144

145-
def prepare_payments(self, cycle, entitlements=None):
145+
def prepare_payments(self, cycle, entitlements):
146146
if not entitlements:
147147
entitlements = cycle.entitlement_ids.filtered(lambda a: a.state == "approved")
148148
else:

g2p_social_registry_importer/models/fetch_social_registry_beneficiary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def test_connection(self):
141141
},
142142
}
143143

144-
@api.onchange("registry")
144+
@api.onchange("target_registry")
145145
def onchange_target_registry(self):
146146
for rec in self:
147147
rec.target_program = None

g2p_support_desk/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# OpenG2P Support Desk Management System
2+
3+
This module provides a comprehensive support desk management system with:
4+
5+
- Ticket Management
6+
- Team Management
7+
- SLA Tracking
8+
- Knowledge Base
9+
- Beneficiary Portal Access
10+
11+
Refer to https://docs.openg2p.org.

g2p_support_desk/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models

0 commit comments

Comments
 (0)