刀具管理
This commit is contained in:
@@ -7,10 +7,26 @@
|
|||||||
<field name="model">sf.functional.cutting.tool</field>
|
<field name="model">sf.functional.cutting.tool</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="功能刀具">
|
<tree string="功能刀具">
|
||||||
<field name="code"/>
|
<field name="code" />
|
||||||
<field name="name"/>
|
<field name="name" />
|
||||||
<field name="functional_model_number"/>
|
<field name="functional_model_number" />
|
||||||
<field name="image" widget='image'/>
|
<field name="integral_model_number"/>
|
||||||
|
<field name="blade_model_number" optional="hide"/>
|
||||||
|
<field name="cutterbar_model_number" optional="hide"/>
|
||||||
|
<field name="cutterpad_model_number" optional="hide"/>
|
||||||
|
<field name="handle_model_number" optional="hide"/>
|
||||||
|
<field name="chuck_model_number" optional="hide"/>
|
||||||
|
<field name="diameter" optional="show"/>
|
||||||
|
<field name="tool_grade" optional="show"/>
|
||||||
|
<field name="machining_accuracy" optional="hide"/>
|
||||||
|
<field name="tool_length" optional="show"/>
|
||||||
|
<field name="blade_number" optional="show"/>
|
||||||
|
<field name="integral_blade_length" optional="show"/>
|
||||||
|
<field name="effective_blade_length" optional="show"/>
|
||||||
|
<field name="max_life" optional="show"/>
|
||||||
|
<field name="is_standard" optional="show"/>
|
||||||
|
<field name="applicable_range" optional="show"/>
|
||||||
|
<field name="image" widget='image' optional="show"/>
|
||||||
|
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
@@ -12,7 +12,10 @@
|
|||||||
'website': 'https://www.sf.jikimo.com',
|
'website': 'https://www.sf.jikimo.com',
|
||||||
'depends': ['account', 'sf_base', 'mrp'],
|
'depends': ['account', 'sf_base', 'mrp'],
|
||||||
'data': [
|
'data': [
|
||||||
'views/menu_view.xml'
|
'security/group_security.xml',
|
||||||
|
'security/ir.model.access.csv',
|
||||||
|
'views/tool_base_views.xml',
|
||||||
|
'views/menu_view.xml',
|
||||||
],
|
],
|
||||||
'demo': [
|
'demo': [
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,3 +1,24 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
from odoo import fields, models, api
|
||||||
|
|
||||||
|
# 功能刀具预警
|
||||||
|
class FunctionalCuttingToolWarning(models.Model):
|
||||||
|
_name = 'sf.functional.cutting.tool.warning'
|
||||||
|
_inherit = 'sf.functional.cutting.tool'
|
||||||
|
_description = '功能刀具预警'
|
||||||
|
|
||||||
|
install_tool_time = fields.Char("装刀时间")
|
||||||
|
outbound_time = fields.Char('出库时间')
|
||||||
|
on_board_time = fields.Char('上机时间')
|
||||||
|
machine_tool_code = fields.Char('机台号')
|
||||||
|
cutting_tool_code = fields.Char('刀位号')
|
||||||
|
idle_time = fields.Char('闲置时长')
|
||||||
|
alarm_value = fields.Char('报警值')
|
||||||
|
used_value = fields.Char('已使用值')
|
||||||
|
alarm_type = fields.Char('报警类型')
|
||||||
|
alarm_time = fields.Char('报警时间')
|
||||||
|
dispose_user = fields.Char('处理人')
|
||||||
|
dispose_time = fields.Char('处理时间')
|
||||||
|
dispose_func = fields.Char('处理方法/措施')
|
||||||
|
remake = fields.Char('备注')
|
||||||
|
|
||||||
|
|||||||
4
sf_tool_management/security/group_security.xml
Normal file
4
sf_tool_management/security/group_security.xml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
7
sf_tool_management/security/ir.model.access.csv
Normal file
7
sf_tool_management/security/ir.model.access.csv
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
|
access_sf_functional_cutting_tool_warning,sf.functional.cutting.tool.warning,model_sf_functional_cutting_tool_warning,base.group_user,1,1,1,1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,18 +1,35 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
|
<record id="action_sf_functional_cutting_tool_warning" model="ir.actions.act_window">
|
||||||
|
<field name="name">功能刀具预警</field>
|
||||||
|
<field name="type">ir.actions.act_window</field>
|
||||||
|
<field name="res_model">sf.functional.cutting.tool.warning</field>
|
||||||
|
<field name="view_mode">tree,form</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<menuitem id="menu_sf_tool_manage"
|
<menuitem id="menu_sf_tool_manage"
|
||||||
name="刀具管理"
|
name="刀具管理"
|
||||||
groups="mrp.group_mrp_routings"
|
groups="mrp.group_mrp_routings"
|
||||||
parent="mrp.menu_mrp_root"
|
parent="mrp.menu_mrp_root"
|
||||||
sequence="20"/>
|
sequence="20"/>
|
||||||
<menuitem
|
<menuitem
|
||||||
sequence="2"
|
id="menu_sf_functional_cutting_tool"
|
||||||
name="功能刀具"
|
|
||||||
id="menu_sf_base"
|
|
||||||
action="sf_base.sf_production_materials"
|
|
||||||
parent="menu_sf_tool_manage"
|
parent="menu_sf_tool_manage"
|
||||||
/>
|
name="功能刀具列表"
|
||||||
|
sequence="3"
|
||||||
|
action="sf_base.action_sf_functional_cutting_tool"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<menuitem
|
||||||
|
id="menu_sf_functional_cutting_tool_warning"
|
||||||
|
parent="menu_sf_tool_manage"
|
||||||
|
name="功能刀具预警"
|
||||||
|
sequence="3"
|
||||||
|
action="action_sf_functional_cutting_tool_warning"
|
||||||
|
/>
|
||||||
</data>
|
</data>
|
||||||
</odoo>
|
</odoo>
|
||||||
108
sf_tool_management/views/tool_base_views.xml
Normal file
108
sf_tool_management/views/tool_base_views.xml
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
<!-- 功能刀具预警tree view -->
|
||||||
|
<record id="view_functional_cutting_tool_warning_tree" model="ir.ui.view">
|
||||||
|
<field name="name">sf.functional.cutting.tool.warning.tree</field>
|
||||||
|
<field name="model">sf.functional.cutting.tool.warning</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree string="功能刀具">
|
||||||
|
<field name="code" />
|
||||||
|
<field name="name" />
|
||||||
|
<field name="functional_model_number" />
|
||||||
|
<field name="integral_model_number"/>
|
||||||
|
<field name="blade_model_number" optional="hide"/>
|
||||||
|
<field name="cutterbar_model_number" optional="hide"/>
|
||||||
|
<field name="cutterpad_model_number" optional="hide"/>
|
||||||
|
<field name="handle_model_number" optional="hide"/>
|
||||||
|
<field name="chuck_model_number" optional="hide"/>
|
||||||
|
<field name="install_tool_time" optional="show"/>
|
||||||
|
<field name="outbound_time" optional="show"/>
|
||||||
|
<field name="machining_accuracy" optional="hide"/>
|
||||||
|
<field name="on_board_time" optional="show"/>
|
||||||
|
<field name="machine_tool_code" optional="show"/>
|
||||||
|
<field name="cutting_tool_code" optional="show"/>
|
||||||
|
<field name="idle_time" optional="show"/>
|
||||||
|
<field name="alarm_value" optional="show"/>
|
||||||
|
<field name="used_value" optional="show"/>
|
||||||
|
<field name="alarm_type" optional="show"/>
|
||||||
|
<field name="alarm_time" optional="show"/>
|
||||||
|
<field name="dispose_user" optional="show"/>
|
||||||
|
<field name="dispose_time" optional="show"/>
|
||||||
|
<field name="dispose_func" optional="show"/>
|
||||||
|
<field name="remake" optional="show"/>
|
||||||
|
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
<!-- form view -->
|
||||||
|
<record id="view_functional_cutting_tool_warning_form" model="ir.ui.view">
|
||||||
|
<field name="name">sf.functional.cutting.tool.warning.form</field>
|
||||||
|
<field name="model">sf.functional.cutting.tool.warning</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="功能刀具">
|
||||||
|
<sheet>
|
||||||
|
<group col='1'>
|
||||||
|
<group string='基本信息'>
|
||||||
|
<group>
|
||||||
|
<field name="code"/>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="functional_model_number"/>
|
||||||
|
<field name="integral_model_number"/>
|
||||||
|
<field name="blade_model_number"/>
|
||||||
|
<field name="cutterbar_model_number"/>
|
||||||
|
<field name="cutterpad_model_number"/>
|
||||||
|
<field name="handle_model_number"/>
|
||||||
|
<field name="chuck_model_number"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="image" nolabel="1" widget="image"/>
|
||||||
|
</group>
|
||||||
|
|
||||||
|
</group>
|
||||||
|
<group string='参数信息'>
|
||||||
|
<group>
|
||||||
|
<field name="diameter"/>
|
||||||
|
<field name="tool_grade"/>
|
||||||
|
<field name="machining_accuracy"/>
|
||||||
|
<field name="tool_length"/>
|
||||||
|
<field name="blade_number"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="integral_blade_length"/>
|
||||||
|
<field name="effective_blade_length"/>
|
||||||
|
<field name="max_life"/>
|
||||||
|
<field name="is_standard"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group string='其他信息'>
|
||||||
|
<group>
|
||||||
|
<field name="applicable_range"/>
|
||||||
|
<field name="install_tool_time"/>
|
||||||
|
<field name="outbound_time"/>
|
||||||
|
<field name="on_board_time"/>
|
||||||
|
<field name="machine_tool_code"/>
|
||||||
|
<field name="cutting_tool_code"/>
|
||||||
|
<field name="idle_time"/>
|
||||||
|
</group><group>
|
||||||
|
<field name="alarm_value"/>
|
||||||
|
<field name="used_value"/>
|
||||||
|
<field name="alarm_type"/>
|
||||||
|
<field name="alarm_time"/>
|
||||||
|
<field name="dispose_user"/>
|
||||||
|
<field name="dispose_time"/>
|
||||||
|
<field name="dispose_func"/>
|
||||||
|
<field name="remake"/>
|
||||||
|
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user