0

我正在运行 Odoo13 制造应用程序。在制造订单中单击“计划”时出现错误。安装会计应用程序并在 BOM 中为产品创建供应商后发生此错误。

我的订单视图以图像形式给出:

在此处输入图像描述

错误:

Odoo Server Error

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/http.py", line 619, in _handle_exception
        return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo/src/odoo/odoo/http.py", line 309, in _handle_exception
       raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/home/odoo/src/odoo/odoo/tools/pycompat.py", line 14, in reraise
       raise value
File "/home/odoo/src/odoo/odoo/http.py", line 664, in dispatch
       result = self._call_function(**self.params)
File "/home/odoo/src/odoo/odoo/http.py", line 345, in _call_function
       return checked_call(self.db, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/service/model.py", line 93, in wrapper
       return f(dbname, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/http.py", line 338, in checked_call
       result = self.endpoint(*a, **kw)
File "/home/odoo/src/odoo/odoo/http.py", line 909, in __call__
       return self.method(*args, **kw)
File "/home/odoo/src/odoo/odoo/http.py", line 510, in response_wrap
       response = f(*args, **kw)
File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1323, in call_button
       action = self._call_kw(model, method, args, kwargs)
File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1311, in _call_kw
       return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/src/odoo/odoo/api.py", line 395, in call_kw
       result = _call_kw_multi(method, model, args, kwargs)
File "/home/odoo/src/odoo/odoo/api.py", line 382, in _call_kw_multi
       result = method(recs, *args, **kwargs)
File "/home/odoo/src/enterprise/mrp_workorder/models/mrp_production.py", line 13, in button_plan
       res = super(MrpProduction, self).button_plan()
File "/home/odoo/src/odoo/addons/mrp/models/mrp_production.py", line 690, in button_plan
       order._plan_workorders()
File "/home/odoo/src/odoo/addons/mrp/models/mrp_production.py", line 725, in _plan_workorders
       if to_date < best_finished_date: TypeError: '<' not supported between instances of 'bool' and 'datetime.datetime'
4

1 回答 1

0

从 Odoo git repo 拉取最新的代码,你会发现这个错误已经消失了:

https://github.com/odoo/odoo/blob/13.0/addons/mrp/models/mrp_production.py#L736

if to_date < best_finished_date

变成

if to_date and to_date < best_finished_date
于 2020-01-15T10:40:33.383 回答