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

for example this :

def attachment_tree_view(self, cr, uid, ids, context):

For what is the self, cr, uid ,ids, context

I don't understand for what those arguments are?

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

Where self is reffered as this operator.

cr: is the database cursor using that you can access the database operation like (commit, rollback, etc...)

uid: current user id to check the access right

ids: it the collection of list of current object ids

context : It contains the info related to timezone, lang


cr – database cursor uid – current user id ids – list of ids fields_to_export – list of fields context – context arguments, like lang, time zone

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
ديسمبر 16
3042
1
أبريل 24
1637
2
يونيو 25
89490
1
فبراير 19
21180
0
أغسطس 16
4120