Running Odoo 10 CE on Centos7 with python2.7. When viewing the Sales Analysis pivot table in the Sales app, selecting Date Order > Week on either axis is resulting in a traceback with the following error:
TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'datetime.date'
All other Date Order periods seem to work fine. I came across this post with a similar error: https://www.odoo.com/forum/help-1/question/odoo-v10-enterprise-unsupported-operand-type-s-for-datetime-datetime-on-fresh-install-of-blogs-module-new-blog-post-118028
The post there indicates updating the babel package fixed the issue, but there's no indication of what the required version was. I'm running the most up-to-date package available in-distro (v0.9.6) for python2.7, but the problem still occurs. The same error results when selecting Date Order > Week on the Purchase Analysis report as well.
Has anyone else seen this issue? Any advice for troubleshooting? Thanks in advance.
EDIT:
For reference here is the full traceback from the log:
533 4935 ERROR odoo-db odoo.http: Exception during JSON request handling.
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/odoo/http.py", line 642, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/site-packages/odoo/http.py", line 684, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python2.7/site-packages/odoo/http.py", line 334, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/odoo/service/model.py", line 101, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/odoo/http.py", line 327, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python2.7/site-packages/odoo/http.py", line 942, in __call__
return self.method(*args, **kw)
File "/usr/lib/python2.7/site-packages/odoo/http.py", line 507, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python2.7/site-packages/odoo/addons/web/controllers/main.py", line 895, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python2.7/site-packages/odoo/addons/web/controllers/main.py", line 887, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python2.7/site-packages/odoo/api.py", line 687, in call_kw
return call_kw_model(method, model, args, kwargs)
File "/usr/lib/python2.7/site-packages/odoo/api.py", line 672, in call_kw_model
result = method(recs, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/odoo/models.py", line 1939, in read_group
result = self._read_group_raw(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, lazy=lazy)
File "/usr/lib/python2.7/site-packages/odoo/models.py", line 2044, in _read_group_raw
result = [self._read_group_format_result(d, annotated_groupbys, groupby, domain) for d in data]
File "/usr/lib/python2.7/site-packages/odoo/models.py", line 1884, in _read_group_format_result
tzinfo=tzinfo, locale=locale
File "/usr/lib/python2.7/site-packages/babel/dates.py", line 508, in format_datetime
return parse_pattern(format).apply(datetime, locale)
File "/usr/lib/python2.7/site-packages/babel/dates.py", line 702, in apply
return self % DateTimeFormat(datetime, locale)
File "/usr/lib/python2.7/site-packages/babel/dates.py", line 699, in __mod__
return self.format % other
File "/usr/lib/python2.7/site-packages/babel/dates.py", line 726, in __getitem__
return self.format_week(char, num)
File "/usr/lib/python2.7/site-packages/babel/dates.py", line 797, in format_week
day_of_year = self.get_day_of_year()
File "/usr/lib/python2.7/site-packages/babel/dates.py", line 863, in get_day_of_year
return (date - date_(date.year, 1, 1)).days + 1
TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'datetime.date'
Need your functions and errors
Not sure what you're asking for. There is no custom code referenced. I've included the full traceback from the log now. Thanks for your time.