跳至内容
菜单
此问题已终结
1 回复
4033 查看

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
3月 25
1420
0
1月 25
3499
1
8月 23
14867
1
8月 23
13512
1
7月 23
10493