Accept Merge Request #766: (feature/修改机床参数bug -> develop)

Merge Request: 处理CNC文件下发失败的bug

Created By: @龚启豪
Reviewed By: @马广威
Approved By: @马广威 
Accepted By: @龚启豪
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/766
This commit is contained in:
龚启豪
2024-01-10 15:50:57 +08:00
committed by Coding
4 changed files with 22 additions and 14 deletions

View File

@@ -195,15 +195,15 @@ class SfMaintenanceEquipment(models.Model):
machine_tool_id = fields.Many2one('sf.machine_tool', '机床')
sf_maintenance_logs_ids = fields.One2many('sf.maintenance.logs', 'maintenance_equipment_id', '设备故障日志')
def name_get(self):
result = []
for parameter in self:
if parameter.code:
name = parameter.name + '-' + parameter.code
else:
name = parameter.name
result.append((parameter.id, name))
return result
# def name_get(self):
# result = []
# for parameter in self:
# if parameter.code:
# name = parameter.name + '-' + parameter.code
# else:
# name = parameter.name
# result.append((parameter.id, name))
# return result
@api.model
def create(self, vals):