Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
3695 Prikazi

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?

Avatar
Opusti
Best Answer

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

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
dec. 16
3090
1
apr. 24
1676
2
jun. 25
89540
1
feb. 19
21200
0
avg. 16
4155