Skip to content

Commit dfb535e

Browse files
committed
fix(spp_programs): use Odoo 19 product type domain for in-kind entitlement items
1 parent 7821446 commit dfb535e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

spp_programs/models/entitlement.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ def _generate_code(self):
719719
)
720720

721721
# Product Fields
722-
product_id = fields.Many2one("product.product", "Product", domain=[("type", "=", "product")])
722+
product_id = fields.Many2one("product.product", "Product", domain=[("type", "=", "consu")])
723723
quantity = fields.Integer("Quantity", default=1)
724724
unit_price = fields.Monetary(string="Value/Unit", currency_field="currency_id")
725725
uom_id = fields.Many2one("uom.uom", "Unit of Measure")

spp_programs/models/managers/entitlement_manager_inkind.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ class SPPInKindEntitlementItem(models.Model):
467467
sequence = fields.Integer(default=1000)
468468
entitlement_id = fields.Many2one("spp.program.entitlement.manager.inkind", "In-kind Entitlement", required=True)
469469

470-
product_id = fields.Many2one("product.product", "Product", domain=[("type", "=", "product")], required=True)
470+
product_id = fields.Many2one("product.product", "Product", domain=[("type", "=", "consu")], required=True)
471471

472472
# non-mandatory field to store a domain that is used to verify if this item is valid for a beneficiary
473473
# For example, it could be: [('is_woman_headed_household, '=', True)]

0 commit comments

Comments
 (0)