# HG changeset patch # User Luis Falcon # Date 1509133218 -3600 # Node ID 02e211b40aef068a4f71d9ddafb8d53a88380bb4 # Parent 4ab78954dc6d77d3e661e24c7ea829ddeace4b13 fix bug #52298: Traceback generating an invoice from service with an insurance policy plan diff --git a/tryton/health_insurance/wizard/wizard_health_insurance.py b/tryton/health_insurance/wizard/wizard_health_insurance.py --- a/tryton/health_insurance/wizard/wizard_health_insurance.py +++ b/tryton/health_insurance/wizard/wizard_health_insurance.py @@ -59,7 +59,7 @@ for policy in insurance.plan_id.product_policy: # Then, if there's no product, check for the category - if (product.category == policy.product_category): + if (policy.product_category in product.categories): if policy.discount: discount['value'] = policy.discount discount['type'] = 'pct'