Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3703 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 12 16
3100
1
thg 4 24
1687
2
thg 6 25
89588
1
thg 2 19
21217
0
thg 8 16
4169