1、优化机床模型的标准刀库对象,删除了制造模块中机床刀位模型大部分字段,在刀具管理模块中通过继承机床刀位模型新增字段,同时前端机床from视图中的刀位的tree视图新增大量字段;2、刀具管理模块新增controllers模块文件,新增机床当前刀库实时信息接口。

This commit is contained in:
yuxianghui
2024-01-16 17:30:59 +08:00
parent cb14bb4ea8
commit 7520d71adb
9 changed files with 112 additions and 17 deletions

View File

@@ -870,6 +870,11 @@ class SfMaintenanceEquipmentTool(models.Model):
_description = '机床刀位'
equipment_id = fields.Many2one('maintenance.equipment', string='设备')
code = fields.Char('机床刀位号')
name = fields.Char('刀位号', compute='_compute_name')
# 待删除字段
product_template_id = fields.Many2one('product.template', string='功能刀具名称',
domain="[('categ_type', '=', '刀具')]")
image_1920 = fields.Binary('图片', related='product_template_id.image_1920')
@@ -882,9 +887,6 @@ class SfMaintenanceEquipmentTool(models.Model):
life_value_max = fields.Char('最大寿命值')
alarm_value = fields.Char('报警值')
used_value = fields.Char('已使用值')
code = fields.Char('机床刀位号')
name = fields.Char('', compute='_compute_name')
@api.depends('code')
def _compute_name(self):