generate functionSun, 19 Mar 2023

provide more space to tag field in odoo

def get_tag_value(self, cr, uid, ids, field_name, arg, context=None): res = {} for record in self.browse(cr, uid, ids, context=context): tags = record.tag_ids if tags: res[record.id] = ', '.join(map(lambda val: val.name, tags)) else: res[record.id] = False return res _columns = { 'tag_value': fields.function(get_tag_value, type='char', string='Tag'), }

Want to kickstart your project?Use the new AI Studio to create your code