From 2a5a9de3e3e7caefc8797551a9d1580cd989d7b1 Mon Sep 17 00:00:00 2001 From: yuxianghui <3437689193@qq.com> Date: Mon, 22 Jan 2024 15:54:30 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=B7=BB=E5=8A=A0=E6=9C=BA=E5=BA=8A?= =?UTF-8?q?=E5=88=80=E4=BD=8D=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/product_template.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sf_manufacturing/models/product_template.py b/sf_manufacturing/models/product_template.py index 90395d18..b9209d57 100644 --- a/sf_manufacturing/models/product_template.py +++ b/sf_manufacturing/models/product_template.py @@ -874,6 +874,20 @@ class SfMaintenanceEquipmentTool(models.Model): 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') + categ_type = fields.Char(string='功能刀具类型') + diameter = fields.Char('直径') + precision = fields.Char('粗\中\精') + tool_code = fields.Char('功能刀具编码') + hilt_name = fields.Char('刀柄名称') + hilt_code = fields.Char('刀柄编码') + life_value_max = fields.Char('最大寿命值') + alarm_value = fields.Char('报警值') + used_value = fields.Char('已使用值') + @api.depends('code') def _compute_name(self): for record in self: