1、设备机床的刀位对象新增name字段,并自动添加值;2、根据需求重构了机床换刀申请模型,重构机床换刀弹窗对象;
This commit is contained in:
@@ -911,5 +911,12 @@ class SfMaintenanceEquipmentTool(models.Model):
|
||||
alarm_value = fields.Char('报警值')
|
||||
used_value = fields.Char('已使用值')
|
||||
code = fields.Char('机床刀位号')
|
||||
name = fields.Char('', compute='_compute_name')
|
||||
|
||||
@api.depends('code')
|
||||
def _compute_name(self):
|
||||
for record in self:
|
||||
if record.code:
|
||||
record.name = record.code
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user