【发布时间】:2021-07-06 02:37:58
【问题描述】:
我遇到了问题this.get_critical_paths(events).done is not a function
当我尝试调试问题时,我可以看到
console.log(paths)
然后我得到了这个
Unhandled Promise Rejection: ReferenceError: Can't find variable: paths
我不确定如何解决该问题。
这是应该返回paths var
@api.model
def calc_critical_paths(self, project_ids):
res = {}
projects = self.env['project.project'].browse(project_ids)
for project in projects:
res.update({
project.id: self.calc_critical_path(project)
})
return res
我正在尝试升级The project timeline critical path
if (this.modelName === 'project.task') {
this.get_critical_paths(events).done(function(paths) {
this.critical_paths = paths;
this.draw_canvas();
}.bind(this));
}
请提出改进问题的建议,而不是忽略它
【问题讨论】:
标签: javascript python odoo odoo-11 odoo-14