Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
4585 Vues

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
Ignorer

have you tried using name_get function?

Auteur

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)

Publications associées Réponses Vues Activité
2
oct. 18
6191
0
nov. 17
3599
2
déc. 17
12912
1
oct. 17
2769
0
févr. 25
1069