智能工厂刀具物料模型、关联关系及其界面已建立
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', '刀具物料', required=True)
|
||||
# 整体式刀具类型字段,关联整体式刀具类型对象
|
||||
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', '刀具物料', required=True)
|
||||
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', '刀具物料', required=True)
|
||||
# 刀片类型字段,关联刀片类型对象
|
||||
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', '刀具物料', required=True)
|
||||
# 刀片类型字段,关联刀片对象
|
||||
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', '刀具物料', required=True)
|
||||
# 刀杆类型字段,关联刀杆类型对象
|
||||
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', '刀具物料', required=True)
|
||||
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', '刀具物料', required=True)
|
||||
# 刀盘类型字段,关联刀盘类型对象
|
||||
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', '刀具物料', required=True)
|
||||
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', '刀具物料', required=True)
|
||||
# 刀柄类型字段,关联刀柄类型对象
|
||||
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', '刀具物料', required=True)
|
||||
remark = fields.Text('备注')
|
||||
|
||||
|
||||
@@ -240,6 +270,8 @@ class Chuck(models.Model):
|
||||
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('型号名称')
|
||||
# 关联刀具物料
|
||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料', required=True)
|
||||
# 夹头类型字段,关联夹头类型对象
|
||||
chuck_model_number = fields.Many2one('sf.chuck.model', '夹头类型')
|
||||
# 增加品牌、精度(mm)、外径(mm)、内径(mm)、高度(mm)、材料型号、配对螺母(mm)、适用刀柄型号、夹持范围(mm)、特性、图片、创建人、创建时间
|
||||
@@ -263,5 +295,6 @@ class ChuckModel(models.Model):
|
||||
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('名称')
|
||||
# 关联刀具物料
|
||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料', required=True)
|
||||
remark = fields.Text('备注')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user