Skip to Content
Menu
This question has been flagged
1 Odpoveď
4460 Zobrazenia

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
Zrušiť
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
Zrušiť
Related Posts Replies Zobrazenia Aktivita
10
máj 20
8529
1
jan 16
6178
1
jan 25
23035
1
máj 21
5254
5
jan 17
4206