Commit cec53239 by 夏超

[fix] 生产进度查询

parent 86413587
......@@ -99,8 +99,11 @@ class RokeWorkstationTaskModel(http.Controller):
return {"code": 0, "message": "获取成功", "data": task_list, "count": task_counts}
for v in task_ids:
data = get_work_order(v, complete_basis)
task_str = ""
if "-" in v.code:
task_str = v.code.split('-')[0]
sub_task = _self.env["roke.production.task"].sudo().search([("task_type", "=", "sub"),
("main_task_code", "=", (v.code or "") + "-1")],
("main_task_code", "=", task_str)],
order="code asc")
data["children"] = [get_work_order(child, complete_basis) for child in sub_task]
task_list.append(data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment