Odoo Help


Create relationship with Underlying Many to Many table in another relationship

on 7/12/16, 4:23 PM 365 views

I have created a model which allows be to create a group of Products under a Product for the purposes of identifying potential Alternative Parts

So For example I have the following Parts in my inventory

Part A
Part A1
Part A2
Part A3
Part B
Part B1
Part B2
Part B3
Part C
Part C1
Part C2
Part C3

Under the Product.template I have a Many2Many field that links to a Model so I can list "Potential Alternative Parts".

So under "Part A" I have "Part A1", "Part A2", "Part A3" listed as "Potential Alternative Parts"

Under "Part B" I have "Part B1", "Part B2", "Part B3" listed as "Potential Alternative Parts"

and under "Part C" I have "Part C1", "Part C2", "Part C3" listed as "Potential Alternative Parts".

What I am trying to do now, is under the BoM Line model add a field of "Approved Alternative Parts"

So basically if I add "Part A" as a line item, I should be able to select from "Part A1", "Part A2" or "Part A3" as "Approved Alternatives"

Business Reason is under the product would be our way of determining what WE will are equivalent parts.  But under the BoM would be where the alternative parts would be approved or not for that particular assembly.

Problem I am having is I cannot figure out how to create a relationship with the generated "x_product_template_product_template_rel" table so that I can select from its records in my Many2Many relationship I created on the BoM line

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.


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)


Asked: 7/12/16, 4:23 PM
Seen: 365 times
Last updated: 7/12/16, 6:42 PM