Skip to Content
Menu
This question has been flagged
1 Reply
6607 Views

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

You use decorator @api.model.

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


Avatar
Discard
Related Posts Replies Views Activity
0
Dec 15
5706
5
Nov 15
4745
0
Oct 17
8310
1
Feb 16
2856
3
Aug 15
17966