Impacted versions:
11.0
Steps to reproduce:
Current behavior:
Expected behavior:
-Amount due should be zero and extra amount should go to Outstanding credits
Video/Screenshot link (optional):


AFAIK, this is an uncovered case. The easiest solution is to prevent to create that kind of down payment instead of changing logic for creating a refund.
What do you think, @qdp-odoo?
I don't think its a problem
Customer balance with the negative amount shows customer balance, even if you create a down payment more then the order amount.
Look at closely, the final invoice creates the credit note not an invoice, so even if you register payment it is already a refund.
I don't think we should prevent anything as it gives flexibility to mange more business case rather preventing anything.
Look at https://drive.google.com/file/d/1Cqys3EkW_DJtURW3xYlMNIwkdIK3eMD5/view advance payment can be refund or adjusted against the next invoice.
Thanks for the video, @mga-odoo. Then it's clear this is not a bug, so closing.
Most helpful comment
I don't think its a problem
Customer balance with the negative amount shows customer balance, even if you create a down payment more then the order amount.
Look at closely, the final invoice creates the credit note not an invoice, so even if you register payment it is already a refund.
I don't think we should prevent anything as it gives flexibility to mange more business case rather preventing anything.
Look at https://drive.google.com/file/d/1Cqys3EkW_DJtURW3xYlMNIwkdIK3eMD5/view advance payment can be refund or adjusted against the next invoice.