Merge remote-tracking branch 'origin/feature/接口及CAM用刀' into feature/CAM用刀优化及添加接口

This commit is contained in:
yuxianghui
2024-01-22 14:42:45 +08:00
17 changed files with 411 additions and 102 deletions

View File

@@ -597,6 +597,7 @@ class CNCprocessing(models.Model):
cnc_id = fields.Many2one('ir.attachment')
sequence_number = fields.Char('序号')
program_name = fields.Char('程序名')
functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型')
cutting_tool_name = fields.Char('刀具名称')
cutting_tool_no = fields.Char('刀号')
processing_type = fields.Char('加工类型')

View File

@@ -870,21 +870,9 @@ class SfMaintenanceEquipmentTool(models.Model):
_description = '机床刀位'
equipment_id = fields.Many2one('maintenance.equipment', string='设备')
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('已使用值')
code = fields.Char('机床刀位号')
name = fields.Char('', compute='_compute_name')
code = fields.Char('机床刀位号')
name = fields.Char('刀位号', compute='_compute_name')
@api.depends('code')
def _compute_name(self):

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- 设备增加刀具库位table-->
设备增加刀具库位table
<record id="sf_manufacturing_hr_equipment_view_form" model="ir.ui.view">
<field name="name">sf_manufacturing_equipment.form</field>
<field name="model">maintenance.equipment</field>
@@ -13,17 +13,6 @@
<field name = 'product_template_ids' >
<tree editable='bottom'>
<field name="code"/>
<field name="product_template_id"/>
<field name="image_1920" widget="image"/>
<field name="categ_type"/>
<field name="diameter"/>
<field name="precision"/>
<field name="tool_code"/>
<field name="hilt_name"/>
<field name="hilt_code"/>
<field name="life_value_max"/>
<field name="alarm_value"/>
<field name="used_value"/>
</tree>
</field>
</page>