Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/新增工件装夹预调工单任务

# Conflicts:
#	sf_manufacturing/models/mrp_workorder.py
This commit is contained in:
jinling.yang
2024-01-23 17:42:38 +08:00
11 changed files with 181 additions and 61 deletions

View File

@@ -6,8 +6,8 @@ import os
from odoo import models, fields, api, _
from odoo.exceptions import ValidationError
from odoo.modules import get_resource_path
from OCC.Extend.DataExchange import read_step_file
from OCC.Extend.DataExchange import write_stl_file
# from OCC.Extend.DataExchange import read_step_file
# from OCC.Extend.DataExchange import write_stl_file
class ResProductMo(models.Model):
@@ -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: