diff --git a/sf_machine_connect/controllers/controllers.py b/sf_machine_connect/controllers/controllers.py index 25fda400..96461902 100644 --- a/sf_machine_connect/controllers/controllers.py +++ b/sf_machine_connect/controllers/controllers.py @@ -912,17 +912,10 @@ class Sf_Dashboard_Connect(http.Controller): # ]) not_done_orders = work_order_obj.search(work_order_domain + [ ('state', 'in', ['ready', 'progress']), - ('date_planned_start', '>=', time_48_hours_ago) + ('date_planned_start', '>=', time_48_hours_ago), + ('date_planned_start', '<=', current_time) ], order='id asc' ) - # not_done_orders = request.env['mrp.workorder'].sudo().browse(plan_order_messages.mapped('res_id')) - # if line == '业绩总览': - # not_done_orders = not_done_orders.filtered(lambda o: o.routing_type in ['人工线下加工', 'CNC加工']) - # elif line == '人工线下加工中心': - # not_done_orders = not_done_orders.filtered(lambda o: o.routing_type == '人工线下加工') - # else: - # not_done_orders = not_done_orders.filtered(lambda o: o.routing_type == 'CNC加工' and o.production_line_id.name == line) - # 完成订单 # 获取当前时间,并计算24小时前的时间