From f165bec6629f04d13717eff6ae887546676dcb37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=A7?= Date: Wed, 25 Jun 2025 09:42:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=85=E5=AE=8C=E5=B7=A5=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E6=98=8E=E7=BB=86=EF=BC=8C=E6=8E=A7=E5=88=B6=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E4=B8=BA=E5=A4=A7=E4=BA=8E48=E5=B0=8F=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=B0=8F=E4=BA=8E=E5=BD=93=E5=89=8D=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_machine_connect/controllers/controllers.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) 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小时前的时间