修改维保标准维保项目参数为One2many对象 并与设备,维保计划关联,修改原生维保计划方法 根据保养和检修生成不同的维保计划单
This commit is contained in:
@@ -787,6 +787,10 @@ class MachineToolType(models.Model):
|
||||
result = json.loads(r['result'])
|
||||
if result['status'] == 1:
|
||||
for item in result['machine_tool_type_all_list']:
|
||||
if item.get('machine_tool_picture'):
|
||||
image = base64.b64decode(item['machine_tool_picture'])
|
||||
else:
|
||||
image = ''
|
||||
brand = self.env['sf.machine_tool.type'].search(
|
||||
[("code", '=', item['code'])])
|
||||
if not brand:
|
||||
@@ -811,7 +815,7 @@ class MachineToolType(models.Model):
|
||||
[('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']),
|
||||
'machine_tool_picture':image,
|
||||
"heightened_way": item['heightened_way'],
|
||||
"workpiece_load": item['workpiece_load'],
|
||||
"lead_screw": item['lead_screw'],
|
||||
|
||||
Reference in New Issue
Block a user