Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
4001 Tampilan

while making new reservation in hotel reservation module in odoo v8


ValueError: "global name 'cr' is not defined" while evaluatingu'set_to_draft_reservation()'


while assignin value to cr it produces multi-value error

Avatar
Buang
Jawaban Terbai

Check the Coding style, if it is written in traditional coding style, then you would be able to access those variable,

If not, then it could be written in API coding style, where-in 'self' is binded by all those environmental variables, in order to avail it, use syntax as follows


self._cr (database cursor)

self._uid (uid/user)

self._context (frozen dict of context)

self._ids (ids)

Avatar
Buang
Penulis

i have got another error after using

self._cr

the error says ValueError: "delete_workflow() takes at most 5 arguments (8 given)" while evaluating

u'set_to_draft_reservation()'

Post Terkait Replies Tampilan Aktivitas
0
Mar 25
1414
0
Jan 25
3493
1
Agu 23
14852
change password Diselesaikan
1
Agu 23
13503
1
Jul 23
10484