تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4039 أدوات العرض

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

المنشورات ذات الصلة الردود أدوات العرض النشاط
0
مارس 25
1420
0
يناير 25
3501
1
أغسطس 23
14868
change password تم الحل
1
أغسطس 23
13514
1
يوليو 23
10493