From 6c9c871d089a160f08a5ca4656e0208f6e8d9051 Mon Sep 17 00:00:00 2001 From: Swapnesh Shah Date: Thu, 1 Nov 2018 17:06:32 +0000 Subject: [PATCH] [FIX] account: Use correct date based on user TZ closes odoo/odoo#28335 Signed-off-by: Quentin De Paoli (qdp) --- addons/account/models/account_journal_dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_journal_dashboard.py b/addons/account/models/account_journal_dashboard.py index 975659cc377..a59966157d3 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -169,7 +169,7 @@ class account_journal(models.Model): LEFT JOIN account_move move ON aml.move_id = move.id WHERE aml.account_id in %%s AND move.date <= %%s AND move.state = 'posted';""" % (amount_field,) - self.env.cr.execute(query, (account_ids, fields.Date.today(),)) + self.env.cr.execute(query, (account_ids, fields.Date.context_today(self),)) query_results = self.env.cr.dictfetchall() if query_results and query_results[0].get('sum') != None: account_sum = query_results[0].get('sum')