First of all go through Sales ‣ Products ‣ Product Name where we need to make sure about certain things that are, make sure that the options Can be Sold and Can be Purchased must be enabled as shown below.
And also make sure that the options Replenish on Order (MTO) and Buy must be enabled.
For easy understanding a test vendor is added here so that the order created will be easy to find among the other orders as it is in the name of test vendor. It can be added in the Purchase section by clicking Add a line.
Now create a new sales order.
You can see that here the customer is Test vendor 1 and the product is Test product 1. These two factors help us to identify our order easily among other orders. Once the order is created, SAVE it then click on the CONFIRM button to confirm it. Now open the Purchase Module then open the order that is created,
Here is the order, open it then CONFIRM it to get the below box.
Click on the Receipt, then you will get a box like below where the value of Demand will be 10.000 and Done will be 0.000, change Done from 0.000 to 10.000 as shown below then SAVE and VALIDATE.
Once again open Sales Module then Open the Order we created to get the below window.
Open the Delivery, where you can see Reserved is 10.000 and Done is 0.000, change Done from 0.000 to 10.000 as shown below.
Now SAVE then VALIDATE, so that we can get the below window.
In the above window Quantity is 10.000 and Delivered is 10.000, it is changed from 0.000 to 10.000 as we changed the value of Done from 0.000 to 10.000 in the above step. But the value of the Invoiced is still 0.000, so create an invoice by clicking on the CREATE INVOICE in the above figure.
Click on CREATE INVOICE, so that we can see that the value of Invoice is changed from 0.000 to 10.000. This is how we can trigger a purchase order based on sales.