跳至內容
選單
此問題已被標幟
1 回覆
7541 瀏覽次數

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
6821
5
11月 15
5707
0
10月 17
9510
1
2月 16
3858
3
8月 15
18815