Some companies outsource their production or part of it.
This means that the production cost comes from the purchase of the service to the manufacturer. And that no production works are needed as it is all done by the manufacturer.
There could have also cases where only a specific production work is done by a supplier on site. In this case the cost of the work should not be computed as number of cycle but from the purchase order for this service.
Only the outsourced production is solved.
- A supplier
Many2Oneis added to the
Many2Oneto product is added to the
production.routingwhich is required if the supplier is filled and is of type
Many2Oneto a product supplier is optional. The domain will enforce that it belong on the product and supplier.
When the production goes in
waiting state, a purchase order is created for each production grouped by supplier. A purchase line is linked with a
production field to the production order. The cost of the production will include the amount of the purchase lines (in state
When the production goes back to
cancel, the linked purchase line will be deleted (if allowed).
To allow to go to the
done state, the linked purchase must be at least validated.
- Recompute the production cost, if the amount of invoice lines are different from the purchase lines.
- Limit routing to some warehouses. The outsourcing production may happen in an external warehouse, so inputs should be ship there.