Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
4533 Prikazi

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
Opusti
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>

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
10
maj 20
8561
1
jan. 16
6195
1
jan. 25
23107
1
maj 21
5311
5
jan. 17
4259