0

在这种情况下,日期有问题我正在尝试根据开始和结束日期进行一些日期计算,但由于某种原因,这个错误不断给出问题

回溯错误是:

Error:
Odoo Server Error

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/http.py", line 639, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/odoo/src/odoo/odoo/http.py", line 315, in _handle_exception
    raise exception.with_traceback(None) from new_cause
ValueError: <class 'TypeError'>: "'datetime.datetime' object is not callable" while evaluating
'action=model.update_all_project_history()'

代码:

if not date_start() > role.date_start.date() and role[index + 1] != False:
   date_end = role.date_start - timedelta(days=1)

我相信这if not可能是导致此问题的原因。

4

0 回答 0