Help needed in report property

I have a model with the name ‘exam_section.ta_da_bill’ which has the following property

def recovery(self):
    res = 0
    ta_da_lines = self.exam.exam_type.ta_da
    employee_grade_pay = float(
    for line in ta_da_lines:
        if self.employee.employee_group ==
            for grade_pay in line.grade_pays:
                if employee_grade_pay >= float(
                    hotel_entitlement = line.hotel_charges
                    food_entitlement = line.food_charges
    days_hotel = self.hotel_food.no_of_nights_stayed
    days_food = self.hotel_food.no_of_days_food
    total_hotel = days_hotel * hotel_entitlement
    total_food = days_food * food_entitlement
    hotel_amount = self.total_hotel_amount
    food_amount = self.total_food_amount
    recovery_hotel = total_hotel - hotel_amount \
                    if total_hotel > hotel_amount else 0
    recovery_food = total_food - food_amount \
                    if total_food > food_amount else 0
    res = recovery_food + recovery_hotel
    return res

I have a report which uses this property. But when I try to print the report, it gives out the following error

I have tried updating the database again and again. I even dropped the table and reupdated the database but to no avail. If I remove the @property decorator, the final report shows recovery as an object of type function. I have written another property in the same model which works perfectly

def total_hotel_amount(self):
    res = 0
    if self.hotel_food:
        for record in self.hotel_food:
            if record.type_ in ['hotel']:
                res += record.amount
    return res

This comes up with no errors but the recovery property I wrote does not work at all. I am tired of updating my database again and again. Is there another way to make the recovery property work without me actually having to delete data and try again?

Help is much appreciated

I bet that the property code raises at some point an AttributeError which lead Python to consider that the recovery attribute does not exist. It is a weird behavior of Python which is discussed at
To debug it, you can remove the property decorator and call the method. You will get the traceback of the AttributeError inside the function.

By the way, such issue does not require to update the database. Database update is only needed when you are changing the schema of the database.