去掉工单明细处删除按钮;已完成工单取24小时内

This commit is contained in:
mgw
2024-09-23 12:08:02 +08:00
parent 68f8c94332
commit 5269d09d0e
2 changed files with 11 additions and 1 deletions

View File

@@ -626,10 +626,16 @@ class Sf_Dashboard_Connect(http.Controller):
('production_id.state', 'not in', ['cancel', 'done']), ('active', '=', True)
])
# print(not_done_orders)
# 完成订单
# 获取当前时间并计算24小时前的时间
current_time = datetime.now()
time_24_hours_ago = current_time - timedelta(hours=24)
finish_orders = plan_obj.search([
('production_line_id.name', '=', line), ('state', 'in', ['finished']),
('production_id.state', 'not in', ['cancel']), ('active', '=', True)
('production_id.state', 'not in', ['cancel']), ('active', '=', True),
('actual_end_time', '>=', time_24_hours_ago)
])
# print(finish_orders)