Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
7806 Vizualizări

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)  

Imagine profil
Abandonează
Cel mai bun răspuns

You use decorator @api.model.

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


Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
dec. 15
7110
5
nov. 15
5984
0
oct. 17
9872
1
feb. 16
4151
3
aug. 15
19104