Comment 3 for bug 921866

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Kyle,

Thanks for your nice explanation here.

As per basic scenario (without running scheduler) we have used following formula for virtual stock and real stock.

Real Stock :-Incoming stock move (which is on done state)-Outgoing stock move(which is on done state)
Virtual stock :- Incoming stock move (which is on draft and waiting state) - Outgoing stock move(which is on draft and waiting state) + real stock

Now comes up to your point. Yes, you are right currently the PO's qty are calculated on virtual stock because If we don't calculated in it and then run the scheduler again and again then it will create a Purchase order more times which doesn't make sense;-)
Another point of view, If my product is manufacturing product (Supply method-> produce) which have component(procure method: make to order, supply method: buy) and I creates a Manufacturing Order for this product. Now I runs the scheduler then it will creates a PO for the component. So for this also component 's product comes on virtual stock and my production order goes into "ready to produce" state.

So this is an intensional behavior of OpenERP that when the purchase order created form the scheduler the it will be count in virtual stock.

I appreciate your efforts on this issue also about your solution which is described in last paragraph of your comment. Your suggested solution is very nice for this.So we can consider this as a "Wishlist".

You have suggested that we have cached values of the previous Purchase Orders that were generated form the scheduler and Each time the scheduler runs before it creates a new purchase order it should check against already created purchase orders. Then create a new one. But it becomes too sticky to check it and there is also lots of possibility that we have cancel that purchase order or we have changed the qty of PO then we have confirm it.

That's why currently I am considering this as an "Opinion" because before Implementing/Confirming this we need a more discussion on this. After a discussion over here we will decide the better solution for this and then we will set this as a "Wishlist" or any importance.

Correct me If I am wrong.

@Stock Accounting experts: Would you please share your views on this!

Thanks and more suggestions are welcomed!