İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
4568 Görünümler

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
Vazgeç

have you tried using name_get function?

Üretici

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)

İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Eki 18
6160
0
Kas 17
3586
2
Ara 17
12895
1
Eki 17
2768
0
Şub 25
1027