[FIX] account: amounts in dashboard should include today

This commit is contained in:
qdp-odoo
2018-02-01 16:48:33 +01:00
parent f4ee938328
commit 0d66631f1e
@@ -189,7 +189,7 @@ class account_journal(models.Model):
query_results_drafts = self.env.cr.dictfetchall()
today = datetime.today()
query = """SELECT amount_total, currency_id AS currency, type FROM account_invoice WHERE journal_id = %s AND date < %s AND state = 'open';"""
query = """SELECT amount_total, currency_id AS currency, type FROM account_invoice WHERE journal_id = %s AND date <= %s AND state = 'open';"""
self.env.cr.execute(query, (self.id, today))
late_query_results = self.env.cr.dictfetchall()
(number_waiting, sum_waiting) = self._count_results_and_sum_amounts(query_results_to_pay, currency)