Odoo Ayuda

1

1
1 Respuesta
3
Avatar

Axel Mendoza Cuba

--Axel Mendoza--
13876
| 8 8 10
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full-time employee trying to understand what to do and how

Reach me at aekroft@gmail.com

Axel Mendoza Cuba
1/12/15 15:42

That's because you need to put the values in the write format expected for that kind of field. Change the method like this:

    def default_get(self, cr, uid, fields, context=None):
if context is None: context = {}
res = super(open_questionnaire, self).default_get(cr, uid, fields, context=context)
questionnaire_id = context.get('questionnaire_id', False)
if questionnaire_id and 'question_ans_ids' in fields:
query = """
select question as question_id from profile_questionnaire_quest_rel where questionnaire = %s"""
cr.execute(query, (questionnaire_id,))
result = cr.dictfetchall()
res.update(question_ans_ids=[(4,elem) for elem in result])
return res
2 Comentarios
Thinkwell Designs, Dave Burkholder Estados Unidos
14/1/17 17:38

Thanks-a-million, Axel. This helped me today!

subbarao India
25/10/18 3:04

Hello Dave,

It will work, the mistake you did is you are passing wrong values to one2many field.

I hope you understood what's the mistake you did.

Realizar una pregunta
Keep Informed
2 seguidor(es)
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