İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4461 Görünümler

Hi everyone.

I have to update everytime one field's value based on another object's field. How to achieve it.Please share ur ideas.Thanks in advance.

Avatar
Vazgeç
En İyi Yanıt

Yes u can go to create method in that model check condition and update value.

@api.model

def create(self, vals):

    if values[u'key1'] = 'Something':

        values[u'key2'] = 'update value' 

     <remaining code>

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
10
May 20
8529
1
Oca 16
6178
1
Oca 25
23035
1
May 21
5254
5
Oca 17
4206