修复按钮固定条件显示问题

This commit is contained in:
mgw
2024-09-23 08:55:23 +08:00
parent eb7d9e4168
commit ddfb233452
2 changed files with 4 additions and 2 deletions

View File

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

View File

@@ -520,7 +520,7 @@
<xpath expr="//form//header" position="inside">
<button type="object" class="oe_highlight jikimo_button_confirm" name="get_three_check_datas"
string="获取数据" attrs='{"invisible": [("state","!=","progress"), ("routing_type","!=","装夹预调")]}'/>
string="获取数据" attrs='{"invisible": ["|", ("state","!=","progress"), ("routing_type","!=","装夹预调")]}'/>
</xpath>