Odoo Help


Auto generating a purchase order when a product with quantity 0 is ordered

Ahmed Ababneh
on 10/19/15, 6:09 AM 3,053 views


When the product has quantity on hand equal to zero, and customer orders this product, then, we need Odoo to generate a purchase order automatically for this product.

Odoo is not generating the automatic PO. We have Odoo 8.

As for an example, I created a test product. I ticked "Buy" check box, and unticked the"Make to order" check box. I added a vendor (has an address) on the product as follows:

Supplier: Old Stocks

Delivery Lead Time: 0

Minimal Quantity: 1.00

I also created a reordering rule for this product:

Name: PO/8406724

Product: [9781452555508] Would Our Legacy Survive?

Warehouse: Amman Stock

Location: AmmWH/Stock

Minimum Quantity: 5.000

Maximum Quantity: 20.000

Quantity Multiple: 1.000

I made a purchase order for this product, and transferred the delivery order. The quantity on hand became 4 (less than the min. quantity in the reordering rule). Run the schedulers from Warehouse -> Run Schedulers. However, the RfQ was not created.

What should I do to get an RfQ auto-generated, when the there is sales order for a product with "Quantity on hand" equal to zero?

Thanks you :)

By the way, we have about 10 million products

Ahmed Ababneh
on 10/19/15, 7:07 AM

Make sure your product is of type "Stockable Product".

Serpent Consulting Services Pvt. Ltd.
on 10/19/15, 7:54 AM

Yes, it is stockable

Ahmed Ababneh
on 10/19/15, 9:22 AM

Multicompany environment? Module procurement_jtt instaled or not? Module procurement_jtt_stock instaled or not?

on 10/19/15, 11:08 AM
On 10/19/15, 9:08 AM

I faced the same issue as we wanted to automatically generate POs in draft. Weused the following configuration:

We set up a reordering rule with a minimum quantity of 0. This was done for every product

By doing that, when a customer orders something which exceeds available stock, your stocked amount will be less than zero, triggering the reordering rule.


- the item needs to have a defined supplier, otherwise no purchase order will be generated.

- not sure if the item needs to be stockable

- you have to execute the planner in the warehouse menu (there is a scheduler that can be activated to execute that planner every m minutes).

Maybe there is a way to do something that might apply to all products, but I do not know how to do that (it would be interesting).

Any further automation or group configuration you might achieve, please share. Having to add a restock rule for every product is cumbersome.

Hope this helps,

Thanks my friend .. So, where can I exactly find the planner in the warehouse menu? I can only see "Schedulers->Run Schedulers" and "Schedulers>Compute Stock Minimum Rules Only" options.

Ahmed Ababneh
on 10/19/15, 9:21 AM

Settings -> Technical -> Automation -> Planned Action -> Run mrp scheduler. It is disabled by default. However I wonder how that could be triggered automatically everytime a new sales order is generated.

on 10/19/15, 2:51 PM

And to execute it manually it should be schedulers-> compute stock minimum rules only

on 10/19/15, 2:52 PM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

3 follower(s)


Asked: 10/19/15, 6:09 AM
Seen: 3053 times
Last updated: 1/25/17, 8:24 PM