diff --git a/spp_programs/models/entitlement.py b/spp_programs/models/entitlement.py index f253246..391c211 100644 --- a/spp_programs/models/entitlement.py +++ b/spp_programs/models/entitlement.py @@ -719,7 +719,7 @@ def _generate_code(self): ) # Product Fields - product_id = fields.Many2one("product.product", "Product", domain=[("type", "=", "product")]) + product_id = fields.Many2one("product.product", "Product", domain=[("type", "=", "consu")]) quantity = fields.Integer("Quantity", default=1) unit_price = fields.Monetary(string="Value/Unit", currency_field="currency_id") uom_id = fields.Many2one("uom.uom", "Unit of Measure") diff --git a/spp_programs/models/managers/entitlement_manager_inkind.py b/spp_programs/models/managers/entitlement_manager_inkind.py index a0b7867..48b86d7 100644 --- a/spp_programs/models/managers/entitlement_manager_inkind.py +++ b/spp_programs/models/managers/entitlement_manager_inkind.py @@ -467,7 +467,7 @@ class SPPInKindEntitlementItem(models.Model): sequence = fields.Integer(default=1000) entitlement_id = fields.Many2one("spp.program.entitlement.manager.inkind", "In-kind Entitlement", required=True) - product_id = fields.Many2one("product.product", "Product", domain=[("type", "=", "product")], required=True) + product_id = fields.Many2one("product.product", "Product", domain=[("type", "=", "consu")], required=True) # non-mandatory field to store a domain that is used to verify if this item is valid for a beneficiary # For example, it could be: [('is_woman_headed_household, '=', True)] diff --git a/spp_programs/views/cel/entitlement_inkind_cel_views.xml b/spp_programs/views/cel/entitlement_inkind_cel_views.xml index 6a24617..3bc0415 100644 --- a/spp_programs/views/cel/entitlement_inkind_cel_views.xml +++ b/spp_programs/views/cel/entitlement_inkind_cel_views.xml @@ -1,56 +1,102 @@ - + spp.program.entitlement.manager.inkind.item.cel.form spp.program.entitlement.manager.inkind - + - - + + - + quantity_mode == 'cel' - - -
- - + + +
+ +
- +
- - + + - + condition_mode == 'cel' - - + + @@ -59,14 +105,23 @@ spp.program.entitlement.manager.inkind.cel.form spp.program.entitlement.manager.inkind - + - - + + - - + + diff --git a/spp_programs/views/managers/entitlement_manager_inkind_view.xml b/spp_programs/views/managers/entitlement_manager_inkind_view.xml index 6a837f8..3ef4c5e 100644 --- a/spp_programs/views/managers/entitlement_manager_inkind_view.xml +++ b/spp_programs/views/managers/entitlement_manager_inkind_view.xml @@ -30,21 +30,35 @@ Part of OpenSPP. See LICENSE file for full copyright and licensing details.
-
-
- + @@ -60,22 +74,40 @@ Part of OpenSPP. See LICENSE file for full copyright and licensing details. options="{'no_open':True,'no_create':True,'no_create_edit':True}" colspan="4" /> - - + + + + + + + + + + + - - + + + + + + + +
@@ -96,13 +128,20 @@ Part of OpenSPP. See LICENSE file for full copyright and licensing details. /> - + - + @@ -120,7 +159,11 @@ Part of OpenSPP. See LICENSE file for full copyright and licensing details. - +