"AttributeError: 'bool' object has no attribute 'read'" like this it refers my code line "File "/home/agile/workspace/odoo-10.0/addons/colbrow_medics/causality.py", line 41, in onchange_getage_id birth_date = parser.parse(self.dob)"
@api.onchange('dob')
def onchange_getage_id(self):
current_date = datetime.now()
current_year = current_date.year
birth_date = parser.parse(self.dob)
current_age = current_year - birth_date.year
self.age = current_age
Why i am getting this error