This question has been flagged
2 Replies
2723 Views

Accounting Dashboard shows wrong amount for 'payments awaiting' and 'payments to do', ie; it is showing the total open invoices amount, even some invoices are paid partially.

Avatar
Discard
Best Answer

Hello Firose:

In Odoo 11, You solve this by create a module and override _get_open_bills_to_pay_query function in account_journal_dashboard.py file and change amount_total field in query to residual AS amount_total  field as below:

Old Query:

return ("""SELECT state, amount_total, currency_id AS currency, type          
FROM account_invoice
WHERE journal_id = %(journal_id)s AND state = 'open';""", {'journal_id':self.id})

New Query

return ("""SELECT state, residual AS amount_total, currency_id AS currency, type          
FROM account_invoice
WHERE journal_id = %(journal_id)s AND state = 'open';""", {'journal_id':self.id})
Avatar
Discard
Best Answer

The amount calculated for 'late' payments (which may or may not show on the Dashboard depending on if you always receive payments from Customers on time and always pay Vendors on time) can also benefit from a corrected query similar to the one @waleed posted.

See: https://github.com/odoo/odoo/pull/25859


Avatar
Discard