Hi Friends,
I am using openerp 6.1 version.I had wrote a fields.function for calculating no of days based on start_date,end_date.It prints the result but it showing the error as RuntimeError: maximum recursion depth exceeded
def _total_hours(self, cr, uid, ids, field_name, args, context=None):
for days in self.browse(cr,uid,ids, context=context):
a = datetime.datetime.strptime(days.start_date, "%Y-%m-%d")
b = datetime.datetime.strptime(days.end_date, "%Y-%m-%d")
delta = b - a
days.write({'no_days':delta.days+1})
return True
So please instruct me to rectify this error ASAP.Thanks in Advance