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
7489 Widoki

how to override the create function with the new api
I test this but does not work :

 @api.one

    def create(self,vals):

        

        return super(<my_classe>,self).create(vals)
TypeError: create() takes exactly 2 arguments (1 given)  

Awatar
Odrzuć
Najlepsza odpowiedź

You use decorator @api.model.

@api.model def create(self,vals):
....
return super(<my_classe>,self).create(vals)


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
gru 15
6769
5
lis 15
5648
0
paź 17
9394
1
lut 16
3795
Compute field V8 Rozwiązane
3
sie 15
18771