Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4390 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
10
mag 20
8472
1
gen 16
6125
1
gen 25
22931
1
mag 21
5144
5
gen 17
4144