修改代码不规范问题
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user