每日同步刀具定时器

This commit is contained in:
qihao.gong@jikimo.com
2023-06-12 16:17:42 +08:00
parent f457890b73
commit 3baa438c2b
3 changed files with 202 additions and 3 deletions

View File

@@ -833,6 +833,51 @@ class MachineToolType(models.Model):
"machine_tool_category": self.env['sf.machine_tool.category'].search(
[('code', '=', item['machine_tool_category'])]).id,
})
else:
brand.write({
"id": item['id'],
"name": item['name'],
"code": item['code'],
"number_of_knife_library": item['number_of_knife_library'],
"rotate_speed": item['rotate_speed'],
'machine_tool_id': self.env['sf.machine_tool'].search(
[('code', '=', item['machine_tool_id'])]).id,
"number_of_axles": item['number_of_axles'],
"x_axis": item['x_axis'],
"y_axis": item['y_axis'],
"z_axis": item['z_axis'],
"b_axis": item['b_axis'],
"c_axis": item['c_axis'],
"remark": item['remark'],
"precision": item['precision'],
'control_system_id': self.env['sf.machine.control_system'].search(
[('code', '=', item['control_system_id'])]).id,
"active": item['active'],
'brand_id': self.env['sf.machine.brand'].search([('code', '=', item['brand_id'])]).id,
'machine_tool_picture': base64.b64decode(item['machine_tool_picture']),
"heightened_way": item['heightened_way'],
"workpiece_load": item['workpiece_load'],
"lead_screw": item['lead_screw'],
"workbench_L": item['workbench_L'],
"workbench_W": item['workbench_W'],
"guide_rail": item['guide_rail'],
"machine_tool_L": item['machine_tool_L'],
"machine_tool_W": item['machine_tool_W'],
"machine_tool_H": item['machine_tool_H'],
"feed_speed": item['feed_speed'],
"tool_speed": item['tool_speed'],
"distance": item['distance'],
"taper": item['taper'],
"torque": item['torque'],
"motor_power": item['motor_power'],
"tool_quality_max": item['tool_quality_max'],
"tool_long_max": item['tool_long_max'],
"tool_diameter_max": item['tool_diameter_max'],
"machine_tool_category": self.env['sf.machine_tool.category'].search(
[('code', '=', item['machine_tool_category'])]).id,
})
else:
raise ValidationError("认证未通过")