I am wondering if there is an existing function/module to invoice a production to a customer?
Currently I’m trying to implement something like the (upcoming?) “sale_service_order” module and since all the necessary data like used goods (inputs) and spended time (timesheet) are collected during a production, maybe that’s a good starting point!?
For me it is not the job of a production to generate an invoice.
Indeed with sale_supply_production you can have a production order per sale. Then it will invoice either when the sale order is confirmed or when the goods is shipped.
Now if you need also to invoice the timesheet line of the production, I guess it is possible to create a module for that a little bit like project_invoice. But I’m not sure it is a frequent usage.
I have following use-case in mind: a shop builds products on customer demands - e.g. special electronic circuits. And often the customer change the specs of the product while in production - therefore the workflow can’t be projected on a normal “sale” (i think).
So I figured you can collect all the used goods and the time it took to make the product in the “production”-module and than simply create an invoice with the all related lines (goods + time) when done.
Do you think it makes sense to develop such a function or am i “barking up the wrong tree” and there is a simpler/better solution?
I do not see why.
Indeed you just need to have a way to adapt the sale price depending on the consumed parts.
For me it is the wrong place to create an invoice from the production order. Mainly because the producer should not be responsible of the invoicing. This is the job of the salesmen or the accountant.
For example we did not take the “invoice from shipment” of Odoo when Tryton forked and prefer to have a single document (the sale) responsible for the invoicing no matter the method.
PS: now Odoo has moved to this design as far as I know.
We’ve done that on some custom projects. You just need to set the sale origin unit price once the production is finished and invoice based on shipment. This will produce the expected result on the invoice.
mainly because the whole sale must be canceled if the order changes during production (e.g. the customer now wants that a “blue led” instead of the initially ordered red one to be used in the circuit).
this is because all used parts and the time needed for production must listed on the invoice. so the “red led” is a sale line wich can’t be edited after confirmation (or am i wrong?)
and “sale_admenment” doenst work because it doenst allow replacing a whole line (“blue led” instead of “red led”).
so I thought the idea of using “production” instead of “sales” for this use case might be a good one - because this seems to be much more flexible in terms of belated changes of an order.
This is completly possible, you just need to change the production inputs replacing the blue led with red led.
Then just use the origin of the invoice (which should be the sale line) to find all the productions, compute the used components and print them on the invoice.
This will ensure that all the components are printed on the invoice without altering the sale line.
Indeed if you use the sale_supply_production module you will have a single product on the sale and never the components used.
i just wanted to justify my statement here that i can’t use the “sale” module for my purposes, wherefore i looked into the “production” module as a starting point.
just because I can (as you said) easily modify the “inputs” here in case the order changed. whereas with the “sale” module i have to cancel the complete sale and create a new one.