1、优化机床模型的标准刀库对象,删除了制造模块中机床刀位模型大部分字段,在刀具管理模块中通过继承机床刀位模型新增字段,同时前端机床from视图中的刀位的tree视图新增大量字段;2、刀具管理模块新增controllers模块文件,新增机床当前刀库实时信息接口。
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user