From ddfb233452e036272c3f40b5c64b5280380c5d8c Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Mon, 23 Sep 2024 08:55:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8C=89=E9=92=AE=E5=9B=BA?= =?UTF-8?q?=E5=AE=9A=E6=9D=A1=E4=BB=B6=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_machine_connect/controllers/controllers.py | 4 +++- sf_manufacturing/views/mrp_workorder_view.xml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sf_machine_connect/controllers/controllers.py b/sf_machine_connect/controllers/controllers.py index 5ba1261f..937960f3 100644 --- a/sf_machine_connect/controllers/controllers.py +++ b/sf_machine_connect/controllers/controllers.py @@ -687,6 +687,8 @@ class Sf_Dashboard_Connect(http.Controller): not_done_data.append(line_dict) for finish_order in finish_orders: + if not finish_order.actual_end_time: + continue blank_name = '' try: blank_name = finish_order.production_id.move_raw_ids[0].product_id.name @@ -707,7 +709,7 @@ class Sf_Dashboard_Connect(http.Controller): 'material': material, 'dimensions': dimensions, 'order_qty': finish_order.product_qty, - 'finish_time': finish_order.actual_end_time.strftime('%Y-%m-%d %H:%M:%S'), + 'finish_time': finish_order.actual_end_time.strftime('%Y-%m-%d %H:%M:%S') if finish_order.actual_end_time else ' ' } done_data.append(line_dict) diff --git a/sf_manufacturing/views/mrp_workorder_view.xml b/sf_manufacturing/views/mrp_workorder_view.xml index e5ca2660..c3e05739 100644 --- a/sf_manufacturing/views/mrp_workorder_view.xml +++ b/sf_manufacturing/views/mrp_workorder_view.xml @@ -520,7 +520,7 @@