Skip to Content
Menu
This question has been flagged
1 Atsakyti
4620 Rodiniai

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.

Portretas
Atmesti
Best Answer

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>

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
10
geg. 20
8758
1
saus. 16
6380
1
saus. 25
23317
1
geg. 21
5480
5
saus. 17
4384