Skip to Content
Menu
This question has been flagged
1 Reply
2627 Views

When a MO has been generated after the execution of the Inventory Scheduler and an RFQ and subsequent PO is issued to fulfill the BOM for the manufactured part we expect that the appropriate stock moves ( MO’s Consumed Materials: stock.move ) would be updated with the Purchase Order Line, Forecasted Quantity, Expected Date to fulfill the BOM’s requirement.

The primary goal is just to have an understanding of whether or not the parts have been ordered.

The stock.move has fields for the following

Purchase Order Line: purchase_line_id

Forecasted Quantity: availability

Expected Date: date_expected


I have found a bunch of code relating to the above fields which appear to try to update the stock.move records when the Purchase Order Line has been written to. These functions appear to be predicated on the purchase_line_id of the stock.move record. In my testing I have not found any purchase_line_id on the stock.move records which I expect is the cause of the issue.


Because Odoo identifies the stock.move records to update by searching for stock moves with the same purchase_line_id as the Purchase Order Line in question then Odoo can't do that if the field is not set.

So I guess my question is what would cause the purchase_line_id to not get written to the stock move and under what circumstances should I expect the purchase_line_id to be written to a stock move?

Avatar
Discard
Best Answer

Part are ordered when the Purchase Order is confirmed.  Although the reason the parts are being ordered is because there is a Manufacturing Order, there is no other relationship between the parts and the Manufacturing Order until after the parts are received and are then reserved.  Stock moves that the Manufacturing Order is expecting to be completed (when parts are consumed) trigger procurement of parts not in stock.  Stock moves that the Purchase Order is expecting to be completed (when parts are received) are separate.  The parts ordered might not even be the ones reserved for the Manufacturing Order.

Are you trying to determine from a specific Manufacturing Order if the parts for it have been ordered?


Avatar
Discard
Author

Yes. What is happening is we run the scheduler, the MO is generated, the RFQ is created and then confirmed. However it is not obvious when we look at the MO that these parts are on order.

Thanks very much Ray for taking the time to respond. I really appreciate your input.

Author

I am getting the feeling that we have imagined this functionality or link between the MO and the PO and as you said, it just is not there.

Correct. The parts ordered by the scheduler are aggregated from all the possible documents that can trigger procurements: reordering rules; sales orders; other manufacturing orders. You may need 15 for a single Manufacturing Order but 1,000 are ordered. There is no way to link the 15 you need to 15 of the 1,000 ordered. It is like when you order French Fries - it is up to the order that other people's needs to French Fries are processed that determine which actual French Fries are yours - and that isn't known until you know how many other people want them, in which sizes, and how many are dropped on the floor during packaging.

Author

Thanks Ray. I think this has answered my question. I am creating a follow up question regarding how best to know when to order inventory to avoid scope creep on this posting.

Thanks again!

Related Posts Replies Views Activity
1
Feb 23
2870
0
Feb 22
1132
1
Sep 21
1155
3
Aug 15
9392
5
Jun 15
3174