Skip to content

Commit fb8b5dd

Browse files
committed
fix id dropdown incorrectly showing wrong values in program create wizard
1 parent 5f420e8 commit fb8b5dd

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

spp_programs/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "OpenSPP Programs",
55
"summary": "Manage programs, cycles, beneficiary enrollment, entitlements (cash and in-kind), payments, and fund tracking for social protection.",
66
"category": "OpenSPP/Core",
7-
"version": "19.0.2.0.10",
7+
"version": "19.0.2.0.11",
88
"sequence": 1,
99
"author": "OpenSPP.org",
1010
"website": "https://github.com/OpenSPP/OpenSPP2",

spp_programs/models/managers/entitlement_manager.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@
55
class BaseEntitlementManager(models.AbstractModel):
66
_inherit = "spp.base.program.entitlement.manager"
77

8-
id_type_id = fields.Many2one("spp.id.type", "ID Type to store in entitlements")
8+
id_type_id = fields.Many2one(
9+
"spp.vocabulary.code",
10+
"ID Type for Entitlement Collection",
11+
domain="[('vocabulary_id.namespace_uri', '=', 'urn:openspp:vocab:id-type')]",
12+
)

spp_programs/wizard/create_program_wizard.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,11 @@ def _default_warehouse_id(self):
271271
default="default_eligibility",
272272
)
273273

274-
id_type_id = fields.Many2one("spp.id.type", "ID Type to store in entitlements")
274+
id_type_id = fields.Many2one(
275+
"spp.vocabulary.code",
276+
"ID Type for Entitlement Collection",
277+
domain="[('vocabulary_id.namespace_uri', '=', 'urn:openspp:vocab:id-type')]",
278+
)
275279
view_id = fields.Many2one(
276280
"ir.ui.view",
277281
"Program UI Template",

0 commit comments

Comments
 (0)