I have the following scenario :
Let say a customer has an invoice of 50$. We register a payment of 100$ (maybe for a future invoice next month) and want to do a partial reconcile with the invoice so that the remaining of 50$ gets in the partner receivable balance (we could do another partial reconcile next month).
When the partial rencocile is done, the balance of the invoice is 0$ but it is not marked as paid because the test_paid() method checks that all move_lines have a reconcile_id set. But in this scenario, the move_lines have a partial_reconcile_id set. The invoice would be marked as paid only when we fully reconcile the credit amount of 100$ (the next month), but I would want that it is immediately marked as paid.
Do you know the reason why the invoice is still in the open state ? I thought of overriding the test_paid method to add a check that if balance is zero and all move_lines have a partial_reconcile_id, then it should go to paid state. But then I wondered why it is not working like that by default ? Would you suggest another way of doing this ?
I think some of changes made has affected it.. In standard, when you make a full payment, against an invoice, then it will be set it to paid... but if you make a partial payment, then it will still be in open state...
If you are making a payment through receipts/payments make sure you have selected the right invoice...