Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
7537 Visualizzazioni

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
Abbandona
Risposta migliore

You use decorator @api.model.

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


Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
dic 15
6821
5
nov 15
5707
0
ott 17
9504
1
feb 16
3858
3
ago 15
18815