Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4382 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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>

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
10
maj 20
8455
1
sty 16
6114
1
sty 25
22918
1
maj 21
5103
5
sty 17
4121