Odoo Help


Add field to procurements creation

Jerome Guerriat
on 11/12/15, 12:19 PM 859 views

 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.

- 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!



| 6 5 7
Lodz, Poland

On 11/12/15, 1:24 PM

My suggestion, you read stock module documentation, located in /addons/stock/doc.stock.rst, particularly about the differences between MTO (Make to Order) and MTS (Make To Stock).Othert topic in this doc  (Procurement group propagation) is dedicated for you.

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

1 follower(s)


Asked: 11/12/15, 12:19 PM
Seen: 859 times
Last updated: 11/12/15, 2:49 PM