Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4008 มุมมอง

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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)

อวตาร
ละทิ้ง
ผู้เขียน

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()'

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มี.ค. 25
1415
0
ม.ค. 25
3493
1
ส.ค. 23
14853
change password แก้ไขแล้ว
1
ส.ค. 23
13505
1
ก.ค. 23
10484