1、机台换刀申请tree视图隐藏机床字段,机台号字段内容自动同步位机床名称;功能刀具出入库记录模型机台号字段内容自动同步位机床名称;2、解决功能刀具有的出入库记录机床字段没有内容的问题;3、新增继承机床刀位模型,将新建机床刀位时创建机台换刀申请记录从原机床刀位模型移动到继承后的机床刀位模型中;

This commit is contained in:
yuxianghui
2023-12-07 17:31:18 +08:00
parent 7c8c869172
commit 4d04b37582
6 changed files with 25 additions and 22 deletions

View File

@@ -873,13 +873,3 @@ class SfMaintenanceEquipmentTool(models.Model):
for record in self:
if record.code:
record.name = record.code
@api.model_create_multi
def create(self, vals_list):
tools = super().create(vals_list)
for tool in tools:
self.env['sf.machine.table.tool.changing.apply'].sudo().create({
'maintenance_equipment_id': tool.equipment_id.id,
'cutter_spacing_code_id': tool.id
})
return tools