Odoo Ajuda

0

0
2 Respostas
0
Avatar

Hilar AK Suíça

--Hilar AK--
--Hilar AK--
Experienced Odoo / Python Developer with a demonstrated history of working in the information technology and services industry with 3.5+years of experience. Skilled in Python, PostgreSQL, SQL, HTML, JavaScript. Strong engineering professional with a Bachelor of Technology (BTech) focused on Computer Science from the College of Engineering Munnar.

 Blogs:-

https://medium.com/@hilarak
        https://hilarlive.wordpress.com/
 StackOverflow:
       https://stackoverflow.com/users/7561347/burmese-pythis-hilar-ak

Quora:
    

            https://www.quora.com/profile/Hilar-Ak-1

Github:


https://github.com/hilarak



Hilar AK Suíça
29/05/18 07:12

you have to update values of one2many B using some format.

Have a look here one2many flags

0
Samo Arko Eslovênia
04/06/18 03:42

First of all if you have 2 o2m relations with the same data you should re evaluate your data model. But filling o2m fields is done like in Hilar link, but this copy paste from the odoo documentation sux when you don't know what you're doing!

So if you you want so fill the model on the "many" side you need a dict of values that you just pass to the field that has the relation on the "one" side of the relation.

# field with the o2m relation
relation_ids = fields.One2Many()

# filling the many model
relation_ids = [(0, 0, dict_of_values)]

# OR
relation_ids = [(0, 0, {'field1': self.value1, 'field2': value2})]  
Faça uma Pergunta
Writer
Keep Informed
1 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