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 @@