Odoo Help


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.


What is stock_move's move_dest_id field? What relation does it have to pickings and stock move assignment?

on 4/15/13, 5:15 PM 1,358 views

This is my current understanding of OpenERP's stock system, please correct me or confirm my understanding.

Stock moves in OpenERP represent a move of products from one stock.location to another. A stock.location represents a physical place or a virtual concept for products that are incoming or outgoing.

When a product is needed in a stock.location, a procurement.order is created to fulfill the requirement. This procurement.order has a stock.move move_id attached to it, assigned / created when the procurement.order transitions from the draft to the confirmed state.

The procurement.order's state tracks the progress of obtaining a stock move, and will only transition to the ready or complete state when the stock move's state is set to assigned or done. This is checked for make_to_stock procurements whenever the procurement moves past the confirmed state, and depending on the stock move's state, the procurement can then move to ready, complete, or exception. This is checked formake_to_order` procurements when the procurement's subflow (buy or produce) is completed.

When a stock.move is completed by any means (state changes to done via action_done()), it moves from the waiting or confirmed state to the assigned state. At this point, if the move_dest_id field is not empty, the code checks to see if all other moves with the same move_dest_id field are done. If so, the destination move is marked complete as well (recursively).

So I have a few questions:

  1. What is the point of move_dest_id? Is it more or less a way to skip having manual make_to_stock procurements all over the place when a chain of moves is desired?

  2. What exactly is this move chain for? I seem to be able to follow it from a sales order move line, into a procurement, through a MO, past the finished product, through each of the component products, though their procurements, through more MOs, etc. Can this be used to display the full path / full chain of products that are needed to ship a sales order line?

Vince Vinet
On 12/12/14, 2:22 PM

The move_dest_id, and the move chain, are used to track when a move depends on another move being made before it. In the case of procurements and ordering rules generating MOs for parts, MOs for complete products, all the way to a delivery order, it can indeed let you "see" the full chain of moves that you need to complete in order to complete the sale order.

Moves set up in this fashion will often end up in the "waiting" (Waiting Another Move) state, indicating that you need to complete other moves before being able to process this one.


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

0 follower(s)


Asked: 4/15/13, 5:15 PM
Seen: 1358 times
Last updated: 3/16/15, 8:10 AM