Odoo Help

Welcome!

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

0

Add field to procurements creation

By
Jerome Guerriat
on 11/12/15, 12:19 PM 454 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.
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!

0

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
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.



Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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