@api.onchange('applicant_credential_id')
def _onchnage_applicant_credential_id(self):
res = {}
for rec in self:
if rec.applicant_credential_id:
rec.partner_name = rec.applicant_credential_id.full_name
rec.readonly_partner_name = True
res['attrs']={'partner_name':{'invisible': [('readonly_partner_name', '=', True)]}}
else:
rec.readonly_partner_name = False
res['attrs']={'partner_name':{'invisible': [('readonly_partner_name', '=', False)]}}
return res
code is not working how i can write
res['attrs']={'partner_name':{'invisible': [('readonly_partner_name', '=', False)]}}
where is my mistake ?