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

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)  

Avatar
Zrušiť
Best Answer

You use decorator @api.model.

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


Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
0
dec 15
6758
5
nov 15
5646
0
okt 17
9375
1
feb 16
3782
3
aug 15
18758