There are some business (furniture business for example) that sell both services and goods to their customer. Customers are able to buy the furniture but also, if they need it, the assembly of the furniture they just bought.
It gets complicated when the company intends to use the
shipment invoice method. In this case tryton will generate a first invoice with the service line and then one or more invoice when the shipments are done.
The proposal is to add a new module defining a new invoice method that would only invoice the services when the goods are sent.
I think that Tryton should support the fact that different services are related to different goods and thus invoice only the right service when the right goods are sent. Thus I think that a way to group sale lines together should be defined, probably a new object that would be put on every lines that relate together.
Another open question is when should the service be invoiced. According to me the default behavior should be that the service is invoiced as soon as the first related good is shipped (and thus invoiced) but the design should permit to change this easily.
The implementation will override
_get_invoice_line_quantity in order to return the quantity to be invoiced.