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)
| 相關帖文 | 回覆 | 瀏覽次數 | 活動 | |
|---|---|---|---|---|
|
0
12月 15
|
8831 | |||
|
5
11月 15
|
7893 | |||
|
0
10月 17
|
12233 | |||
|
1
2月 16
|
5985 | |||
|
Compute field V8
已解決
|
3
8月 15
|
20640 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.