Skip to content
Snippets Groups Projects
Unverified Commit 35151b62 authored by Martin Trigaux's avatar Martin Trigaux
Browse files

[FIX] account: use datetime object

Unlike the name suggested, today is expected to be a datetime, not a date object

Fixes odoo/odoo#27445
parent 23bec7fb
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,7 @@ class account_journal(models.Model):
@api.multi
def get_bar_graph_datas(self):
data = []
today = fields.Date.context_today(self)
today = fields.Datetime.now(self)
data.append({'label': _('Past'), 'value':0.0, 'type': 'past'})
day_of_week = int(format_datetime(today, 'e', locale=self._context.get('lang') or 'en_US'))
first_day_of_week = today + timedelta(days=-day_of_week+1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment