Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/刀具基础信息生成产品模板
This commit is contained in:
@@ -7,6 +7,16 @@ from odoo.exceptions import UserError
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
# 功能刀具物料
|
||||
class CuttingToolMaterial(models.Model):
|
||||
_name = 'sf.cutting.tool.material'
|
||||
_description = '刀具物料'
|
||||
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('名称')
|
||||
remark = fields.Char('备注')
|
||||
|
||||
|
||||
# 功能刀具
|
||||
class FunctionalCuttingTool(models.Model):
|
||||
_name = 'sf.functional.cutting.tool'
|
||||
@@ -53,6 +63,8 @@ class IntegralCuttingTool(models.Model):
|
||||
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('型号名称')
|
||||
# 关联刀具物料
|
||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
||||
# 整体式刀具类型字段,关联整体式刀具类型对象
|
||||
integral_model_number = fields.Many2one('sf.integral.cutting.tool.model', '整体式刀具类型')
|
||||
# 增加品牌、总长度(mm)、柄部长度(mm)、刃部长度(mm)、直径(mm)、刃数、前角(°)、后角(°)、主偏角(°)、材料型号、配对螺母(mm)、适用夹头型号、适用范围、图片、创建人、创建时间等字段
|
||||
@@ -80,6 +92,8 @@ class IntegralCuttingToolModel(models.Model):
|
||||
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('名称')
|
||||
# 关联刀具物料
|
||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
||||
remark = fields.Text('备注')
|
||||
|
||||
|
||||
@@ -90,10 +104,12 @@ class Blade(models.Model):
|
||||
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('型号名称')
|
||||
# 关联刀具物料
|
||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
||||
# 刀片类型字段,关联刀片类型对象
|
||||
blade_model_number = fields.Many2one('sf.blade.model', '刀片类型')
|
||||
# 编码、型号名称、刀片类型、品牌、长度L(mm)、宽度D(mm)、高度T(mm)、顶角(°)、前角(°)、后角(°)、主偏角(°)、R角(°)、材料型号、加工硬度、配对螺母(mm)、适用刀杆/刀盘型号、刀尖半径(mm)、图片、创建人、创建时间字段
|
||||
brand = fields.Many2one('sf.machine.brand', '品牌',)
|
||||
brand = fields.Many2one('sf.machine.brand', '品牌', )
|
||||
length = fields.Float('长度L(mm)')
|
||||
width = fields.Float('宽度D(mm)')
|
||||
height = fields.Float('高度T(mm)')
|
||||
@@ -120,6 +136,8 @@ class BladeModel(models.Model):
|
||||
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('名称')
|
||||
# 关联刀具物料
|
||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
||||
# 刀片类型字段,关联刀片对象
|
||||
blade_ids = fields.One2many('sf.blade', 'blade_model_number', '刀片类型')
|
||||
remark = fields.Text('备注')
|
||||
@@ -132,6 +150,8 @@ class CutterBar(models.Model):
|
||||
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('型号名称')
|
||||
# 关联刀具物料
|
||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
||||
# 刀杆类型字段,关联刀杆类型对象
|
||||
cutter_bar_model_number = fields.Many2one('sf.cutter.bar.model', '刀杆类型')
|
||||
# 品牌、C柄径(mm)、L总长(mm)、材料型号、刃数、D刃径(mm)、适用刀片型号、配对扳手(mm)、配备螺丝(mm)、刀尖圆角半径、精度等级、硬度(°)、适用范围、图片、创建人、创建时间
|
||||
@@ -158,6 +178,8 @@ class CutterBarModel(models.Model):
|
||||
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('名称')
|
||||
# 关联刀具物料
|
||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
||||
remark = fields.Text('备注')
|
||||
|
||||
|
||||
@@ -168,6 +190,8 @@ class CutterPad(models.Model):
|
||||
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('型号名称')
|
||||
# 关联刀具物料
|
||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
||||
# 刀盘类型字段,关联刀盘类型对象
|
||||
cutter_pad_model_number = fields.Many2one('sf.cutter.pad.model', '刀盘类型')
|
||||
# 增加品牌、C柄径(mm)、L总长(mm)、材料型号、刃数、D刃径(mm)、适用刀片型号、配对扳手(mm)、配备螺丝(mm)、刀尖圆角半径、精度等级、硬度(°)、适用范围、图片、创建人、创建时间
|
||||
@@ -194,6 +218,8 @@ class CutterPadModel(models.Model):
|
||||
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('名称')
|
||||
# 关联刀具物料
|
||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
||||
remark = fields.Text('备注')
|
||||
|
||||
|
||||
@@ -204,6 +230,8 @@ class Handle(models.Model):
|
||||
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('型号名称')
|
||||
# 关联刀具物料
|
||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
||||
# 刀柄类型字段,关联刀柄类型对象
|
||||
handle_model_number = fields.Many2one('sf.handle.model', '刀柄类型')
|
||||
# 增加、刀柄类型、品牌、L(mm)、L1(mm)、D1(mm)、重量(kg)、材料型号、本体精度(mm)、配对螺母(mm)、适用夹头型号、夹持范围(mm)、检测精度、检测硬度、标准转速、图片、创建人、创建时间
|
||||
@@ -230,6 +258,8 @@ class HandleModel(models.Model):
|
||||
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('名称')
|
||||
# 关联刀具物料
|
||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
||||
remark = fields.Text('备注')
|
||||
|
||||
|
||||
@@ -237,9 +267,12 @@ class HandleModel(models.Model):
|
||||
class Chuck(models.Model):
|
||||
_name = 'sf.chuck'
|
||||
_description = '夹头'
|
||||
_rec_name = 'code'
|
||||
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('型号名称')
|
||||
# 关联刀具物料
|
||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
||||
# 夹头类型字段,关联夹头类型对象
|
||||
chuck_model_number = fields.Many2one('sf.chuck.model', '夹头类型')
|
||||
# 增加品牌、精度(mm)、外径(mm)、内径(mm)、高度(mm)、材料型号、配对螺母(mm)、适用刀柄型号、夹持范围(mm)、特性、图片、创建人、创建时间
|
||||
@@ -263,5 +296,6 @@ class ChuckModel(models.Model):
|
||||
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('名称')
|
||||
# 关联刀具物料
|
||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
||||
remark = fields.Text('备注')
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ access_sf_handle,sf.handle,model_sf_handle,base.group_user,1,1,1,1
|
||||
access_sf_handle_model,sf.handle.model,model_sf_handle_model,base.group_user,1,1,1,1
|
||||
access_sf_chuck,sf.chuck,model_sf_chuck,base.group_user,1,1,1,1
|
||||
access_sf_chuck_model,sf.chuck.model,model_sf_chuck_model,base.group_user,1,1,1,1
|
||||
|
||||
access_sf_cutting_tool_material,sf.cutting.tool.material,model_sf_cutting_tool_material,base.group_user,1,1,1,1
|
||||
|
||||
access_sf_fixture_setting_element,sf_fixture_setting_element,model_sf_fixture_setting_element,base.group_user,1,1,1,1
|
||||
access_sf_setting_element_type,sf_setting_element_type,model_sf_setting_element_type,base.group_user,1,1,1,1
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<menuitem id="menu_sf_functional_fixture_list_2"
|
||||
name="夹具"
|
||||
parent="menu_sf_base"
|
||||
sequence="6"
|
||||
sequence="70"
|
||||
/>
|
||||
|
||||
<!-- <menuitem id="menu_sf_functional_fixture_list_3"-->
|
||||
|
||||
@@ -100,17 +100,15 @@
|
||||
<field name="res_model">sf.chuck.model</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<!-- 刀具物料action -->
|
||||
<record id="action_sf_cutting_tool_material" model="ir.actions.act_window">
|
||||
<field name="name">刀具物料</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">sf.cutting.tool.material</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<!-- 刀具 -->
|
||||
<!-- <menuitem -->
|
||||
<!-- id="menu_sf_cutting_tool" -->
|
||||
<!-- parent="mrp.menu_mrp_configuration" -->
|
||||
<!-- name="刀具" -->
|
||||
<!-- sequence="3" -->
|
||||
<!-- /> -->
|
||||
|
||||
<!-- 功能刀具 -->
|
||||
<!-- parent="menu_sf_cutting_tool" -->
|
||||
<!-- 功能刀具 -->
|
||||
<menuitem
|
||||
id="menu_sf_functional_cutting_tool"
|
||||
parent="menu_sf_base"
|
||||
@@ -118,21 +116,15 @@
|
||||
sequence="3"
|
||||
action="action_sf_functional_cutting_tool"
|
||||
/>
|
||||
<!-- --><!-- 刀具物料 -->
|
||||
<!-- <menuitem -->
|
||||
<!-- id="menu_sf_cutting_tool_material" -->
|
||||
<!-- parent="menu_sf_cutting_tool" -->
|
||||
<!-- name="刀具物料" -->
|
||||
<!-- sequence="1" -->
|
||||
<!-- /> -->
|
||||
<!-- 刀具物料 -->
|
||||
<menuitem
|
||||
id="menu_sf_cutting_tool_material"
|
||||
parent="menu_sf_base"
|
||||
name="刀具物料"
|
||||
sequence="1"
|
||||
action="action_sf_cutting_tool_material"
|
||||
/>
|
||||
|
||||
<!-- --><!-- 刀头 -->
|
||||
<!-- <menuitem -->
|
||||
<!-- id="menu_sf_cutting_tool_head" -->
|
||||
<!-- parent="menu_sf_cutting_tool" -->
|
||||
<!-- name="刀头" -->
|
||||
<!-- sequence="2" -->
|
||||
<!-- /> -->
|
||||
|
||||
<!-- 整体式刀具 -->
|
||||
<menuitem
|
||||
@@ -238,7 +230,5 @@
|
||||
sequence="64"
|
||||
action="action_sf_cutting_tool_clamp_head_type"
|
||||
/>
|
||||
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -1,6 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- 刀具物料tree view -->
|
||||
<record id="view_cutting_tool_material_tree" model="ir.ui.view">
|
||||
<field name="name">sf.cutting.tool.material.tree</field>
|
||||
<field name="model">sf.cutting.tool.material</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="刀具物料">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="remark"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<!-- 刀具物料form view -->
|
||||
<record id="view_cutting_tool_material_form" model="ir.ui.view">
|
||||
<field name="name">sf.cutting.tool.material.form</field>
|
||||
<field name="model">sf.cutting.tool.material</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="刀具物料">
|
||||
<sheet>
|
||||
<group col='1'>
|
||||
<group string='基本信息'>
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="remark"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<!-- 功能刀具tree view -->
|
||||
<record id="view_functional_cutting_tool_tree" model="ir.ui.view">
|
||||
<field name="name">sf.functional.cutting.tool.tree</field>
|
||||
@@ -97,6 +131,7 @@
|
||||
<field name="name"/>
|
||||
<field name="integral_model_number"/>
|
||||
<field name="brand"/>
|
||||
<field name="cutting_tool_material"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="image" nolabel="1" widget="image"/>
|
||||
@@ -110,6 +145,8 @@
|
||||
<field name="blade_length"/>
|
||||
<field name="diameter"/>
|
||||
<field name="blade_number"/>
|
||||
<field name="chuck_model" widget="many2many_tags" options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
|
||||
</group>
|
||||
<group>
|
||||
<field name="front_angle"/>
|
||||
@@ -121,12 +158,12 @@
|
||||
<group string='其他信息'>
|
||||
<group>
|
||||
<field name="nut"/>
|
||||
<field name="chuck_model"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="scope"/>
|
||||
|
||||
</group>
|
||||
|
||||
</group>
|
||||
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
@@ -160,6 +197,7 @@
|
||||
<field name="name"/>
|
||||
<field name="blade_model_number"/>
|
||||
<field name="brand" options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
<field name="cutting_tool_material"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="image" nolabel="1" widget="image"/>
|
||||
@@ -173,7 +211,8 @@
|
||||
<field name="height"/>
|
||||
<field name="top_angle"/>
|
||||
<field name="front_angle"/>
|
||||
<field name="rear_angle"/>
|
||||
<field name="cutter_bar" widget="many2many_tags" options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
<field name="cutter_pad" widget="many2many_tags" options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="main_included_angle"/>
|
||||
@@ -181,15 +220,12 @@
|
||||
<field name="material_model"/>
|
||||
<field name="hardness"/>
|
||||
<field name="radius"/>
|
||||
<field name="rear_angle"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string='其他信息'>
|
||||
<group>
|
||||
<field name="nut"/>
|
||||
<field name="cutter_bar" widget="many2many_tags" options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="cutter_pad" widget="many2many_tags" options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
@@ -225,6 +261,9 @@
|
||||
<field name="name"/>
|
||||
<field name="cutter_bar_model_number"/>
|
||||
<field name="brand"/>
|
||||
<field name="cutting_tool_material"/>
|
||||
<field name="blade" widget="many2many_tags" options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
|
||||
</group>
|
||||
<group>
|
||||
<field name="image" nolabel="1" widget="image"/>
|
||||
@@ -253,7 +292,6 @@
|
||||
</group>
|
||||
<group>
|
||||
<field name="scope"/>
|
||||
<field name="blade"/>
|
||||
|
||||
</group>
|
||||
</group>
|
||||
@@ -291,6 +329,9 @@
|
||||
<field name="name"/>
|
||||
<field name="cutter_pad_model_number"/>
|
||||
<field name="brand"/>
|
||||
<field name="cutting_tool_material"/>
|
||||
<field name="blade" widget="many2many_tags" options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
|
||||
</group>
|
||||
<group>
|
||||
<field name="image" nolabel="1" widget="image"/>
|
||||
@@ -318,7 +359,6 @@
|
||||
</group>
|
||||
<group>
|
||||
<field name="scope"/>
|
||||
<field name="blade"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
@@ -355,6 +395,9 @@
|
||||
<field name="name"/>
|
||||
<field name="handle_model_number"/>
|
||||
<field name="brand"/>
|
||||
<field name="cutting_tool_material"/>
|
||||
<field name="chuck_model" widget="many2many_tags" options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
|
||||
</group>
|
||||
<group>
|
||||
<field name="image" nolabel="1" widget="image"/>
|
||||
@@ -380,7 +423,6 @@
|
||||
<group string='其他信息'>
|
||||
<group>
|
||||
<field name="nut"/>
|
||||
<field name="chuck_model"/>
|
||||
</group>
|
||||
<!-- <group> -->
|
||||
<!-- <field name="scope"/> -->
|
||||
@@ -421,6 +463,9 @@
|
||||
<field name="name"/>
|
||||
<field name="chuck_model_number"/>
|
||||
<field name="brand"/>
|
||||
<field name="cutting_tool_material"/>
|
||||
<field name="handle_model" widget="many2many_tags" options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
|
||||
</group>
|
||||
<group>
|
||||
<field name="image" nolabel="1" widget="image"/>
|
||||
@@ -443,7 +488,6 @@
|
||||
<group string='其他信息'>
|
||||
<group>
|
||||
<field name="nut"/>
|
||||
<field name="handle_model"/>
|
||||
</group>
|
||||
<!-- <group> -->
|
||||
<!-- <field name="scope"/> -->
|
||||
@@ -513,6 +557,7 @@
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="cutting_tool_material"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="remark"/>
|
||||
@@ -546,7 +591,7 @@
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="blade_ids"/>
|
||||
<field name="cutting_tool_material"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="remark"/>
|
||||
@@ -580,6 +625,7 @@
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="cutting_tool_material"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="remark"/>
|
||||
@@ -613,6 +659,7 @@
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="cutting_tool_material"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="remark"/>
|
||||
@@ -647,6 +694,7 @@
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="cutting_tool_material"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="remark"/>
|
||||
@@ -680,6 +728,7 @@
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="cutting_tool_material"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="remark"/>
|
||||
@@ -689,7 +738,5 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user