Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
7549 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
6833
5
nov. 15
5713
0
oct. 17
9520
1
feb. 16
3873
3
aug. 15
18817