Hi all,
My scenario is quite simple. I want to post a large down payment to my supplier and later on pay small invoices one at the time. For this, I am working with the 'account_voucher' module and what I do is the following:
1. Go to Accounting-> Suppliers -> Supplier Payment. In this form, just enter the Supplier, Total (1000), Date, Payment Method ('Cash') and 'Keep Open' as Payment Difference. I press 'Validate'.
2. Go to Accounting-> Suppliers -> Supplier Invoices. Here, I create an Invoice for the same Supplier with a Total of 200.
3. Then I go back to Accounting-> Suppliers -> Supplier Payment. I select my Supplier and I see that both transactions are being displayed correctly in the upper and lower grids. Moreover, the lower 'Credits' grid is displaying the Original Amount of 1000 and has suggested the editable amount of 200 automatically. So I just go ahead (leaving the header Total in zero and 'Keep Open' as payment difference) and press 'Validate'.
4. When I check back to Accounting-> Suppliers -> Supplier Payment and I select my Supplier, a line is shown in the upper 'Supplier Invoices' grid with an Original Amount of 200 and an Open Balance of 800.

. Also, my initial 1000 down payment is no longer displayed in the lower 'Credits' grid, even though I still should have an amount to pay further Invoices.
So am I doing something wrong in my procedure? Or is such a scenario not supported?
I have dived a little bit into the data and the code and I see that the 'account.move.line' related to my initial 1000 payment is being skipped because it has an assigned 'reconcile_partial_id' (which makes no sense to me, because being a PARTIAL reconciliation it should still be good for further payments). Also, I see that the line that IS being displayed on the upper grid corresponds to one of the 'account.move.line' that got created as a result of my step 3 (which, even though has an assigned 'reconcile_partial_id' too, is being taken into consideration because it has no 'line.debit' and thus getting appended to the 'line_dr_ids' block).
Could there be a bug? Or can someone please explain to me the logic behind this code.
I'd really appreciate any help on this. Thanks a lot for the good work kept up on this forum.
Nicolas Bustillos