Odoo Help

0

0
1 Answer
0
DuongLong
05-04-19 06:19

If you don't specify the relation table when define Many2many field odoo will create a new table name "test_model_product_template_rel" as relation table between "test.model" and "product.template", which mean your "m2m_1" and "m2m_2" are using the same relation table, if you want to separate them then you need to add "relation" option when m2m_2 is defined such as:

m2m_2 =fields.Many2many(comodel_name="product.template", relation="test_model_product_template_rel_2", column1="test_id", column2="product_tmpl_id")

and the "self" will be product.template
Stel een vraag
Writer
Labels
Keep Informed
1 volger(s)
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