Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
4373 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
10
mai 20
8439
1
janv. 16
6105
1
janv. 25
22900
1
mai 21
5072
5
janv. 17
4113