Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3668 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
dic 16
3044
1
apr 24
1637
2
giu 25
89493
1
feb 19
21181
0
ago 16
4123