1、新增夹具物料基本参数模型,重构工厂的夹具型号模型,重新优化夹具物料form视图;2、优化刀具标准库模型,优化切削速度模型,优化每齿走刀量模型,新增切削宽度和深度模型,新增坡铣角度模型;3、优化功能刀具安全库存最低安全库存可以高于最高库存的bug;

This commit is contained in:
yuxianghui
2023-12-28 17:06:34 +08:00
parent 032b13b2ad
commit b2bb2e33de
9 changed files with 412 additions and 177 deletions

View File

@@ -4,3 +4,4 @@ from . import tool_base_new
from . import fixture from . import fixture
from . import functional_fixture from . import functional_fixture
from . import tool_other_features from . import tool_other_features
from . import basic_parameters_fixture

View 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))

View File

@@ -26,33 +26,28 @@ class FixtureModel(models.Model):
_name = 'sf.fixture.model' _name = 'sf.fixture.model'
_description = "夹具型号" _description = "夹具型号"
name = fields.Char(string="名称", size=15) name = fields.Char(string="名称", size=50, required=True)
fixture_material_id = fields.Many2one('sf.fixture.material', string="夹具物料", ) fixture_material_id = fields.Many2one('sf.fixture.material', string="夹具物料", required=True)
fixture_material_type = fields.Char(string="夹具物料类型", related='fixture_material_id.name', store=True) fixture_material_type = fields.Char(string="夹具物料类型", related='fixture_material_id.name')
multi_mounting_type_id = fields.Many2one('sf.multi_mounting.type', string="联装类型") multi_mounting_type_id = fields.Many2one('sf.multi_mounting.type', string="联装类型", required=True)
brand_id = fields.Many2one('sf.machine.brand', string="品牌", domain="[('tag_ids.name', 'ilike', '夹具')]") brand_id = fields.Many2one('sf.machine.brand', string="品牌")
clamping_way = fields.Char(string="装夹方式")
port_type = fields.Char(string="接口类型")
model_file = fields.Binary(string="3D模型图") model_file = fields.Binary(string="3D模型图")
active = fields.Boolean('有效', default=False)
length = fields.Char(string="长度(mm)") zero_chuck_ids = fields.One2many('sf.fixture.materials.basic.parameters', 'fixture_model_id',
width = fields.Char(string="宽度(mm)") string='零点卡盘基本参数')
height = fields.Char(string="高度(mm)") zero_tray_ids = fields.One2many('sf.fixture.materials.basic.parameters', 'fixture_model_id',
weight = fields.Char(string="重量(kg)") string='零点托盘基本参数')
clamp_workpiece_length_max = fields.Integer(string="夹持工件长度max(mm)") pneumatic_fixture_ids = fields.One2many('sf.fixture.materials.basic.parameters', 'fixture_model_id',
clamp_workpiece_width_max = fields.Integer(string="夹持工件宽度max(mm)") string='气动夹具基本参数')
clamp_workpiece_height_max = fields.Integer(string="夹持工件高度max(mm)") jaw_vice_fixture_ids = fields.One2many('sf.fixture.materials.basic.parameters', 'fixture_model_id',
clamp_workpiece_diameter_max = fields.Float(string="夹持工件直径max(mm)") string='虎钳夹具基本参数')
maximum_carrying_weight = fields.Float(string="最大承载重量(kg)") magnet_fixture_ids = fields.One2many('sf.fixture.materials.basic.parameters', 'fixture_model_id',
maximum_clamping_force = fields.Integer(string="最大夹持力(n)") string='磁吸夹具基本参数')
adapter_board_fixture_ids = fields.One2many('sf.fixture.materials.basic.parameters', 'fixture_model_id',
materials_model_id = fields.Many2one('sf.materials.model', string="材料型号") string='转接板夹具基本参数')
driving_way = fields.Selection([('气动', '气动'), ('液压', '液压'), ('机械', '机械')], string="驱动方式") scroll_chuck_ids = fields.One2many('sf.fixture.materials.basic.parameters', 'fixture_model_id',
apply_machine_tool_type_ids = fields.Many2many('sf.machine_tool.type', 'rel_fixture_model_machine_tool_type', string='三爪卡盘基本参数')
string="适用机床型号")
through_hole_size = fields.Integer(string="过孔大小[mm]")
screw_size = fields.Integer(string="螺牙大小[mm]")
active = fields.Boolean('有效', default=True)
def _get_code(self, fixture_model_type_code): def _get_code(self, fixture_model_type_code):
fixture_model = self.env['sf.fixture.model'].sudo().search( 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): def _onchange_fixture_material_id(self, fixture_material_id):
if 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-") code = self._get_code("JKM-C-JJWL-QDJJ-")
elif fixture_material_id.name == "转接板(锁板)夹具": elif self.fixture_material_id.name == "转接板夹具":
code = self._get_code("JKM-C-JJWL-ZJBJJ-") code = self._get_code("JKM-C-JJWL-ZJJJ-")
elif fixture_material_id.name == "磁吸夹具": elif self.fixture_material_id.name == "磁吸夹具":
code = self._get_code("JKM-C-JJWL-CXJJ-") 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-") 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: else:
code = self._get_code("JKM-C-JJWL-LDKP-") code = self._get_code("JKM-C-JJWL-LDKP-")
return code return code

