Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/制造代码优化
This commit is contained in:
@@ -400,4 +400,15 @@ div:has(.o_required_modifier) > label::before {
|
||||
// 机床换刀申请表格宽度设置
|
||||
.o_list_table_ungrouped {
|
||||
min-width: 1089px;
|
||||
}
|
||||
// 加工能力\冷却方式 竖列展示改为横列展示
|
||||
.processingMethod {
|
||||
.o_cell.flex-grow-1.flex-sm-grow-0 {
|
||||
width: 100%!important;
|
||||
}
|
||||
}
|
||||
@media (min-width: 576px) {
|
||||
.o_inner_group.processingMethod {
|
||||
grid-template-columns: auto;
|
||||
}
|
||||
}
|
||||
@@ -4,3 +4,4 @@ from . import tool_base_new
|
||||
from . import fixture
|
||||
from . import functional_fixture
|
||||
from . import tool_other_features
|
||||
from . import basic_parameters_fixture
|
||||
|
||||
68
sf_base/models/basic_parameters_fixture.py
Normal file
68
sf_base/models/basic_parameters_fixture.py
Normal file
@@ -0,0 +1,68 @@
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class BasicParametersFixture(models.Model):
|
||||
_name = 'sf.fixture.materials.basic.parameters'
|
||||
_description = '夹具物料基本参数'
|
||||
|
||||
fixture_model_id = fields.Many2one('sf.fixture.model', '夹具型号')
|
||||
name = fields.Char('物料号', size=20)
|
||||
length = fields.Float('长度(mm)', digits=(16, 2))
|
||||
width = fields.Float('宽度(mm)', digits=(16, 2))
|
||||
height = fields.Float('高度(mm)', digits=(16, 2))
|
||||
diameter = fields.Float('直径(mm)', digits=(16, 2))
|
||||
|
||||
# '零点卡盘' 字段
|
||||
weight = fields.Float('重量(mm)', digits=(16, 2))
|
||||
orientation_dish_diameter = fields.Float('定位盘直径(mm)', digits=(16, 2))
|
||||
clamping_diameter = fields.Float('装夹直径(mm)', digits=(16, 2))
|
||||
clamping_num = fields.Selection([('1', '1'), ('2', '2'), ('4', '4'), ('6', '6'), ('8', '8')], string='夹装单元数')
|
||||
chucking_power_max = fields.Float('最大夹持力(KN)', digits=(16, 2))
|
||||
repeated_positioning_accuracy = fields.Char('重复定位精度(mm)', size=20)
|
||||
boolean_transposing_hole = fields.Boolean('是否有转位孔')
|
||||
unlocking_method = fields.Selection(
|
||||
[('手动', '手动'), ('气动', '气动'), ('液压', '液压'), ('电动', '电动'), ('其他', '其他')], string='解锁方式')
|
||||
boolean_chip_blowing_function = fields.Boolean('是否有吹屑功能')
|
||||
carrying_capacity_max = fields.Float('最大承载重量(kg)', digits=(16, 2))
|
||||
rigidity = fields.Integer('硬度HRC')
|
||||
materials_model_id = fields.Many2one('sf.materials.model', '夹具材质')
|
||||
machine_tool_type_id = fields.Many2one('sf.machine_tool.type', '适用机床型号')
|
||||
|
||||
# ’零点托盘‘ 字段
|
||||
connector_diameter = fields.Selection([('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'), ('8', '8')],
|
||||
string='连接头直径(mm)')
|
||||
way_to_install = fields.Selection(
|
||||
[('接口式', '接口式'), ('螺栓固定', '螺栓固定'), ('磁吸式', '磁吸式'), ('其他', '其他')], string='安装方式')
|
||||
type_of_drive = fields.Selection(
|
||||
[('气动式', '气动式'), ('液压式', '液压式'), ('机械式', '机械式'), ('电动式', '电动式'), ('其他', '其他')],
|
||||
string='驱动方式')
|
||||
|
||||
# ’气动夹具‘ 字段
|
||||
gripper_length_min = fields.Float('夹持工件最小长度(mm)', digits=(16, 2))
|
||||
gripper_width_min = fields.Float('夹持工件最小宽度(mm)', digits=(16, 2))
|
||||
gripper_height_min = fields.Float('夹持工件最小高度(mm)', digits=(16, 2))
|
||||
gripper_diameter_min = fields.Float('夹持工件最小直径(mm)', digits=(16, 2))
|
||||
gripper_length_max = fields.Float('夹持工件最大长度(mm)', digits=(16, 2))
|
||||
gripper_width_max = fields.Float('夹持工件最大宽度(mm)', digits=(16, 2))
|
||||
gripper_height_max = fields.Float('夹持工件最大高度(mm)', digits=(16, 2))
|
||||
gripper_diameter_max = fields.Float('夹持工件最大直径(mm)', digits=(16, 2))
|
||||
rated_air_pressure = fields.Float('额定气压(Mpa)', digits=(16, 2))
|
||||
interface_materials_model_id = fields.Many2one('sf.materials.model', '接口类型')
|
||||
|
||||
# ‘虎钳夹具' 字段
|
||||
transverse_groove = fields.Float('横向配合槽n(mm)', digits=(16, 2))
|
||||
longitudinal_fitting_groove = fields.Float('纵向配合槽l(mm)', digits=(16, 2))
|
||||
|
||||
# '磁吸夹具' 字段
|
||||
height_tolerance_value = fields.Char('高度公差(mm)')
|
||||
rated_adsorption_force = fields.Float('额定吸附力(N/cm²)', digits=(16, 2))
|
||||
magnetic_field_height = fields.Float('磁场高度(mm)', digits=(16, 2))
|
||||
magnetic_pole_plate_grinding_allowance = fields.Float('磁极板磨削余量(mm)', digits=(16, 2))
|
||||
|
||||
# '转接板夹具' 字段
|
||||
screw_size = fields.Float('螺牙大小(mm)', digits=(16, 2))
|
||||
via_hole_diameter = fields.Float('过孔直径(mm)', digits=(16, 2))
|
||||
|
||||
# '三爪卡盘' 字段
|
||||
mounting_hole_depth = fields.Float('安装孔深度(mm)', digits=(16, 2))
|
||||
centering_diameter = fields.Float('定心直径(mm)', digits=(16, 2))
|
||||
@@ -26,33 +26,28 @@ class FixtureModel(models.Model):
|
||||
_name = 'sf.fixture.model'
|
||||
_description = "夹具型号"
|
||||
|
||||
name = fields.Char(string="名称", size=15)
|
||||
fixture_material_id = fields.Many2one('sf.fixture.material', string="夹具物料", )
|
||||
fixture_material_type = fields.Char(string="夹具物料类型", related='fixture_material_id.name', store=True)
|
||||
multi_mounting_type_id = fields.Many2one('sf.multi_mounting.type', string="联装类型")
|
||||
brand_id = fields.Many2one('sf.machine.brand', string="品牌", domain="[('tag_ids.name', 'ilike', '夹具')]")
|
||||
clamping_way = fields.Char(string="装夹方式")
|
||||
port_type = fields.Char(string="接口类型")
|
||||
name = fields.Char(string="名称", size=50, required=True)
|
||||
fixture_material_id = fields.Many2one('sf.fixture.material', string="夹具物料", required=True)
|
||||
fixture_material_type = fields.Char(string="夹具物料类型", related='fixture_material_id.name')
|
||||
multi_mounting_type_id = fields.Many2one('sf.multi_mounting.type', string="联装类型", required=True)
|
||||
brand_id = fields.Many2one('sf.machine.brand', string="品牌")
|
||||
model_file = fields.Binary(string="3D模型图")
|
||||
active = fields.Boolean('有效', default=False)
|
||||
|
||||
length = fields.Char(string="长度(mm)")
|
||||
width = fields.Char(string="宽度(mm)")
|
||||
height = fields.Char(string="高度(mm)")
|
||||
weight = fields.Char(string="重量(kg)")
|
||||
clamp_workpiece_length_max = fields.Integer(string="夹持工件长度max(mm)")
|
||||
clamp_workpiece_width_max = fields.Integer(string="夹持工件宽度max(mm)")
|
||||
clamp_workpiece_height_max = fields.Integer(string="夹持工件高度max(mm)")
|
||||
clamp_workpiece_diameter_max = fields.Float(string="夹持工件直径max(mm)")
|
||||
maximum_carrying_weight = fields.Float(string="最大承载重量(kg)")
|
||||
maximum_clamping_force = fields.Integer(string="最大夹持力(n)")
|
||||
|
||||
materials_model_id = fields.Many2one('sf.materials.model', string="材料型号")
|
||||
driving_way = fields.Selection([('气动', '气动'), ('液压', '液压'), ('机械', '机械')], string="驱动方式")
|
||||
apply_machine_tool_type_ids = fields.Many2many('sf.machine_tool.type', 'rel_fixture_model_machine_tool_type',
|
||||
string="适用机床型号")
|
||||
through_hole_size = fields.Integer(string="过孔大小[mm]")
|
||||
screw_size = fields.Integer(string="螺牙大小[mm]")
|
||||
active = fields.Boolean('有效', default=True)
|
||||
zero_chuck_ids = fields.One2many('sf.fixture.materials.basic.parameters', 'fixture_model_id',
|
||||
string='零点卡盘基本参数')
|
||||
zero_tray_ids = fields.One2many('sf.fixture.materials.basic.parameters', 'fixture_model_id',
|
||||
string='零点托盘基本参数')
|
||||
pneumatic_fixture_ids = fields.One2many('sf.fixture.materials.basic.parameters', 'fixture_model_id',
|
||||
string='气动夹具基本参数')
|
||||
jaw_vice_fixture_ids = fields.One2many('sf.fixture.materials.basic.parameters', 'fixture_model_id',
|
||||
string='虎钳夹具基本参数')
|
||||
magnet_fixture_ids = fields.One2many('sf.fixture.materials.basic.parameters', 'fixture_model_id',
|
||||
string='磁吸夹具基本参数')
|
||||
adapter_board_fixture_ids = fields.One2many('sf.fixture.materials.basic.parameters', 'fixture_model_id',
|
||||
string='转接板夹具基本参数')
|
||||
scroll_chuck_ids = fields.One2many('sf.fixture.materials.basic.parameters', 'fixture_model_id',
|
||||
string='三爪卡盘基本参数')
|
||||
|
||||
def _get_code(self, fixture_model_type_code):
|
||||
fixture_model = self.env['sf.fixture.model'].sudo().search(
|
||||
@@ -70,14 +65,18 @@ class FixtureModel(models.Model):
|
||||
|
||||
def _onchange_fixture_material_id(self, fixture_material_id):
|
||||
if fixture_material_id:
|
||||
if fixture_material_id.name == "气动夹具":
|
||||
if self.fixture_material_id.name == "气动夹具":
|
||||
code = self._get_code("JKM-C-JJWL-QDJJ-")
|
||||
elif fixture_material_id.name == "转接板(锁板)夹具":
|
||||
code = self._get_code("JKM-C-JJWL-ZJBJJ-")
|
||||
elif fixture_material_id.name == "磁吸夹具":
|
||||
elif self.fixture_material_id.name == "转接板夹具":
|
||||
code = self._get_code("JKM-C-JJWL-ZJJJ-")
|
||||
elif self.fixture_material_id.name == "磁吸夹具":
|
||||
code = self._get_code("JKM-C-JJWL-CXJJ-")
|
||||
elif fixture_material_id.name == "虎钳夹具":
|
||||
elif self.fixture_material_id.name == "虎钳夹具":
|
||||
code = self._get_code("JKM-C-JJWL-HQJJ-")
|
||||
elif self.fixture_material_id.name == "零点托盘":
|
||||
code = self._get_code("JKM-C-JJWL-LDTP-")
|
||||
elif self.fixture_material_id.name == "三爪卡盘":
|
||||
code = self._get_code("JKM-C-JJWL-SZKP-")
|
||||
else:
|
||||
code = self._get_code("JKM-C-JJWL-LDKP-")
|
||||
return code
|
||||
|
||||
@@ -75,6 +75,8 @@ class CuttingToolModel(models.Model):
|
||||
integral_coarse_medium_fine = fields.Selection([('粗', '粗'), ('中', '中'), ('精', '精')], '粗/中/精')
|
||||
integral_run_out_accuracy_max = fields.Char('整体式刀具端跳精度max')
|
||||
integral_run_out_accuracy_min = fields.Char('整体式刀具端跳精度min')
|
||||
ramping_angle_ids = fields.One2many('sf.ramping.angle', 'standard_library_id', '坡铣角度',
|
||||
domain=lambda self: [('standard_library_id', '=', self.id)])
|
||||
|
||||
fit_blade_shape_id = fields.Many2one('maintenance.equipment.image',
|
||||
'适配刀片形状', domain=[('type', '=', '刀片形状')])
|
||||
@@ -106,12 +108,9 @@ class CuttingToolModel(models.Model):
|
||||
cutting_speed_ids = fields.One2many('sf.cutting.speed', 'standard_library_id', string='切削速度Vc')
|
||||
feed_per_tooth_ids = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
|
||||
domain=[('cutting_speed', '!=', False)])
|
||||
feed_per_tooth_ids_2 = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
|
||||
domain=[('machining_method', '!=', False)])
|
||||
feed_per_tooth_ids_3 = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
|
||||
domain=[('cutting_speed', '!=', False)])
|
||||
feed_per_tooth_ids_4 = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
|
||||
domain=[('machining_method', '!=', False)])
|
||||
|
||||
material_model_id = fields.Many2one('sf.materials.model', '材料型号')
|
||||
# 适用夹头型号可以多选
|
||||
chuck_ids = fields.Many2many(
|
||||
@@ -157,6 +156,12 @@ class CuttingToolModel(models.Model):
|
||||
active = fields.Boolean('有效', default=True)
|
||||
is_cloud = fields.Boolean('云端数据', default=False)
|
||||
|
||||
# 无用字段
|
||||
feed_per_tooth_ids_2 = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
|
||||
domain=[('machining_method', '!=', False)])
|
||||
feed_per_tooth_ids_4 = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
|
||||
domain=[('machining_method', '!=', False)])
|
||||
|
||||
def _get_ids(self, cutting_tool_type_code, factory_short_name):
|
||||
cutting_tool_type_ids = []
|
||||
for item in cutting_tool_type_code:
|
||||
|
||||
@@ -293,14 +293,28 @@ class CuttingSpeed(models.Model):
|
||||
|
||||
product_template_id = fields.Many2one('product.template')
|
||||
standard_library_id = fields.Many2one('sf.cutting_tool.standard.library', string='标准库')
|
||||
|
||||
execution_standard_id = fields.Many2one('sf.international.standards', string='执行标准', store=True)
|
||||
material_code = fields.Char('材料代号')
|
||||
material_name_id = fields.Many2one('sf.materials.model', '材料名称',
|
||||
domain="[('standards_id', '=', execution_standard_id)]")
|
||||
material_grade = fields.Char('材料牌号')
|
||||
tensile_strength = fields.Char('拉伸强度 (N/mm²)')
|
||||
hardness = fields.Integer('硬度(hrc)')
|
||||
ability_feature_library = fields.Many2one('maintenance.equipment.image', '加工方式',
|
||||
domain="[('type', '=', '加工能力')]")
|
||||
cutting_width_depth_id = fields.Many2one('sf.cutting.width.depth', '切削宽度和深度')
|
||||
process_capability = fields.Selection([('粗加工', '粗加工'), ('精加工', '精加工')], string='粗/精加工')
|
||||
cutting_speed = fields.Char('切削速度', required=True)
|
||||
cutting_speed_max = fields.Float('最大值')
|
||||
cutting_speed_min = fields.Float('最小值')
|
||||
|
||||
application = fields.Selection([('主应用', '主应用'), ('次应用', '次应用')], '主/次应用')
|
||||
|
||||
# ===============待删除字段==============
|
||||
material_id = fields.Many2one('sf.materials.model', '材料名称',
|
||||
domain="[('standards_id', '=', execution_standard_id)]")
|
||||
slope_milling_angle = fields.Integer('坡铣角度(°)')
|
||||
material_grade = fields.Char('材料牌号')
|
||||
tensile_strength = fields.Char('拉伸强度 (N/mm²)')
|
||||
hardness = fields.Integer('硬度(HRC)')
|
||||
cutting_speed_n1 = fields.Char('径向切宽 ae=100%D1 ap=1*D1 切削速度Vc')
|
||||
cutting_speed_n2 = fields.Char('径向切宽 ae=50%D1 ap=1.5*D1 切削速度Vc')
|
||||
cutting_speed_n3 = fields.Char('径向切宽 ae=25%D1 ap=L1max 切削速度Vc')
|
||||
@@ -308,7 +322,8 @@ class CuttingSpeed(models.Model):
|
||||
cutting_speed_n5 = fields.Char('径向切宽 ae=5%D1 ap=L1max 切削速度Vc')
|
||||
rough_machining = fields.Char('粗加工 Vc(m/min)')
|
||||
precision_machining = fields.Char('精加工 Vc(m/min)')
|
||||
application = fields.Selection([('主应用', '主应用'), ('次应用', '次应用')], '主/次应用')
|
||||
|
||||
# ======================================
|
||||
|
||||
def _json_cutting_speed(self, obj):
|
||||
cutting_speed_str = (0, '', {
|
||||
@@ -334,15 +349,20 @@ class CuttingSpeed(models.Model):
|
||||
class FeedPerTooth(models.Model):
|
||||
_name = 'sf.feed.per.tooth'
|
||||
_description = '每齿走刀量fz'
|
||||
_order = 'machining_method desc, blade_diameter, materials_type_id'
|
||||
_order = 'blade_diameter,cutting_width_depth_id,materials_type_id'
|
||||
|
||||
product_template_id = fields.Many2one('product.template')
|
||||
standard_library_id = fields.Many2one('sf.cutting_tool.standard.library', string='标准库')
|
||||
blade_diameter = fields.Integer('刃部直径(mm)', readonly=True)
|
||||
materials_type_id = fields.Many2one('sf.materials.model', string='材料名称', readonly=True)
|
||||
cutting_width_depth_id = fields.Many2one('sf.cutting.width.depth', '切削宽度和深度', readonly=True)
|
||||
feed_per_tooth = fields.Char('每齿走刀量 (mm/z)', size=20)
|
||||
|
||||
# =============待删除字段===========
|
||||
cutting_speed = fields.Char('径向切宽 ae(mm)')
|
||||
machining_method = fields.Selection([('直铣', '直铣'), ('坡铣', '坡铣')], string='加工方式')
|
||||
materials_type_id = fields.Many2one('sf.materials.model', string='材料型号')
|
||||
blade_diameter = fields.Integer('刃部直径(mm)', readonly=True)
|
||||
feed_per_tooth = fields.Char('每齿走刀量 (mm/z)')
|
||||
|
||||
# ================================
|
||||
|
||||
def _json_feed_per_tooth(self, obj):
|
||||
feed_per_tooth_str = (0, '', {
|
||||
@@ -382,3 +402,19 @@ class FeedPerTooth(models.Model):
|
||||
# def _compute_product_template_id(self):
|
||||
# if self.product_template_id is not None:
|
||||
# self.blade_diameter = self.product_template_id.cutting_tool_blade_diameter
|
||||
|
||||
|
||||
class CuttingWidthDepth(models.Model):
|
||||
_name = 'sf.cutting.width.depth'
|
||||
_description = '切削宽度和深度'
|
||||
|
||||
name = fields.Char('名称')
|
||||
|
||||
|
||||
class RampingAngle(models.Model):
|
||||
_name = 'sf.ramping.angle'
|
||||
_description = '坡铣角度'
|
||||
|
||||
standard_library_id = fields.Many2one('sf.cutting_tool.standard.library', '刀具标准库')
|
||||
|
||||
name = fields.Char('坡铣角度')
|
||||
|
||||
@@ -18,6 +18,8 @@ access_sf_cutting_tool_type,sf_cutting_tool_type,model_sf_cutting_tool_type,base
|
||||
access_sf_functional_cutting_tool,sf_functional_cutting_tool,model_sf_functional_cutting_tool,base.group_user,1,1,1,1
|
||||
access_sf_functional_cutting_tool_model,sf_functional_cutting_tool_model,model_sf_functional_cutting_tool_model,base.group_user,1,1,1,1
|
||||
access_sf_fixture_material,sf_fixture_material,model_sf_fixture_material,base.group_user,1,1,1,1
|
||||
access_sf_fixture_materials_basic_parameters,sf_fixture_materials_basic_parameters,model_sf_fixture_materials_basic_parameters,base.group_user,1,1,1,1
|
||||
|
||||
access_sf_multi_mounting_type,sf_multi_mounting_type,model_sf_multi_mounting_type,base.group_user,1,1,1,1
|
||||
access_sf_fixture_model,sf_fixture_model,model_sf_fixture_model,base.group_user,1,1,1,1
|
||||
access_sf_functional_fixture_type,sf_functional_fixture_type,model_sf_functional_fixture_type,base.group_user,1,1,1,1
|
||||
@@ -29,6 +31,9 @@ access_sf_cutting_tool_standard_library,sf_cutting_tool_standard_library,model_s
|
||||
access_sf_tool_materials_basic_parameters,sf_tool_materials_basic_parameters,model_sf_tool_materials_basic_parameters,base.group_user,1,1,1,1
|
||||
access_sf_cutting_speed,sf_cutting_speed,model_sf_cutting_speed,base.group_user,1,1,1,1
|
||||
access_sf_feed_per_tooth,sf_feed_per_tooth,model_sf_feed_per_tooth,base.group_user,1,1,1,1
|
||||
access_sf_ramping_angle,sf_ramping_angle,model_sf_ramping_angle,base.group_user,1,1,1,1
|
||||
access_sf_cutting_width_depth,sf_cutting_width_depth,model_sf_cutting_width_depth,base.group_user,1,1,1,1
|
||||
|
||||
access_maintenance_equipment_image,maintenance_equipment_image,model_maintenance_equipment_image,base.group_user,1,1,1,1
|
||||
access_purchase_order_group_purchase,access_purchase_order_group_purchase,purchase.model_purchase_order,sf_base.group_purchase,1,1,1,0
|
||||
access_purchase_order_group_purchase_director,access_purchase_order_group_purchase_director,purchase.model_purchase_order,sf_base.group_purchase_director,1,1,1,0
|
||||
|
||||
|
@@ -151,9 +151,9 @@
|
||||
context="{'group_by' : 'multi_mounting_type_id'}"/>
|
||||
</group>
|
||||
<filter name="filter_active" string="已归档" domain="[('active','=',False)]"/>
|
||||
|
||||
<searchpanel class="account_root">
|
||||
<searchpanel>
|
||||
<field name="fixture_material_id" icon="fa-filter"/>
|
||||
<field name="brand_id" icon="fa-filter"/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
@@ -163,12 +163,17 @@
|
||||
<field name="name">夹具型号</field>
|
||||
<field name="model">sf.fixture.model</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="夹具型号" create="0" edit="0" delete="1">
|
||||
<tree string="夹具型号" create="0" edit="0" delete="0">
|
||||
<field name="code"/>
|
||||
<field name="name" string="名称"/>
|
||||
<field name="brand_id"/>
|
||||
<field name="name"/>
|
||||
<field name="fixture_material_id"/>
|
||||
<field name="multi_mounting_type_id"/>
|
||||
<field name="create_uid" string="创建人"/>
|
||||
<field name="create_date" string="创建时间"/>
|
||||
<field name="write_uid" string="更新人"/>
|
||||
<field name="write_date" string="更新时间"/>
|
||||
<field name="active" string="状态" widget="boolean_toggle"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -181,15 +186,19 @@
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
<field name="name" required="1" placeholder="名称"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="code" force_save="1" readonly="1"/>
|
||||
<field name="fixture_material_id" options="{'no_create': True}"/>
|
||||
<field name="code" readonly="1" force_save="1"/>
|
||||
<field name="fixture_material_id" options="{'no_create': True}" required="1"/>
|
||||
<field name="fixture_material_type" invisible="1"/>
|
||||
<field name="multi_mounting_type_id" options="{'no_create': True}"/>
|
||||
<field name="multi_mounting_type_id" options="{'no_create': True}" required="1"/>
|
||||
<field name="brand_id" required="1"
|
||||
domain="[('tag_ids', '=', '夹具')]"
|
||||
options="{'no_create': True}"/>
|
||||
<field name="active" string="状态" widget="boolean_toggle"/>
|
||||
</group>
|
||||
<group>
|
||||
<!-- <field name="upload_model_file" widget="many2many_binary"/>-->
|
||||
@@ -198,67 +207,192 @@
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="参数"
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("气动夹具","转接板(锁板)夹具","磁吸夹具","虎钳夹具","零点卡盘"))]}'>
|
||||
<group>
|
||||
<group>
|
||||
<field name="brand_id" options="{'no_create': True}"/>
|
||||
<label for="length" string="尺寸(mm)"/>
|
||||
<div class="test_model">
|
||||
<label for="length" string="长"/>
|
||||
<field name="length" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="width" string="宽"/>
|
||||
<field name="width" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="height" string="高"/>
|
||||
<field name="height" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="weight"></field>
|
||||
<field name="materials_model_id" options="{'no_create': True}"/>
|
||||
<field name="clamping_way"
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("气动夹具","磁吸夹具","虎钳夹具"))]}'/>
|
||||
<field name="port_type"
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("气动夹具","磁吸夹具","虎钳夹具"))]}'/>
|
||||
<field name="through_hole_size"
|
||||
attrs='{"invisible": [("fixture_material_type","!=",("转接板(锁板)夹具"))]}'/>
|
||||
<field name="screw_size"
|
||||
attrs='{"invisible": [("fixture_material_type","!=",("转接板(锁板)夹具"))]}'/>
|
||||
<field name="driving_way"
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("虎钳夹具","零点卡盘"))]}'/>
|
||||
<field name="apply_machine_tool_type_ids" widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
attrs='{"invisible": [("fixture_material_type","!=",("零点卡盘"))]}'/>
|
||||
</group>
|
||||
<group>
|
||||
<label for="length" string="夹持工件最大尺寸(mm)"
|
||||
attrs='{"invisible": [("fixture_material_type","=",("零点卡盘"))]}'/>
|
||||
<div class="test_model"
|
||||
attrs='{"invisible": [("fixture_material_type","=",("零点卡盘"))]}'>
|
||||
<label for="clamp_workpiece_length_max" string="长"/>
|
||||
<field name="clamp_workpiece_length_max" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="clamp_workpiece_width_max" string="宽"/>
|
||||
<field name="clamp_workpiece_width_max" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="clamp_workpiece_height_max" string="高"/>
|
||||
<field name="clamp_workpiece_height_max" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/>
|
||||
</div>
|
||||
<field name="clamp_workpiece_diameter_max" string="夹持工件最大直径(mm)"
|
||||
attrs="{'invisible': [('fixture_material_type','=','零点卡盘')],'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/>
|
||||
<field name="maximum_carrying_weight"></field>
|
||||
<field name="maximum_clamping_force"></field>
|
||||
</group>
|
||||
</group>
|
||||
<page string="基本参数">
|
||||
<field name="zero_chuck_ids"
|
||||
attrs="{'invisible': [('fixture_material_type', '!=', '零点卡盘')]}">
|
||||
<tree editable="bottom" class="center" delete="0">
|
||||
<field name="name"/>
|
||||
<field name="length"/>
|
||||
<field name="width"/>
|
||||
<field name="height"/>
|
||||
<field name="diameter"/>
|
||||
<field name="weight"/>
|
||||
<field name="orientation_dish_diameter"/>
|
||||
<field name="clamping_diameter"/>
|
||||
<field name="clamping_num"/>
|
||||
<field name="chucking_power_max"/>
|
||||
<field name="repeated_positioning_accuracy"/>
|
||||
<field name="boolean_transposing_hole"/>
|
||||
<field name="unlocking_method"/>
|
||||
<field name="boolean_chip_blowing_function"/>
|
||||
<field name="carrying_capacity_max"/>
|
||||
<field name="materials_model_id" options="{'no_create': True}"
|
||||
placeholder="请选择"/>
|
||||
<field name="rigidity"/>
|
||||
<field name="machine_tool_type_id" options="{'no_create': True}"
|
||||
placeholder="请选择"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="zero_tray_ids"
|
||||
attrs="{'invisible': [('fixture_material_type', '!=', '零点托盘')]}">
|
||||
<tree editable="bottom" class="center" delete="0">
|
||||
<field name="name"/>
|
||||
<field name="length"/>
|
||||
<field name="width"/>
|
||||
<field name="height"/>
|
||||
<field name="diameter"/>
|
||||
<field name="weight"/>
|
||||
<field name="clamping_diameter"/>
|
||||
<field name="connector_diameter"/>
|
||||
<field name="chucking_power_max"/>
|
||||
<field name="repeated_positioning_accuracy"/>
|
||||
<field name="boolean_chip_blowing_function"/>
|
||||
<field name="way_to_install"/>
|
||||
<field name="type_of_drive"/>
|
||||
<field name="carrying_capacity_max"/>
|
||||
<field name="materials_model_id" options="{'no_create': True}"
|
||||
placeholder="请选择"/>
|
||||
<field name="rigidity"/>
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
<field name="pneumatic_fixture_ids"
|
||||
attrs="{'invisible': [('fixture_material_type', '!=', '气动夹具')]}">
|
||||
<tree editable="bottom" class="center" delete="0">
|
||||
<field name="name"/>
|
||||
<field name="length"/>
|
||||
<field name="width"/>
|
||||
<field name="height"/>
|
||||
<field name="weight"/>
|
||||
<field name="gripper_length_min"/>
|
||||
<field name="gripper_width_min"/>
|
||||
<field name="gripper_height_min"/>
|
||||
<field name="gripper_length_max"/>
|
||||
<field name="gripper_width_max"/>
|
||||
<field name="gripper_height_max"/>
|
||||
<field name="gripper_diameter_min"/>
|
||||
<field name="gripper_diameter_max"/>
|
||||
<field name="chucking_power_max"/>
|
||||
<field name="carrying_capacity_max"/>
|
||||
<field name="rated_air_pressure"/>
|
||||
<field name="materials_model_id" options="{'no_create': True}"
|
||||
placeholder="请选择"/>
|
||||
<field name="rigidity"/>
|
||||
<field name="interface_materials_model_id" options="{'no_create': True}"
|
||||
placeholder="请选择"/>
|
||||
<field name="type_of_drive"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="jaw_vice_fixture_ids"
|
||||
attrs="{'invisible': [('fixture_material_type', '!=', '虎钳夹具')]}">
|
||||
<tree editable="bottom" class="center" delete="0">
|
||||
<field name="name"/>
|
||||
<field name="length"/>
|
||||
<field name="width"/>
|
||||
<field name="height"/>
|
||||
<field name="weight"/>
|
||||
<field name="gripper_length_min"/>
|
||||
<field name="gripper_width_min"/>
|
||||
<field name="gripper_height_min"/>
|
||||
<field name="gripper_length_max"/>
|
||||
<field name="gripper_width_max"/>
|
||||
<field name="gripper_height_max"/>
|
||||
<field name="gripper_diameter_min"/>
|
||||
<field name="gripper_diameter_max"/>
|
||||
<field name="chucking_power_max"/>
|
||||
<field name="carrying_capacity_max"/>
|
||||
<field name="transverse_groove"/>
|
||||
<field name="longitudinal_fitting_groove"/>
|
||||
<field name="materials_model_id" options="{'no_create': True}"
|
||||
placeholder="请选择"/>
|
||||
<field name="rigidity"/>
|
||||
<field name="interface_materials_model_id" options="{'no_create': True}"
|
||||
placeholder="请选择"/>
|
||||
<field name="type_of_drive"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="magnet_fixture_ids"
|
||||
attrs="{'invisible': [('fixture_material_type', '!=', '磁吸夹具')]}">
|
||||
<tree editable="bottom" class="center" delete="0">
|
||||
<field name="name"/>
|
||||
<field name="length"/>
|
||||
<field name="width"/>
|
||||
<field name="height"/>
|
||||
<field name="height_tolerance_value"/>
|
||||
<field name="weight"/>
|
||||
<field name="gripper_length_min"/>
|
||||
<field name="gripper_width_min"/>
|
||||
<field name="gripper_height_min"/>
|
||||
<field name="gripper_length_max"/>
|
||||
<field name="gripper_width_max"/>
|
||||
<field name="gripper_height_max"/>
|
||||
<field name="gripper_diameter_min"/>
|
||||
<field name="gripper_diameter_max"/>
|
||||
<field name="rated_adsorption_force"/>
|
||||
<field name="magnetic_field_height"/>
|
||||
<field name="magnetic_pole_plate_grinding_allowance"/>
|
||||
<field name="carrying_capacity_max"/>
|
||||
<field name="materials_model_id" options="{'no_create': True}"
|
||||
placeholder="请选择"/>
|
||||
<field name="rigidity"/>
|
||||
<field name="interface_materials_model_id" options="{'no_create': True}"
|
||||
placeholder="请选择"/>
|
||||
<field name="type_of_drive"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="adapter_board_fixture_ids"
|
||||
attrs="{'invisible': [('fixture_material_type', '!=', '转接板夹具')]}">
|
||||
<tree editable="bottom" class="center" delete="0">
|
||||
<field name="name"/>
|
||||
<field name="length"/>
|
||||
<field name="width"/>
|
||||
<field name="height"/>
|
||||
<field name="weight"/>
|
||||
<field name="gripper_length_min"/>
|
||||
<field name="gripper_width_min"/>
|
||||
<field name="gripper_height_min"/>
|
||||
<field name="gripper_length_max"/>
|
||||
<field name="gripper_width_max"/>
|
||||
<field name="gripper_height_max"/>
|
||||
<field name="gripper_diameter_min"/>
|
||||
<field name="gripper_diameter_max"/>
|
||||
<field name="chucking_power_max"/>
|
||||
<field name="carrying_capacity_max"/>
|
||||
<field name="materials_model_id" options="{'no_create': True}"
|
||||
placeholder="请选择"/>
|
||||
<field name="rigidity"/>
|
||||
<field name="screw_size"/>
|
||||
<field name="via_hole_diameter"/>
|
||||
<field name="type_of_drive"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="scroll_chuck_ids"
|
||||
attrs="{'invisible': [('fixture_material_type', '!=', '三爪卡盘')]}">
|
||||
<tree editable="bottom" class="center" delete="0">
|
||||
<field name="name"/>
|
||||
<field name="length"/>
|
||||
<field name="width"/>
|
||||
<field name="height"/>
|
||||
<field name="diameter"/>
|
||||
<field name="weight"/>
|
||||
<field name="gripper_length_min"/>
|
||||
<field name="gripper_width_min"/>
|
||||
<field name="gripper_height_min"/>
|
||||
<field name="gripper_length_max"/>
|
||||
<field name="gripper_width_max"/>
|
||||
<field name="gripper_height_max"/>
|
||||
<field name="gripper_diameter_min"/>
|
||||
<field name="gripper_diameter_max"/>
|
||||
<field name="chucking_power_max"/>
|
||||
<field name="carrying_capacity_max"/>
|
||||
<field name="materials_model_id" options="{'no_create': True}"
|
||||
placeholder="请选择"/>
|
||||
<field name="rigidity"/>
|
||||
<field name="mounting_hole_depth"/>
|
||||
<field name="centering_diameter"/>
|
||||
<field name="type_of_drive"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
|
||||
@@ -149,6 +149,8 @@
|
||||
options="{'format': false}"/>
|
||||
<span>(mm)&nbsp;</span>
|
||||
</div>
|
||||
<field name="ramping_angle_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutter_bar_ids" widget="many2many_tags"
|
||||
options="{'no_create': True}" search="[]"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
@@ -274,7 +276,7 @@
|
||||
<field name="min_machining_aperture" class="diameter"/>
|
||||
<field name="install_blade_tip_num"/>
|
||||
<field name="cutting_blade_model"/>
|
||||
<field name="is_cooling_hole" />
|
||||
<field name="is_cooling_hole"/>
|
||||
<field name="locating_slot_code"/>
|
||||
<field name="installing_structure"/>
|
||||
<field name="blade_ids" widget="many2many_tags" placeholder="请选择"/>
|
||||
@@ -304,7 +306,7 @@
|
||||
<field name="screw"/>
|
||||
<field name="spanner"/>
|
||||
<field name="cutting_blade_model"/>
|
||||
<field name="is_cooling_hole" />
|
||||
<field name="is_cooling_hole"/>
|
||||
<field name="locating_slot_code"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -328,11 +330,11 @@
|
||||
<field name="max_rotate_speed"/>
|
||||
<field name="diameter_slip_accuracy"/>
|
||||
<field name="cooling_model"/>
|
||||
<field name="is_rough_machining" />
|
||||
<field name="is_finish_machining" />
|
||||
<field name="is_quick_cutting" />
|
||||
<field name="is_drill_hole" />
|
||||
<field name="is_safe_lock" />
|
||||
<field name="is_rough_machining"/>
|
||||
<field name="is_finish_machining"/>
|
||||
<field name="is_quick_cutting"/>
|
||||
<field name="is_drill_hole"/>
|
||||
<field name="is_safe_lock"/>
|
||||
<field name="screw"/>
|
||||
<field name="spanner"/>
|
||||
</tree>
|
||||
@@ -364,23 +366,21 @@
|
||||
<page string="切削速度Vc"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}">
|
||||
<field name="cutting_speed_ids">
|
||||
<tree editable="bottom" class="center" delete="1">
|
||||
<tree editable="bottom" class="center mrs_cutting_speed_tree" delete="1">
|
||||
<field name="execution_standard_id" placeholder="请选择" required="1"/>
|
||||
<field name="material_code" readonly="1"/>
|
||||
<field name="material_id" placeholder="请选择"
|
||||
attrs="{'readonly': [('execution_standard_id', '=', False)], 'required': [('execution_standard_id', '!=', False)]}"/>
|
||||
<field name="material_name_id" placeholder="请选择"
|
||||
attrs="{'readonly': [('execution_standard_id', '=', False)],
|
||||
'required': [('execution_standard_id', '!=', False)]}"/>
|
||||
<field name="material_grade" readonly="1"/>
|
||||
<field name="tensile_strength" readonly="1"/>
|
||||
<field name="hardness" readonly="1"/>
|
||||
<field name="slope_milling_angle" widget="du"/>
|
||||
<field name="cutting_speed_n1"/>
|
||||
<field name="cutting_speed_n2"/>
|
||||
<field name="cutting_speed_n3"/>
|
||||
<field name="cutting_speed_n4"/>
|
||||
<field name="cutting_speed_n5"/>
|
||||
<field name="rough_machining"/>
|
||||
<field name="precision_machining"/>
|
||||
<field name="application" placeholder="请选择" required="1"/>
|
||||
<field name="ability_feature_library"/>
|
||||
<field name="cutting_width_depth_id"/>
|
||||
<field name="process_capability"/>
|
||||
<field name="cutting_speed"/>
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
@@ -389,33 +389,18 @@
|
||||
<field name="feed_per_tooth_ids"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具'))]}">
|
||||
<tree editable="bottom" class="center" create="0" delete="0">
|
||||
<field name="cutting_speed"/>
|
||||
<field name="blade_diameter"/>
|
||||
<field name="feed_per_tooth" required="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="feed_per_tooth_ids_2"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具'))]}">
|
||||
<tree editable="bottom" class="center" create="0" delete="0">
|
||||
<field name="machining_method"/>
|
||||
<field name="cutting_width_depth_id"/>
|
||||
<field name="materials_type_id"/>
|
||||
<field name="blade_diameter"/>
|
||||
<field name="feed_per_tooth" required="1"/>
|
||||
<field name="feed_per_tooth"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="feed_per_tooth_ids_3"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}">
|
||||
<tree editable="bottom" class="center" create="0" delete="0">
|
||||
<field name="cutting_speed"/>
|
||||
<field name="feed_per_tooth" required="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="feed_per_tooth_ids_4"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}">
|
||||
<tree editable="bottom" class="center" create="0" delete="0">
|
||||
<field name="machining_method"/>
|
||||
<field name="cutting_width_depth_id"/>
|
||||
<field name="materials_type_id"/>
|
||||
<field name="feed_per_tooth" required="1"/>
|
||||
<field name="feed_per_tooth"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
@@ -508,34 +493,31 @@
|
||||
<field name="domain">[]</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================刀具基础参数================================================ -->
|
||||
<!-- <record id="view_sf_tool_materials_basic_parameters_tree" model="ir.ui.view">-->
|
||||
<!-- <field name="name">sf.tool.materials.basic.parameters.tree</field>-->
|
||||
<!-- <field name="model">sf.tool.materials.basic.parameters</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <tree string="基础参数" delete="0" create="0">-->
|
||||
<!-- <field name="total_length" />-->
|
||||
<!-- <field name="blade_number" />-->
|
||||
<!-- <field name="neck_diameter"/>-->
|
||||
<!-- <field name="neck_length"/>-->
|
||||
<!-- <field name="handle_diameter" />-->
|
||||
<!-- <field name="handle_length" />-->
|
||||
<!-- <field name="blade_tip_diameter"/>-->
|
||||
<!-- <field name="blade_tip_working_size"/>-->
|
||||
<!-- <field name="blade_tip_taper" />-->
|
||||
<!-- <field name="blade_diameter" />-->
|
||||
<!-- <field name="blade_length"/>-->
|
||||
<!-- <field name="blade_helix_angle"/>-->
|
||||
<!-- <field name="blade_width" />-->
|
||||
<!-- <field name="blade_width" />-->
|
||||
<!-- <field name="pitch"/>-->
|
||||
<!-- <field name="cutting_depth"/>-->
|
||||
<!-- </tree>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
|
||||
|
||||
<!-- ================================================刀具基础参数================================================ -->
|
||||
<!-- <record id="view_sf_tool_materials_basic_parameters_tree" model="ir.ui.view">-->
|
||||
<!-- <field name="name">sf.tool.materials.basic.parameters.tree</field>-->
|
||||
<!-- <field name="model">sf.tool.materials.basic.parameters</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <tree string="基础参数" delete="0" create="0">-->
|
||||
<!-- <field name="total_length" />-->
|
||||
<!-- <field name="blade_number" />-->
|
||||
<!-- <field name="neck_diameter"/>-->
|
||||
<!-- <field name="neck_length"/>-->
|
||||
<!-- <field name="handle_diameter" />-->
|
||||
<!-- <field name="handle_length" />-->
|
||||
<!-- <field name="blade_tip_diameter"/>-->
|
||||
<!-- <field name="blade_tip_working_size"/>-->
|
||||
<!-- <field name="blade_tip_taper" />-->
|
||||
<!-- <field name="blade_diameter" />-->
|
||||
<!-- <field name="blade_length"/>-->
|
||||
<!-- <field name="blade_helix_angle"/>-->
|
||||
<!-- <field name="blade_width" />-->
|
||||
<!-- <field name="blade_width" />-->
|
||||
<!-- <field name="pitch"/>-->
|
||||
<!-- <field name="cutting_depth"/>-->
|
||||
<!-- </tree>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -912,7 +912,7 @@
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//notebook" position="before">
|
||||
<group string="加工能力" attrs="{'invisible': [('equipment_type', '!=', '机床')]}" >
|
||||
<group string="加工能力" attrs="{'invisible': [('equipment_type', '!=', '机床')]}" class="processingMethod">
|
||||
<div>
|
||||
<field name='image_id' widget="custom_many2many_checkboxes" string="">
|
||||
|
||||
@@ -924,7 +924,7 @@
|
||||
</field>
|
||||
</div>
|
||||
</group>
|
||||
<group string="冷却方式" attrs="{'invisible': [('equipment_type', '!=', '机床')]}">
|
||||
<group string="冷却方式" attrs="{'invisible': [('equipment_type', '!=', '机床')]}" class="processingMethod">
|
||||
<div>
|
||||
<field name='image_lq_id' widget="custom_many2many_checkboxes" string="">
|
||||
|
||||
|
||||
@@ -296,6 +296,12 @@ class RealTimeDistributionOfFunctionalTools(models.Model):
|
||||
sf_functional_tool_assembly_ids = fields.Many2many('sf.functional.tool.assembly', 'sf_functional_tool_assembly_ref',
|
||||
'功能刀具组装单', readonly=True)
|
||||
|
||||
@api.constrains('min_stock_num', 'max_stock_num')
|
||||
def _check_stock_num(self):
|
||||
for obj in self:
|
||||
if obj.min_stock_num > obj.min_stock_num:
|
||||
raise ValidationError('【最低安全库存】不能高于【最高安全库存】!!!')
|
||||
|
||||
@api.model
|
||||
def _read_mrs_cutting_tool_type_ids(self, categories, domain, order):
|
||||
mrs_cutting_tool_type_ids = categories._search([], order=order, access_rights_uid=SUPERUSER_ID)
|
||||
@@ -327,7 +333,6 @@ class RealTimeDistributionOfFunctionalTools(models.Model):
|
||||
else:
|
||||
tool.batch_replenishment_num = 0
|
||||
|
||||
|
||||
def create_functional_tool_assembly(self):
|
||||
"""
|
||||
创建功能刀具组装单
|
||||
@@ -673,7 +678,7 @@ class FunctionalToolAssembly(models.Model):
|
||||
knife_tip_r_angle = fields.Float(string='刀尖R角(mm)', readonly=True)
|
||||
coarse_middle_thin = fields.Selection([("1", "粗"), ('2', '中'), ('3', '精')], string='粗/中/精', readonly=True)
|
||||
new_former = fields.Selection([('0', '新'), ('1', '旧')], string='新/旧', readonly=True)
|
||||
tool_loading_length = fields.Float(strin='总长度(mm)', readonly=True)
|
||||
tool_loading_length = fields.Float(string='总长度(mm)', readonly=True)
|
||||
functional_tool_length = fields.Float(string='伸出长(mm)', readonly=True)
|
||||
effective_length = fields.Float(string='有效长(mm)', readonly=True)
|
||||
loading_task_source = fields.Selection([('0', 'CAM装刀'), ('1', '机台换刀'), ('2', '按库存组装')],
|
||||
|
||||
@@ -1099,7 +1099,7 @@
|
||||
<field name="functional_tool_type_id"/>
|
||||
<field name="functional_tool_diameter" string="刀具直径(mm)"/>
|
||||
<field name="knife_tip_r_angle"/>
|
||||
<field name="tool_loading_length"/>
|
||||
<field name="tool_loading_length" string="总长度(mm)"/>
|
||||
<field name="functional_tool_length"/>
|
||||
<field name="effective_length"/>
|
||||
</group>
|
||||
|
||||
Reference in New Issue
Block a user