This question has been flagged

Hi everyone,

In Odoo 11, after I register a payment on customer credit note, I get this :

[img]https://i.ibb.co/7KSDtQC/Annotation-2019-12-30-160815.png[/img]

I edited the _get_payment_info_JSON function that is responsible on printing those payment lines to get the JSON code, and I got this:

 
{"title": "Less Payment", "outstanding": false, "content": [{"name": "Customer Payment: INV/2019/2", "journal_name": "Bank", "amount": 5534.9, "currency": "$", "digits": [69, 2], "position": "before", "date": "2019-11-19", "payment_id": 104444, "account_payment_id": 1, "invoice_id": false, "move_id": 41241, "ref": "BNK/2019/1"}, {"name": "/", "journal_name": "Customer Invoices", "amount": 1131.9, "currency": "$", "digits": [69, 2], "position": "before", "date": "2019-10-18", "payment_id": 104443, "account_payment_id": false, "invoice_id": 4202, "move_id": 41240, "ref": "INV/2019/1"}, {"name": "/", "journal_name": "Customer Invoices", "amount": 23.1, "currency": "$", "digits": [69, 2], "position": "before", "date": "2019-10-18", "payment_id": 104442, "account_payment_id": false, "invoice_id": 4202, "move_id": 41240, "ref": "INV/2019/1"}]}

There are three elements in this JSON files, each represents a line from the picture, but the weird part is that the first element does not have an invoice id, and the 2nd & 3rd references to the invoice 4202, however my current invoice is 3802, Is-this some simple config/mistake from my part & have I gone far with the debugging or is-something wrong going on ?

Thank you


Avatar
Discard