1、俩个刀具组接口加上token验证;2、新增功能刀具组装完成时,如果单据来源于CAM用刀,则调用MES装刀指令接口;
This commit is contained in:
@@ -258,13 +258,8 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
|
||||
names = categories._search([], order=order, access_rights_uid=SUPERUSER_ID)
|
||||
return categories.browse(names)
|
||||
|
||||
@api.onchange('plan_execute_status')
|
||||
def _onchange_plan_execute_status(self):
|
||||
for record in self:
|
||||
if record.plan_execute_status == '已完成':
|
||||
self.env['sf.cnc.processing'].register_cnc_processing(record)
|
||||
|
||||
def knife_plan_cnc_processing(self):
|
||||
# MES装刀指令接口 測試
|
||||
self.env['sf.cnc.processing'].register_cnc_processing(self)
|
||||
|
||||
def apply_for_tooling(self):
|
||||
|
||||
@@ -15,7 +15,7 @@ class CNCprocessing(models.Model):
|
||||
config = self.env['res.config.settings'].get_values()
|
||||
# token = sf_sync_config['token'Ba F2CF5DCC-1A00-4234-9E95-65603F70CC8A]
|
||||
headers = {'Authorization': config['center_control_Authorization']}
|
||||
crea_url = config['center_control_url'] + "/AutoDeviceApi/GetToolInfos"
|
||||
crea_url = config['center_control_url'] + "/AutoDeviceApi/ToolLoadInstruct"
|
||||
val = {
|
||||
'DeviceId': knife_plan.machine_table_name,
|
||||
'RfidCode': knife_plan.sf_functional_tool_assembly_id.rfid,
|
||||
|
||||
Reference in New Issue
Block a user