增加一键下发补偿值,优化显示bug
This commit is contained in:
@@ -246,7 +246,6 @@ class WorkCenterBarcode(models.Model):
|
|||||||
print(temp_dict)
|
print(temp_dict)
|
||||||
temp = py2opcua.Py2opcua()
|
temp = py2opcua.Py2opcua()
|
||||||
temp.write(temp_dict)
|
temp.write(temp_dict)
|
||||||
self.button_compensation_state = True
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
_logger.info("=====================================", e)
|
_logger.info("=====================================", e)
|
||||||
raise UserError('补偿值获取失败,或机床未连接,请检查')
|
raise UserError('补偿值获取失败,或机床未连接,请检查')
|
||||||
@@ -271,6 +270,10 @@ class WorkCenterBarcode(models.Model):
|
|||||||
# _logger.info("=====================================", e)
|
# _logger.info("=====================================", e)
|
||||||
# raise UserError('程序删除失败,请重试')
|
# raise UserError('程序删除失败,请重试')
|
||||||
# host="192.168.2.158", port=8080, username="MITSUBISHI", password="CNC"
|
# host="192.168.2.158", port=8080, username="MITSUBISHI", password="CNC"
|
||||||
|
try:
|
||||||
|
self.compensation()
|
||||||
|
except Exception:
|
||||||
|
raise UserError("补偿值写入执行超时,请检查机床状态或者写入状态")
|
||||||
sequence_collect = []
|
sequence_collect = []
|
||||||
host = self.workcenter_id.machine_tool_id.ftp_host
|
host = self.workcenter_id.machine_tool_id.ftp_host
|
||||||
port = self.workcenter_id.machine_tool_id.ftp_port
|
port = self.workcenter_id.machine_tool_id.ftp_port
|
||||||
|
|||||||
@@ -19,7 +19,9 @@
|
|||||||
<!-- attrs='{"invisible": ["|",("state","!=","progress"), -->
|
<!-- attrs='{"invisible": ["|",("state","!=","progress"), -->
|
||||||
<!-- ("user_permissions","!=",True)]}'/> -->
|
<!-- ("user_permissions","!=",True)]}'/> -->
|
||||||
<!-- <button string="下发" name="up" type="object" class="btn-primary" confirm="是否确认下发此程序" context="{'default_cnc_ids': cnc_ids}"/> -->
|
<!-- <button string="下发" name="up" type="object" class="btn-primary" confirm="是否确认下发此程序" context="{'default_cnc_ids': cnc_ids}"/> -->
|
||||||
<button string="下发" name="up" type="object" class="btn-primary" confirm="是否确认下发此程序" context="{'default_sf_cnc_processing_id': id}"/>
|
<button string="下发" name="up" type="object" class="btn-primary" confirm="是否确认下发此程序"
|
||||||
|
context="{'default_sf_cnc_processing_id': id}" attrs='{"invisible": ["|",("state","!=","progress"),
|
||||||
|
("user_permissions","!=",True)]}'/>
|
||||||
<!-- <button string="下发" name="up" type="object" class="btn-primary" confirm="是否确认下发此程序"-->
|
<!-- <button string="下发" name="up" type="object" class="btn-primary" confirm="是否确认下发此程序"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user