Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
7504 Zobrazení

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šit
Nejlepší odpověď

You use decorator @api.model.

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


Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
pro 15
6778
5
lis 15
5651
0
říj 17
9409
1
úno 16
3807
3
srp 15
18779