Outsourced manufacturing

(Cédric Krier) #1


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 Many2One is added to the production.routing.
  • A Many2One to product is added to the production.routing which is required if the supplier is filled and is of type service.
  • A Many2One to 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 validate).

When the production goes back to draft or 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.



Future Improvement

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

(Cédric Krier) #2

There is an ambiguity for the quantity of purchased service. Of course it will depend on the production quantity (which has a unit of measure from the produced product). But the purchased service may have a different unit of measure that may be not compatible.
I think there are two options:

  • use the quantity of the production as if it is expressed in the service unit of measure;
  • put a conversion ratio between production unit and service unit on the routing.

The second option makes the UI more complex but it does not force to have the purchase unit of the service linked to the produced product unit.

(Cédric Krier) #3

I decided to use as quantity the factor between the BoM and the production order.
I think it works pretty well because the routing is linked to the BoM’s so the routing defined the cost to produce the basis BoM.

(Cédric Krier) #4

Here is the implementation: https://bugs.tryton.org/issue7482

(albert) #5

I think that creating purchases forces the company to know to which supplier productions will be sent to in advance but in many cases that may not be the case. So it seems that it would give more flexibility to use purchase requests. At least that’s what we did when we implemented production_subcontract module [1].

Of course, one could also create several routes depending on the suppliers that will be in charge of each production step, but it seems to me that it may require to create too many routes when it’s something that could be decided by the purchase department for each case.

[1] https://bitbucket.org/nantic/trytond-production_subcontract

(Cédric Krier) #6

But this is precisely the definition of the routing, it defines how the production will be done. Outsourced the production is not something that is ad-hoc. Generally it is part of a general agreement and so you have a preferred supplier. In case the production is done on an external warehouse, you must know in advance where you are producing to have the correct order points, see:

Also if you use purchase request, you can no more have the exact purchase price of the service as the request may be grouped with other requests into a single purchase line.

(albert) #7

That really depends on one’s experience. All the cases I’ve seen so far, including of a couple of a existing customers, they have several possible suppliers (two or three) and send the job to one of them depending on supplier’s load or some other criteria that cannot generally be planned.

(Cédric Krier) #8

It must be planned at some point. And this must be planned before starting the production so the routing can still be changed.