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.

2

[Stock] How does parent left and parent right working in backend for stock_location?

By
Anil R. Kesariya
on 4/13/15, 6:19 AM 1,358 views

Hello everybody,

How does parent left and parent right working in stock_location,

I was working with multiple warehouse, some how different warehouse was configured in sales and purchase for few records, it suppose to be same, It was causing problem on updating quantity.

I fixed it by applying update queries , I have reset the parent left and right which assigned base functionality  but how dose it impact I have no idea.

Does anyone know regarding that concept?

Thanks and regards,

Anil.





1

Brett Lehrer

--Brett Lehrer--
1252
| 5 4 8
Milwaukee, United States
--Brett Lehrer--
Director of IT and open source enthusiast.
Brett Lehrer
On 4/16/15, 8:06 PM

The parent_left and parent_right fields are an implementation of the Nested Set Model concept of relational databases, and not exclusive to stock_location.  There are a number of scenarios where they are used to define nested hierarchy: account_account, product_category, ir_ui_menu, etc.  The idea is that given any one record, the parent_left and parent_right fields can define all of the children, children of children, and so on found under that record, and in O(1) complexity.  SerpentCS has written up a much better explanation of this concept already: http://www.serpentcs.com/serpentcs-openerp-parent_left-parent_right-explained

Thanks Brett.

Anil R. Kesariya
on 4/16/15, 9:38 PM

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

1 follower(s)

Stats

Asked: 4/13/15, 6:19 AM
Seen: 1358 times
Last updated: 4/16/15, 9:36 PM