Let's assume we have a sale order and an invoice for this sale order for a partial payment and the invoice has it's number and is paid.
When creating invoice for the remaining amount the invoice has:
1 row in which is the full amount of the sale
1 row in which is described the partial payment (e.g. "advance payment 50%" or "advance payment 2000Euro" or "advance payment for some product"). (sometimes it's possible to have more than 1 rows like this)
We need to have in every row, describing payment in advance, the number and the date of the invoice for the current partial payment.
Is there any way to achieve this?
After some digging in the python code I have found that the lines in the invoice for advance payment are created during the process of invoice creation. The invoice is created in "draft" status when there is no number given. When creating an invoice for the final payment on the sale order, OpenERP lists the lines in all invoices for advanced payment.
I think that it will be possible to change this and I'll try to find where should the replacement of the listing of all lines with listing just invoices with their amounts should happen.