Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
7708 มุมมอง

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)


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ธ.ค. 15
6996
5
พ.ย. 15
5839
0
ต.ค. 17
9686
1
ก.พ. 16
4023
Compute field V8 แก้ไขแล้ว
3
ส.ค. 15
18958