调整待完成工单明细
This commit is contained in:
@@ -767,11 +767,14 @@ class Sf_Dashboard_Connect(http.Controller):
|
|||||||
|
|
||||||
for line in line_list:
|
for line in line_list:
|
||||||
# 未完成订单
|
# 未完成订单
|
||||||
not_done_orders = plan_obj.search(
|
# not_done_orders = plan_obj.search(
|
||||||
[('production_line_id.name', '=', line), ('state', 'not in', ['finished']),
|
# [('production_line_id.name', '=', line), ('state', 'not in', ['finished']),
|
||||||
('production_id.state', 'not in', ['cancel', 'done']), ('active', '=', True)
|
# ('production_id.state', 'not in', ['cancel', 'done']), ('active', '=', True)
|
||||||
|
# ])
|
||||||
|
not_done_orders = request.env['mrp.workorder'].sudo().search(
|
||||||
|
[('production_line_id.name', '=', line), ('state', 'in', ['ready', 'progress']),
|
||||||
|
('routing_type', '=', 'CNC加工')
|
||||||
])
|
])
|
||||||
# print(not_done_orders)
|
|
||||||
|
|
||||||
# 完成订单
|
# 完成订单
|
||||||
# 获取当前时间,并计算24小时前的时间
|
# 获取当前时间,并计算24小时前的时间
|
||||||
@@ -823,16 +826,18 @@ class Sf_Dashboard_Connect(http.Controller):
|
|||||||
'draft': '待排程',
|
'draft': '待排程',
|
||||||
'done': '已排程',
|
'done': '已排程',
|
||||||
'processing': '生产中',
|
'processing': '生产中',
|
||||||
'finished': '已完成'
|
'finished': '已完成',
|
||||||
|
'ready': '待加工',
|
||||||
|
'progress': '生产中',
|
||||||
}
|
}
|
||||||
|
|
||||||
line_dict = {
|
line_dict = {
|
||||||
'sequence': id_to_sequence[order.id],
|
'sequence': id_to_sequence[order.id],
|
||||||
'workorder_name': order.name,
|
'workorder_name': order.production_id.name,
|
||||||
'blank_name': blank_name,
|
'blank_name': blank_name,
|
||||||
'material': material,
|
'material': material,
|
||||||
'dimensions': dimensions,
|
'dimensions': dimensions,
|
||||||
'order_qty': order.product_qty,
|
'order_qty': 1,
|
||||||
'state': state_dict[order.state],
|
'state': state_dict[order.state],
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user