I would like to override the default behaviour of my procurements. I would like to create a different purchase_order_line for every sale order, even if the product is the same.
Example:
- I'm selling 10 "product A" in the sale order SO100
- I'm then selling 20 "product A" in the sale order SO101
This will create 2 procurement, that each have their own "source document" (SO100 and SO101)
But when those procurement are runned by the scheduler, they "merge" on a single purchase_order_line on the generated request for quotation ("buy 30 "Product A").
I already overrided the methode make_po() so it create a new line if the "source document" is not the same. But the 2 procurement are not directly added to the purchase order. Instead, they each create a new procurement with source document "OP/00001", which are then added to my request for quotation... Losing the original source document (the sale order) in the process..
does anybody knows how i could override that behaviour? I would like to know what method creates those procurement so i could change their source document...
Thanks a lot for any help!