Minimum stock rule does not generate a purchase order

Bug #631695 reported by Jean-Luc WEYL
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Undecided
JMA(Open ERP)

Bug Description

A similar problem has already been discussed in #599300; a solution has been suggested, but works only if the minimum stock rule has a min quantity of 0.
There is still a problem if the min quantity of the stock rule is not equal to 0:
- Create a stockable product PROD1, with procure method = MTS, suppy method = buy, a minimum stock rule with min quantity = 10 and max quantity = 20, and no stock
- Sell 15 PROD1
- Run the "Compute Stock Minimum Rules Only" scheduler and check the "Automatic orderpoint" box.
2 purchase orders have been created : 1 for 15 PROD1 (origin=SCHEDULER) and 1 for 20 PROD1 (origine OP/00002). That's OK. PROD1 has a virtual stock of 20.
- Now sell for example 16 PROD1
- Run again the "Compute Stock Minimum Rules Only" scheduler and check the "Automatic orderpoint" box.
NO PURCHASE ORDER IS CREATED???
Virtual stock for PROD1 is 4, less than the minimum stock rule, and no purchase order is generated.

Changed in openobject-addons:
assignee: nobody → JMA(Open ERP) (jma-openerp)
Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :

Hello Jean-Luc WEYL,

I have thoroughly gone through your posted scenario.
I also agree that no purchase order is created for the above stated scenario.

The 'Compute Stock Minimum Rules Scheduler' wizard takes into consideration the 'Virtual Stock' of the product that you are dealing with based on the Min & Max quantity assigned prior to it using 'Minimum Stock Rules'.

So, when you have the Virtual Stock less than the Min. qty assigned the purchase order wont be generated using the wizard.

The reason is , in schedulers.py we have the following condition:
if prods < op.product_min_qty:

So the PO will not be created and this seems to be a very generic behaviour.
However, you can use the other scheduler and the PO will be created for it.

I hope this makes things clear.

Thanks.

Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :

Hello Jean-Luc WEYL,

With respect to the last post, the only reason that hinders your is the check:
            if prods < op.product_min_qty:

I hope this makes sense. It's not a bug but a condition that is checked.
And this is very generic.

I close this bug.
Thank you.

Changed in openobject-addons:
status: New → Invalid
Changed in openobject-addons:
milestone: none → 5.0.15
Revision history for this message
lucky kurniawan (kurniawanlucky) wrote :

Hello, i have a question
Odoo Product Routes:Make to Order Or Product With Rules Minimum Qty = 0,
because if we have sale and run scheduler, same create PO
what better and What is the effect make to order or rules minimum qty = 0?
thank's

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.