Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
4378 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
10
may 20
8449
1
ene 16
6110
1
ene 25
22915
1
may 21
5096
5
ene 17
4118