修改代码不规范问题

This commit is contained in:
qihao.gong@jikimo.com
2023-11-23 17:37:06 +08:00
parent 9d911a5c2b
commit b73a449b01
15 changed files with 27 additions and 38 deletions

View File

@@ -12,8 +12,8 @@ class SfMaintenanceEquipmentCategory(models.Model):
_inherit = 'maintenance.equipment.category'
_description = '设备类别'
equipment_type = fields.Selection([('机床', '机床'), ('机器人', '机器人'), ('AGV小车', 'AGV小车'), ('检测设备', '检测设备')]
, string='类型', default='机床')
equipment_type = fields.Selection([('机床', '机床'), ('机器人', '机器人'), ('AGV小车', 'AGV小车'),
('检测设备', '检测设备')], string='类型', default='机床')
class SfMaintenanceEquipment(models.Model):
@@ -364,7 +364,7 @@ class SfMaintenanceEquipment(models.Model):
images_ids_names = []
for a in self.env['maintenance.equipment.image'].search([('id', 'in', item.image_id.ids)]):
images_ids_names.append(a.name)
if item.machine_tool_picture != False:
if item.machine_tool_picture:
image = base64.b64encode(item.machine_tool_picture).decode('utf-8')
else:
image = False