Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
7545 Prikazi

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
Opusti
Best Answer

You use decorator @api.model.

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


Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
dec. 15
6832
5
nov. 15
5709
0
okt. 17
9517
1
feb. 16
3860
3
avg. 15
18815