Comment 0 for bug 1028891

Revision history for this message
Niels Huylebroeck (red15) wrote :

Steps to reproduce:
* Open a Cash Register
* Create POS Order
* Click Make Payment
* Use cash register opened before
* Tick on 'Invoice' option
* At this point the pos.order is "Paid" but the invoice is not marked as such.

(optional)
* Close the used Cash Register
* Notice even now the invoice is still not marked as paid (the customer balance is now 0 but it is not reconciled)

Suggested fix:
When clicking "Make Payment" also create an account.voucher record and link this to the account.bank.statement.line (on voucher_id) that is being created by the "add_payment" method of model "pos.order". Also make sure to validate this voucher, as soon as this is done to make sure the Invoice will be marked as Paid immediately.
Also notice now that Closing the Cash Register will not produce another account.move.line for the payment (if the voucher_id had been linked on bank.statement.line)