Odoo Help

0

if isinstance(res2[record['id']], str): res2[record['id']] = eval(res2[record['id']]) #TOCHECK : why got string instend of dict in python2.6 KeyError

By
rihab
on 5/7/16, 4:42 PM 213 views

I am new to python and OpenERP and I apologise if my question is inconvenient. But I am trying to add a control that check if a field is empty, but I am getting this error on OpenERP

if isinstance(res2[record['id']], str): res2[record['id']] = eval(res2[record['id']]) #TOCHECK : why got string instend of dict in python2.6
KeyError

Please could you help me? What the problem could be?  Thanks in advance

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 5/7/16, 4:42 PM
Seen: 213 times
Last updated: 5/8/16, 12:56 AM