[FIX] account: use datetime object
Unlike the name suggested, today is expected to be a datetime, not a date object Fixes odoo/odoo#27445
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user