Hello everyone hope you're doing well,
i just want to override the name_get function for the contacts in res.partner
i did as follow :
@api.multi
def name_get(self):
res = super(ResPartner, self).name_get()
data = []
for rec in self:
if (rec.type == 'other'):
display_value = ''
display_value += rec.name or ""
display_value += ' ,'
display_value += rec.firstname or ""
display_value += ','
data.append((rec.id, display_value))
return data
where type = other is how i can distinguish contacts from companies but it doesn't work i keep getting this error :
UnicodeError: unable to convert <odoo.tools.func.lazy object at 0x7f0629cc41b0>
please help this is driving me crazy
thank you all