Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
4618 Visninger

I want to concatenate multiple character fields in a single many2one field and access this in other module. How can we do this?

For example:- I have 5 character fields with different classes in a module and want to concatenate these 5 character fields in a single many2one field. Also I want access this many2one field in another module.

Can anyone help me out here?

Avatar
Kassér

have you tried using name_get function?

Forfatter

I have tried below code but it does not work for me:-

@api.depends()

def create(self, vals):

name = str(vals['field1'] or '') + ' ' +str(vals['field2'] or '') + ' ' +str(vals['field3'] or '') + ' ' +str(vals['field4'] or '')

vals['name'] = name

return super(sample_module, self).create(vals)

Related Posts Besvarelser Visninger Aktivitet
2
okt. 18
6247
0
nov. 17
3620
2
dec. 17
12941
1
okt. 17
2776
0
feb. 25
1123