View File

@@ -75,6 +75,8 @@ class CuttingToolModel(models.Model):
integral_coarse_medium_fine = fields.Selection([('', ''), ('', ''), ('', '')], '粗/中/精') integral_coarse_medium_fine = fields.Selection([('', ''), ('', ''), ('', '')], '粗/中/精')
integral_run_out_accuracy_max = fields.Char('整体式刀具端跳精度max') integral_run_out_accuracy_max = fields.Char('整体式刀具端跳精度max')
integral_run_out_accuracy_min = fields.Char('整体式刀具端跳精度min') 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', fit_blade_shape_id = fields.Many2one('maintenance.equipment.image',
'适配刀片形状', domain=[('type', '=', '刀片形状')]) '适配刀片形状', domain=[('type', '=', '刀片形状')])
@@ -106,12 +108,9 @@ class CuttingToolModel(models.Model):
cutting_speed_ids = fields.One2many('sf.cutting.speed', 'standard_library_id', string='切削速度Vc') 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', feed_per_tooth_ids = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
domain=[('cutting_speed', '!=', False)]) 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', feed_per_tooth_ids_3 = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
domain=[('cutting_speed', '!=', False)]) 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', '材料型号') material_model_id = fields.Many2one('sf.materials.model', '材料型号')
# 适用夹头型号可以多选 # 适用夹头型号可以多选
chuck_ids = fields.Many2many( chuck_ids = fields.Many2many(
@@ -157,6 +156,12 @@ class CuttingToolModel(models.Model):
active = fields.Boolean('有效', default=True) active = fields.Boolean('有效', default=True)
is_cloud = fields.Boolean('云端数据', default=False) 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): def _get_ids(self, cutting_tool_type_code, factory_short_name):
cutting_tool_type_ids = [] cutting_tool_type_ids = []
for item in cutting_tool_type_code: for item in cutting_tool_type_code:

View File

@@ -293,14 +293,28 @@ class CuttingSpeed(models.Model):
product_template_id = fields.Many2one('product.template') product_template_id = fields.Many2one('product.template')
standard_library_id = fields.Many2one('sf.cutting_tool.standard.library', string='标准库') standard_library_id = fields.Many2one('sf.cutting_tool.standard.library', string='标准库')
execution_standard_id = fields.Many2one('sf.international.standards', string='执行标准', store=True) execution_standard_id = fields.Many2one('sf.international.standards', string='执行标准', store=True)
material_code = fields.Char('材料代号') 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', '材料名称', material_id = fields.Many2one('sf.materials.model', '材料名称',
domain="[('standards_id', '=', execution_standard_id)]") domain="[('standards_id', '=', execution_standard_id)]")
slope_milling_angle = fields.Integer('坡铣角度(°)') 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_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_n2 = fields.Char('径向切宽 ae=50%D1 ap=1.5*D1 切削速度Vc')
cutting_speed_n3 = fields.Char('径向切宽 ae=25%D1 ap=L1max 切削速度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') cutting_speed_n5 = fields.Char('径向切宽 ae=5%D1 ap=L1max 切削速度Vc')
rough_machining = fields.Char('粗加工 Vc(m/min)') rough_machining = fields.Char('粗加工 Vc(m/min)')
precision_machining = fields.Char('精加工 Vc(m/min)') precision_machining = fields.Char('精加工 Vc(m/min)')
application = fields.Selection([('主应用', '主应用'), ('次应用', '次应用')], '主/次应用')
# ======================================
def _json_cutting_speed(self, obj): def _json_cutting_speed(self, obj):
cutting_speed_str = (0, '', { cutting_speed_str = (0, '', {
@@ -334,15 +349,20 @@ class CuttingSpeed(models.Model):
class FeedPerTooth(models.Model): class FeedPerTooth(models.Model):
_name = 'sf.feed.per.tooth' _name = 'sf.feed.per.tooth'
_description = '每齿走刀量fz' _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') product_template_id = fields.Many2one('product.template')
standard_library_id = fields.Many2one('sf.cutting_tool.standard.library', string='标准库') 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)') cutting_speed = fields.Char('径向切宽 ae(mm)')
machining_method = fields.Selection([('直铣', '直铣'), ('坡铣', '坡铣')], string='加工方式') 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): def _json_feed_per_tooth(self, obj):
feed_per_tooth_str = (0, '', { feed_per_tooth_str = (0, '', {
@@ -382,3 +402,19 @@ class FeedPerTooth(models.Model):
# def _compute_product_template_id(self): # def _compute_product_template_id(self):
# if self.product_template_id is not None: # if self.product_template_id is not None:
# self.blade_diameter = self.product_template_id.cutting_tool_blade_diameter # 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('坡铣角度')

View File

@@ -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,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_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_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_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_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 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_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_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_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_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,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 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
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
18 access_sf_functional_cutting_tool sf_functional_cutting_tool model_sf_functional_cutting_tool base.group_user 1 1 1 1
19 access_sf_functional_cutting_tool_model sf_functional_cutting_tool_model model_sf_functional_cutting_tool_model base.group_user 1 1 1 1
20 access_sf_fixture_material sf_fixture_material model_sf_fixture_material base.group_user 1 1 1 1
21 access_sf_fixture_materials_basic_parameters sf_fixture_materials_basic_parameters model_sf_fixture_materials_basic_parameters base.group_user 1 1 1 1
22 access_sf_multi_mounting_type sf_multi_mounting_type model_sf_multi_mounting_type base.group_user 1 1 1 1
23 access_sf_multi_mounting_type access_sf_fixture_model sf_multi_mounting_type sf_fixture_model model_sf_multi_mounting_type model_sf_fixture_model base.group_user 1 1 1 1
24 access_sf_fixture_model access_sf_functional_fixture_type sf_fixture_model sf_functional_fixture_type model_sf_fixture_model model_sf_functional_fixture_type base.group_user 1 1 1 1
25 access_sf_functional_fixture_type access_sf_functional_fixture sf_functional_fixture_type sf_functional_fixture model_sf_functional_fixture_type model_sf_functional_fixture base.group_user 1 1 1 1
31 access_sf_tool_materials_basic_parameters access_sf_cutting_speed sf_tool_materials_basic_parameters sf_cutting_speed model_sf_tool_materials_basic_parameters model_sf_cutting_speed base.group_user 1 1 1 1
32 access_sf_cutting_speed access_sf_feed_per_tooth sf_cutting_speed sf_feed_per_tooth model_sf_cutting_speed model_sf_feed_per_tooth base.group_user 1 1 1 1
33 access_sf_feed_per_tooth access_sf_ramping_angle sf_feed_per_tooth sf_ramping_angle model_sf_feed_per_tooth model_sf_ramping_angle base.group_user 1 1 1 1
34 access_sf_cutting_width_depth sf_cutting_width_depth model_sf_cutting_width_depth base.group_user 1 1 1 1
35 access_maintenance_equipment_image maintenance_equipment_image model_maintenance_equipment_image base.group_user 1 1 1 1
36 access_purchase_order_group_purchase access_purchase_order_group_purchase purchase.model_purchase_order sf_base.group_purchase 1 1 1 0
37 access_maintenance_equipment_image access_purchase_order_group_purchase_director maintenance_equipment_image access_purchase_order_group_purchase_director model_maintenance_equipment_image purchase.model_purchase_order base.group_user sf_base.group_purchase_director 1 1 1 1 0
38 access_purchase_order_group_purchase access_purchase_order_line_group_purchase access_purchase_order_group_purchase access_purchase_order_line_group_purchase purchase.model_purchase_order purchase.model_purchase_order_line sf_base.group_purchase 1 1 1 0
39 access_purchase_order_group_purchase_director access_purchase_order_line_group_purchase_director access_purchase_order_group_purchase_director access_purchase_order_line_group_purchase_director purchase.model_purchase_order purchase.model_purchase_order_line sf_base.group_purchase_director 1 1 1 0

View File

@@ -151,9 +151,9 @@
context="{'group_by' : 'multi_mounting_type_id'}"/> context="{'group_by' : 'multi_mounting_type_id'}"/>
</group> </group>
<filter name="filter_active" string="已归档" domain="[('active','=',False)]"/> <filter name="filter_active" string="已归档" domain="[('active','=',False)]"/>
<searchpanel>
<searchpanel class="account_root">
<field name="fixture_material_id" icon="fa-filter"/> <field name="fixture_material_id" icon="fa-filter"/>
<field name="brand_id" icon="fa-filter"/>
</searchpanel> </searchpanel>
</search> </search>
</field> </field>
@@ -163,12 +163,17 @@
<field name="name">夹具型号</field> <field name="name">夹具型号</field>
<field name="model">sf.fixture.model</field> <field name="model">sf.fixture.model</field>
<field name="arch" type="xml"> <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="code"/>
<field name="name" string="名称"/>
<field name="brand_id"/> <field name="brand_id"/>
<field name="name"/>
<field name="fixture_material_id"/> <field name="fixture_material_id"/>
<field name="multi_mounting_type_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> </tree>
</field> </field>
</record> </record>
@@ -181,15 +186,19 @@
<sheet> <sheet>
<div class="oe_title"> <div class="oe_title">
<h1> <h1>
<field name="name"/> <field name="name" required="1" placeholder="名称"/>
</h1> </h1>
</div> </div>
<group> <group>
<group> <group>
<field name="code" force_save="1" readonly="1"/> <field name="code" readonly="1" force_save="1"/>
<field name="fixture_material_id" options="{'no_create': True}"/> <field name="fixture_material_id" options="{'no_create': True}" required="1"/>
<field name="fixture_material_type" invisible="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>
<group> <group>
<!-- <field name="upload_model_file" widget="many2many_binary"/>--> <!-- <field name="upload_model_file" widget="many2many_binary"/>-->
@@ -198,67 +207,192 @@
</group> </group>
</group> </group>
<notebook> <notebook>
<page string="参数" <page string="基本参数">
attrs='{"invisible": [("fixture_material_type","not in",("气动夹具","转接板(锁板)夹具","磁吸夹具","虎钳夹具","零点卡盘"))]}'> <field name="zero_chuck_ids"
<group> attrs="{'invisible': [('fixture_material_type', '!=', '零点卡盘')]}">
<group> <tree editable="bottom" class="center" delete="0">
<field name="brand_id" options="{'no_create': True}"/> <field name="name"/>
<label for="length" string="尺寸(mm)"/> <field name="length"/>
<div class="test_model"> <field name="width"/>
<label for="length" string="长"/> <field name="height"/>
<field name="length" class="o_address_zip" <field name="diameter"/>
options="{'format': false}"/> <field name="weight"/>
<span>&amp;nbsp;</span> <field name="orientation_dish_diameter"/>
<label for="width" string="宽"/> <field name="clamping_diameter"/>
<field name="width" class="o_address_zip" <field name="clamping_num"/>
options="{'format': false}"/> <field name="chucking_power_max"/>
<span>&amp;nbsp;</span> <field name="repeated_positioning_accuracy"/>
<label for="height" string="高"/> <field name="boolean_transposing_hole"/>
<field name="height" class="o_address_zip" <field name="unlocking_method"/>
options="{'format': false}"/> <field name="boolean_chip_blowing_function"/>
</div> <field name="carrying_capacity_max"/>
<field name="weight"></field> <field name="materials_model_id" options="{'no_create': True}"
<field name="materials_model_id" options="{'no_create': True}"/> placeholder="请选择"/>
<field name="clamping_way" <field name="rigidity"/>
attrs='{"invisible": [("fixture_material_type","not in",("气动夹具","磁吸夹具","虎钳夹具"))]}'/> <field name="machine_tool_type_id" options="{'no_create': True}"
<field name="port_type" placeholder="请选择"/>
attrs='{"invisible": [("fixture_material_type","not in",("气动夹具","磁吸夹具","虎钳夹具"))]}'/> </tree>
<field name="through_hole_size" </field>
attrs='{"invisible": [("fixture_material_type","!=",("转接板(锁板)夹具"))]}'/> <field name="zero_tray_ids"
<field name="screw_size" attrs="{'invisible': [('fixture_material_type', '!=', '零点托盘')]}">
attrs='{"invisible": [("fixture_material_type","!=",("转接板(锁板)夹具"))]}'/> <tree editable="bottom" class="center" delete="0">
<field name="driving_way" <field name="name"/>
attrs='{"invisible": [("fixture_material_type","not in",("虎钳夹具","零点卡盘"))]}'/> <field name="length"/>
<field name="apply_machine_tool_type_ids" widget="many2many_tags" <field name="width"/>
options="{'no_create': True}" <field name="height"/>
attrs='{"invisible": [("fixture_material_type","!=",("零点卡盘"))]}'/> <field name="diameter"/>
</group> <field name="weight"/>
<group> <field name="clamping_diameter"/>
<label for="length" string="夹持工件最大尺寸(mm)" <field name="connector_diameter"/>
attrs='{"invisible": [("fixture_material_type","=",("零点卡盘"))]}'/> <field name="chucking_power_max"/>
<div class="test_model" <field name="repeated_positioning_accuracy"/>
attrs='{"invisible": [("fixture_material_type","=",("零点卡盘"))]}'> <field name="boolean_chip_blowing_function"/>
<label for="clamp_workpiece_length_max" string="长"/> <field name="way_to_install"/>
<field name="clamp_workpiece_length_max" class="o_address_zip" <field name="type_of_drive"/>
options="{'format': false}" <field name="carrying_capacity_max"/>
attrs="{'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/> <field name="materials_model_id" options="{'no_create': True}"
<span>&amp;nbsp;</span> placeholder="请选择"/>
<label for="clamp_workpiece_width_max" string="宽"/> <field name="rigidity"/>
<field name="clamp_workpiece_width_max" class="o_address_zip"
options="{'format': false}" </tree>
attrs="{'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/> </field>
<span>&amp;nbsp;</span> <field name="pneumatic_fixture_ids"
<label for="clamp_workpiece_height_max" string="高"/> attrs="{'invisible': [('fixture_material_type', '!=', '气动夹具')]}">
<field name="clamp_workpiece_height_max" class="o_address_zip" <tree editable="bottom" class="center" delete="0">
options="{'format': false}" <field name="name"/>
attrs="{'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/> <field name="length"/>
</div> <field name="width"/>
<field name="clamp_workpiece_diameter_max" string="夹持工件最大直径(mm)" <field name="height"/>
attrs="{'invisible': [('fixture_material_type','=','零点卡盘')],'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/> <field name="weight"/>
<field name="maximum_carrying_weight"></field> <field name="gripper_length_min"/>
<field name="maximum_clamping_force"></field> <field name="gripper_width_min"/>
</group> <field name="gripper_height_min"/>
</group> <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> </page>
</notebook> </notebook>
</sheet> </sheet>

View File

@@ -149,6 +149,8 @@
options="{'format': false}"/> options="{'format': false}"/>
<span>(mm)&amp;nbsp;</span> <span>(mm)&amp;nbsp;</span>
</div> </div>
<field name="ramping_angle_ids" widget="many2many_tags"
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
<field name="cutter_bar_ids" widget="many2many_tags" <field name="cutter_bar_ids" widget="many2many_tags"
options="{'no_create': True}" search="[]" options="{'no_create': True}" search="[]"
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/> attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
@@ -274,7 +276,7 @@
<field name="min_machining_aperture" class="diameter"/> <field name="min_machining_aperture" class="diameter"/>
<field name="install_blade_tip_num"/> <field name="install_blade_tip_num"/>
<field name="cutting_blade_model"/> <field name="cutting_blade_model"/>
<field name="is_cooling_hole" /> <field name="is_cooling_hole"/>
<field name="locating_slot_code"/> <field name="locating_slot_code"/>
<field name="installing_structure"/> <field name="installing_structure"/>
<field name="blade_ids" widget="many2many_tags" placeholder="请选择"/> <field name="blade_ids" widget="many2many_tags" placeholder="请选择"/>
@@ -304,7 +306,7 @@
<field name="screw"/> <field name="screw"/>
<field name="spanner"/> <field name="spanner"/>
<field name="cutting_blade_model"/> <field name="cutting_blade_model"/>
<field name="is_cooling_hole" /> <field name="is_cooling_hole"/>
<field name="locating_slot_code"/> <field name="locating_slot_code"/>
</tree> </tree>
</field> </field>
@@ -328,11 +330,11 @@
<field name="max_rotate_speed"/> <field name="max_rotate_speed"/>
<field name="diameter_slip_accuracy"/> <field name="diameter_slip_accuracy"/>
<field name="cooling_model"/> <field name="cooling_model"/>
<field name="is_rough_machining" /> <field name="is_rough_machining"/>
<field name="is_finish_machining" /> <field name="is_finish_machining"/>
<field name="is_quick_cutting" /> <field name="is_quick_cutting"/>
<field name="is_drill_hole" /> <field name="is_drill_hole"/>
<field name="is_safe_lock" /> <field name="is_safe_lock"/>
<field name="screw"/> <field name="screw"/>
<field name="spanner"/> <field name="spanner"/>
</tree> </tree>
@@ -364,23 +366,21 @@
<page string="切削速度Vc" <page string="切削速度Vc"
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}"> attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}">
<field name="cutting_speed_ids"> <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="execution_standard_id" placeholder="请选择" required="1"/>
<field name="material_code" readonly="1"/> <field name="material_code" readonly="1"/>
<field name="material_id" placeholder="请选择" <field name="material_name_id" placeholder="请选择"
attrs="{'readonly': [('execution_standard_id', '=', False)], 'required': [('execution_standard_id', '!=', False)]}"/> attrs="{'readonly': [('execution_standard_id', '=', False)],
'required': [('execution_standard_id', '!=', False)]}"/>
<field name="material_grade" readonly="1"/> <field name="material_grade" readonly="1"/>
<field name="tensile_strength" readonly="1"/> <field name="tensile_strength" readonly="1"/>
<field name="hardness" 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="application" placeholder="请选择" required="1"/>
<field name="ability_feature_library"/>
<field name="cutting_width_depth_id"/>
<field name="process_capability"/>
<field name="cutting_speed"/>
</tree> </tree>
</field> </field>
</page> </page>
@@ -389,33 +389,18 @@
<field name="feed_per_tooth_ids" <field name="feed_per_tooth_ids"
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具'))]}"> attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具'))]}">
<tree editable="bottom" class="center" create="0" delete="0"> <tree editable="bottom" class="center" create="0" delete="0">
<field name="cutting_speed"/> <field name="cutting_width_depth_id"/>
<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="materials_type_id"/> <field name="materials_type_id"/>
<field name="blade_diameter"/> <field name="blade_diameter"/>
<field name="feed_per_tooth" required="1"/> <field name="feed_per_tooth"/>
</tree> </tree>
</field> </field>
<field name="feed_per_tooth_ids_3" <field name="feed_per_tooth_ids_3"
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"> attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}">
<tree editable="bottom" class="center" create="0" delete="0"> <tree editable="bottom" class="center" create="0" delete="0">
<field name="cutting_speed"/> <field name="cutting_width_depth_id"/>
<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="materials_type_id"/> <field name="materials_type_id"/>
<field name="feed_per_tooth" required="1"/> <field name="feed_per_tooth"/>
</tree> </tree>
</field> </field>
</page> </page>
@@ -509,33 +494,30 @@
</record> </record>
<!-- ================================================刀具基础参数================================================ --> <!-- ================================================刀具基础参数================================================ -->
<!-- <record id="view_sf_tool_materials_basic_parameters_tree" model="ir.ui.view">--> <!-- <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="name">sf.tool.materials.basic.parameters.tree</field>-->
<!-- <field name="model">sf.tool.materials.basic.parameters</field>--> <!-- <field name="model">sf.tool.materials.basic.parameters</field>-->
<!-- <field name="arch" type="xml">--> <!-- <field name="arch" type="xml">-->
<!-- <tree string="基础参数" delete="0" create="0">--> <!-- <tree string="基础参数" delete="0" create="0">-->
<!-- <field name="total_length" />--> <!-- <field name="total_length" />-->
<!-- <field name="blade_number" />--> <!-- <field name="blade_number" />-->
<!-- <field name="neck_diameter"/>--> <!-- <field name="neck_diameter"/>-->
<!-- <field name="neck_length"/>--> <!-- <field name="neck_length"/>-->
<!-- <field name="handle_diameter" />--> <!-- <field name="handle_diameter" />-->
<!-- <field name="handle_length" />--> <!-- <field name="handle_length" />-->
<!-- <field name="blade_tip_diameter"/>--> <!-- <field name="blade_tip_diameter"/>-->
<!-- <field name="blade_tip_working_size"/>--> <!-- <field name="blade_tip_working_size"/>-->
<!-- <field name="blade_tip_taper" />--> <!-- <field name="blade_tip_taper" />-->
<!-- <field name="blade_diameter" />--> <!-- <field name="blade_diameter" />-->
<!-- <field name="blade_length"/>--> <!-- <field name="blade_length"/>-->
<!-- <field name="blade_helix_angle"/>--> <!-- <field name="blade_helix_angle"/>-->
<!-- <field name="blade_width" />--> <!-- <field name="blade_width" />-->
<!-- <field name="blade_width" />--> <!-- <field name="blade_width" />-->
<!-- <field name="pitch"/>--> <!-- <field name="pitch"/>-->
<!-- <field name="cutting_depth"/>--> <!-- <field name="cutting_depth"/>-->
<!-- </tree>--> <!-- </tree>-->
<!-- </field>--> <!-- </field>-->
<!-- </record>--> <!-- </record>-->
</odoo> </odoo>

View File

@@ -296,6 +296,12 @@ class RealTimeDistributionOfFunctionalTools(models.Model):
sf_functional_tool_assembly_ids = fields.Many2many('sf.functional.tool.assembly', 'sf_functional_tool_assembly_ref', sf_functional_tool_assembly_ids = fields.Many2many('sf.functional.tool.assembly', 'sf_functional_tool_assembly_ref',
'功能刀具组装单', readonly=True) '功能刀具组装单', 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 @api.model
def _read_mrs_cutting_tool_type_ids(self, categories, domain, order): 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) mrs_cutting_tool_type_ids = categories._search([], order=order, access_rights_uid=SUPERUSER_ID)
@@ -327,7 +333,6 @@ class RealTimeDistributionOfFunctionalTools(models.Model):
else: else:
tool.batch_replenishment_num = 0 tool.batch_replenishment_num = 0
def create_functional_tool_assembly(self): def create_functional_tool_assembly(self):
""" """
创建功能刀具组装单 创建功能刀具组装单