Odoo Help

Welcome!

This community 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.

0

2 or more many2many fields in table/view

By
Sebastian Orzechowski
on 6/16/16, 3:09 AM 346 views

Hi. I have problem with proper rendering value in the form wthen i have two or more many2many fields. The contents of the fields is a copy of the contents of another field, even though they have been savedwith other values. I found issue in odoo github describing that same error what I have \https://github.com/odoo/odoo/issues/3286 . Is someone known solution to this problem

0

Jérémy Kersten (jke)

--Jérémy Kersten (jke)--
2993
| 3 2 5
Jodoigne, Belgium
--Jérémy Kersten (jke)--

Jérémy is a member of the core R&D team since september 2013. He developed several projects for OpenERP version 8 including the eCommerce, the Google Calendar synchronization and the new product variants/configurator. Now, he manages Odoo website and themes for saas.

Jérémy Kersten (jke)
On 6/16/16, 4:01 AM

When you declare your many2many, you can choose/force yourself the tbl with the key relation.

More info here... http://odoo-new-api-guide-line.readthedocs.io/en/latest/fields.html#many2many


arel_ids = fields.Many2many(comodel_name='res.users',
relation='table_name',
column1='col_name',
column2='other_col_name')
Specific options:
    comodel_name: name of the opposite model
    relation: relational table name
    columns1: relational table left column name
    columns2: relational table right column name


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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 6/16/16, 3:09 AM
Seen: 346 times
Last updated: 6/16/16, 4:43 AM