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)
Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!
Înscrie-te| Postări similare | Răspunsuri | Vizualizări | Activitate | |
|---|---|---|---|---|
|
0
dec. 15
|
8851 | |||
|
5
nov. 15
|
7902 | |||
|
0
oct. 17
|
12237 | |||
|
1
feb. 16
|
6006 | |||
|
Compute field V8
Rezolvat
|
3
aug. 15
|
20652 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.