Odoo Help

1

Many2Many relationship but sorted with 'weighted' values

By
Alex Barylski
on 5/21/15, 9:21 AM 750 views

Normally (I assume) when you use the many2many relationship the ORM creates a junction table for you and the order in which the records are returned for either direction is the order in which they were created/populated the database.


I have a situation where I have two entities:

 - Procedures

 - Sequences


The same sequence can be associated with more than one procedure, however each procedure has a unique sort order. 

For instance procedure A, B, C may reference dozens of Sequences, but all share Sequence B, however Sequence B may be the first sequence on Procedure A, the second last on Procedure B, etc...


Would I solve this problem by simply introducing the junction table explicitly in the model - using double one to one relationships?

Good question, I am also interested in the relationship many2many the possibility of setting priorities.

Zbik
on 6/11/15, 9:07 AM

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 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

Question tools

1 follower(s)

Stats

Asked: 5/21/15, 9:21 AM
Seen: 750 times
Last updated: 6/11/15, 9:07 AM