تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
7688 أدوات العرض

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
ديسمبر 15
6966
5
نوفمبر 15
5823
0
أكتوبر 17
9646
1
فبراير 16
4014
Compute field V8 تم الحل
3
أغسطس 15
18945