I was wondering why there is no function on Tryton to group multiple purchase requests from different employees for the same product into a single purchase line?
Also if the purchaser can manually choose the same supplier for many requests, why there is no wizard or feature in Tryton to group all those requests for the same supplier into a single purchase order automatically? Is there a logic or workflow restriction for which this hasn’t been done or it just that it hasn’t been implemented?
It is always a best practice to group what’s needed in a company into fewer purchase orders, as it simplifies receiving, supplier payments follow up, and possibly negotiate better price for larger quantities.
Why do you say there is no grouping?
If you create purchase for multiple requests with the same supplier and product it will create a single purchase request related to all purchase.
You just need to create the purchases of all request in a single step to force the grouping.
Thank you for the response. Before writing my previous post I may have run some tests with different requests for the same product but with different suppliers and got confused that different purchase orders were generated.
Now after running more tests as you suggested, I can see that indeed Tryton groups multiple requests into a single purchase order.
However, I noticed that within the generated purchase order, each request for the same product is listed in separate lines in the order. Is there a way to merge them into a single purchase line?
The reason I want to do this is that our suppliers will find it awkward and confusing to see multiples lines for the same product, and when we receive the supplier invoice the number of lines will not match to that generated from the purchase, since the supplier will combine all the quantities of the same product in a single line.
No because we need to keep a direct link with the purchase request.
You can “merge” lines when rendering the document sent to the supplier.
This is not a real issue as long as the amounts match.
Wouldn’t be enough for the purpose of updating the state of the purchase request by using a one2many relationship between the purchase order line to multiple purchase requests? At the end I believe the link is just so to handle the state update of the request when the purchase is completed, and also handling the exceptions when the purchase is cancelled. Either case, whatever happens to that particular purchase line (finished or cancelled) can update all the associated purchase requests.
The issue here is that I want to implement a module similar to document_incoming that will receive electronic invoices (XML documents) issued by the supplier and match them with the purchase order. So it is not just matching amounts.
Oops they are grouped as long as they are for the same product, unit and description.
But I think there is a problem when the description is empty or null, they are not grouped together.
Even with the correction you will have to deal with different number of lines. So you will probably have to do something like in