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)
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)
You use decorator @api.model.
@api.model
def create(self,vals):
....
return super(<my_classe>,self).create(vals)
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire| Publications associées | Réponses | Vues | Activité | |
|---|---|---|---|---|
|
0
déc. 15
|
8830 | |||
|
5
nov. 15
|
7893 | |||
|
0
oct. 17
|
12232 | |||
|
1
févr. 16
|
5985 | |||
|
Compute field V8
Résolu
|
3
août 15
|
20638 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.