Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/修改机床参数bug
This commit is contained in:
@@ -118,7 +118,7 @@ class MachineTool(models.Model):
|
|||||||
supplier_id = fields.Many2one('res.partner', string='制造商',
|
supplier_id = fields.Many2one('res.partner', string='制造商',
|
||||||
domain="[('is_vendor', '=', True)]")
|
domain="[('is_vendor', '=', True)]")
|
||||||
registration_date = fields.Date('注册日期')
|
registration_date = fields.Date('注册日期')
|
||||||
state_zc = fields.Selection([("已注册", "已注册"), ("未注册", "未注册")], string="注册状态", default='未注册', tracking=True)
|
state_zc = fields.Selection([("已注册", "已注册"), ("未注册", "未注册")], string="注册状态", default='未注册')
|
||||||
active = fields.Boolean('有效', default=True)
|
active = fields.Boolean('有效', default=True)
|
||||||
|
|
||||||
@api.constrains('rotate_speed')
|
@api.constrains('rotate_speed')
|
||||||
@@ -279,7 +279,7 @@ class MachineToolType(models.Model):
|
|||||||
feed_speed = fields.Char('进给速度(mm/min)')
|
feed_speed = fields.Char('进给速度(mm/min)')
|
||||||
tool_speed = fields.Char('刀具速度(m/min)')
|
tool_speed = fields.Char('刀具速度(m/min)')
|
||||||
distance_min = fields.Char('主轴端面至工作台面距离MIN(mm)')
|
distance_min = fields.Char('主轴端面至工作台面距离MIN(mm)')
|
||||||
distance_max = fields.Char('主轴端面至工作台面距离MIN(mm)')
|
distance_max = fields.Char('主轴端面至工作台面距离MAX(mm)')
|
||||||
taper = fields.Char('主轴锥度(°)')
|
taper = fields.Char('主轴锥度(°)')
|
||||||
torque = fields.Char('主轴电机扭矩(n/m)')
|
torque = fields.Char('主轴电机扭矩(n/m)')
|
||||||
motor_power = fields.Char('主轴电机功率(kw)')
|
motor_power = fields.Char('主轴电机功率(kw)')
|
||||||
|
|||||||
@@ -179,3 +179,9 @@ class MrsProductionProcessParameter(models.Model):
|
|||||||
def get_gain_way(self, item):
|
def get_gain_way(self, item):
|
||||||
process_parameter = self.env['sf.production.process.parameter'].search([('id', '=', item.id)])
|
process_parameter = self.env['sf.production.process.parameter'].search([('id', '=', item.id)])
|
||||||
return process_parameter
|
return process_parameter
|
||||||
|
|
||||||
|
def _json_production_process_item_code(self, item):
|
||||||
|
code_arr = []
|
||||||
|
for i in item.parameter_ids:
|
||||||
|
code_arr.append(i.code)
|
||||||
|
return code_arr
|
||||||
|
|||||||
@@ -34,22 +34,24 @@ class FixtureModel(models.Model):
|
|||||||
clamping_way = fields.Char(string="装夹方式")
|
clamping_way = fields.Char(string="装夹方式")
|
||||||
port_type = fields.Char(string="接口类型")
|
port_type = fields.Char(string="接口类型")
|
||||||
model_file = fields.Binary(string="3D模型图")
|
model_file = fields.Binary(string="3D模型图")
|
||||||
length = fields.Char(string="长度[mm]", size=6)
|
|
||||||
width = fields.Char(string="宽度[mm]", size=6)
|
length = fields.Char(string="长度(mm)")
|
||||||
height = fields.Char(string="高度[mm]", size=6)
|
width = fields.Char(string="宽度(mm)")
|
||||||
weight = fields.Char(string="重量[kg]", size=4)
|
height = fields.Char(string="高度(mm)")
|
||||||
clamp_workpiece_length_max = fields.Integer(string="夹持工件长度MAX[mm]", size=6)
|
weight = fields.Char(string="重量(kg)")
|
||||||
clamp_workpiece_width_max = fields.Integer(string="夹持工件宽度MAX[mm]", size=6)
|
clamp_workpiece_length_max = fields.Integer(string="夹持工件长度max(mm)")
|
||||||
clamp_workpiece_height_max = fields.Integer(string="夹持工件高度MAX[mm]", size=6)
|
clamp_workpiece_width_max = fields.Integer(string="夹持工件宽度max(mm)")
|
||||||
clamp_workpiece_diameter_max = fields.Float(string="夹持工件直径MAX[mm]", size=6)
|
clamp_workpiece_height_max = fields.Integer(string="夹持工件高度max(mm)")
|
||||||
maximum_carrying_weight = fields.Float(string="最大承载重量[kg]", size=4)
|
clamp_workpiece_diameter_max = fields.Float(string="夹持工件直径max(mm)")
|
||||||
maximum_clamping_force = fields.Integer(string="最大夹持力[n]", size=8)
|
maximum_carrying_weight = fields.Float(string="最大承载重量(kg)")
|
||||||
|
maximum_clamping_force = fields.Integer(string="最大夹持力(n)")
|
||||||
|
|
||||||
materials_model_id = fields.Many2one('sf.materials.model', string="材料型号")
|
materials_model_id = fields.Many2one('sf.materials.model', string="材料型号")
|
||||||
driving_way = fields.Selection([('气动', '气动'), ('液压', '液压'), ('机械', '机械')], string="驱动方式")
|
driving_way = fields.Selection([('气动', '气动'), ('液压', '液压'), ('机械', '机械')], string="驱动方式")
|
||||||
apply_machine_tool_type_ids = fields.Many2many('sf.machine_tool.type', 'rel_fixture_model_machine_tool_type',
|
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]", size=6)
|
through_hole_size = fields.Integer(string="过孔大小[mm]")
|
||||||
screw_size = fields.Integer(string="螺牙大小[mm]", size=6)
|
screw_size = fields.Integer(string="螺牙大小[mm]")
|
||||||
active = fields.Boolean('有效', default=True)
|
active = fields.Boolean('有效', default=True)
|
||||||
|
|
||||||
def _get_code(self, fixture_model_type_code):
|
def _get_code(self, fixture_model_type_code):
|
||||||
@@ -80,7 +82,7 @@ class FixtureModel(models.Model):
|
|||||||
code = self._get_code("JKM-C-JJWL-LDKP-")
|
code = self._get_code("JKM-C-JJWL-LDKP-")
|
||||||
return code
|
return code
|
||||||
|
|
||||||
@api.model
|
@api.model_create_multi
|
||||||
def create(self, vals):
|
def create(self, vals):
|
||||||
obj = super(FixtureModel, self).create(vals)
|
obj = super(FixtureModel, self).create(vals)
|
||||||
if obj.fixture_material_id:
|
if obj.fixture_material_id:
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class FunctionalFixture(models.Model):
|
|||||||
domain=[('fixture_material_type', '=', '磁吸托盘')])
|
domain=[('fixture_material_type', '=', '磁吸托盘')])
|
||||||
vice_tray_model_ids = fields.Many2many('sf.fixture.model', 'rel_fixture_model_vice_tray', string="虎钳托盘型号",
|
vice_tray_model_ids = fields.Many2many('sf.fixture.model', 'rel_fixture_model_vice_tray', string="虎钳托盘型号",
|
||||||
domain=[('fixture_material_type', '=', '虎钳托盘')])
|
domain=[('fixture_material_type', '=', '虎钳托盘')])
|
||||||
registration_status = fields.Selection([("已注册", "已注册"), ("未注册", "未注册")], string="注册状态", default='未注册', tracking=True)
|
registration_status = fields.Selection([("已注册", "已注册"), ("未注册", "未注册")], string="注册状态", default='未注册')
|
||||||
active = fields.Boolean('有效', default=True)
|
active = fields.Boolean('有效', default=True)
|
||||||
|
|
||||||
@api.onchange('type_id')
|
@api.onchange('type_id')
|
||||||
|
|||||||
@@ -102,11 +102,11 @@ class CuttingToolModel(models.Model):
|
|||||||
cutting_tool_type_id = fields.Many2one('sf.cutting.tool.type', string='刀具类型',
|
cutting_tool_type_id = fields.Many2one('sf.cutting.tool.type', string='刀具类型',
|
||||||
)
|
)
|
||||||
brand_id = fields.Many2one('sf.machine.brand', '品牌')
|
brand_id = fields.Many2one('sf.machine.brand', '品牌')
|
||||||
tool_length = fields.Integer('长度(mm)', size=6)
|
tool_length = fields.Integer('长度(mm)')
|
||||||
tool_width = fields.Integer('宽度(mm)', size=6)
|
tool_width = fields.Integer('宽度(mm)')
|
||||||
tool_height = fields.Integer('高度(mm)', size=6)
|
tool_height = fields.Integer('高度(mm)')
|
||||||
tool_thickness = fields.Integer('厚度(mm)', size=6)
|
tool_thickness = fields.Integer('厚度(mm)')
|
||||||
tool_weight = fields.Float('重量(kg)', size=4)
|
tool_weight = fields.Float('重量(kg)')
|
||||||
coating_material = fields.Char('涂层材质')
|
coating_material = fields.Char('涂层材质')
|
||||||
# 整体式刀具参数
|
# 整体式刀具参数
|
||||||
total_length = fields.Float('总长度(mm)')
|
total_length = fields.Float('总长度(mm)')
|
||||||
@@ -208,7 +208,7 @@ class CuttingToolModel(models.Model):
|
|||||||
code = self._get_code("JKM-T-DJWL-DBIN-")
|
code = self._get_code("JKM-T-DJWL-DBIN-")
|
||||||
return code
|
return code
|
||||||
|
|
||||||
@api.model
|
@api.model_create_multi
|
||||||
def create(self, vals):
|
def create(self, vals):
|
||||||
obj = super(CuttingToolModel, self).create(vals)
|
obj = super(CuttingToolModel, self).create(vals)
|
||||||
if obj.cutting_tool_material_id:
|
if obj.cutting_tool_material_id:
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ access_sf_multi_mounting_type,sf_multi_mounting_type,model_sf_multi_mounting_typ
|
|||||||
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
|
||||||
access_sf_functional_fixture,sf_functional_fixture,model_sf_functional_fixture,base.group_user,1,1,1,1
|
access_sf_functional_fixture,sf_functional_fixture,model_sf_functional_fixture,base.group_user,1,1,1,1
|
||||||
|
access_sf_sync_common,sf_sync_common,model_sf_sync_common,base.group_user,1,1,1,1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
|
@@ -120,3 +120,21 @@ td.o_required_modifier {
|
|||||||
font-family: '华文中宋';
|
font-family: '华文中宋';
|
||||||
//font-weight: bold;
|
//font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.o_list_table th > div > i {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
body .o_list_table th:nth-child(4) {
|
||||||
|
width: 100px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
//body .o_list_table th:nth-child(5) {
|
||||||
|
// width: 500px !important;
|
||||||
|
//}
|
||||||
|
|
||||||
|
.o_list_renderer .o_list_table tbody > tr > td:not(.o_list_record_selector):not(.o_handle_cell):not(.o_list_button):not(.o_list_record_remove).o_list_text {
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
<record model="ir.ui.view" id="sf_production_process_form">
|
<record model="ir.ui.view" id="sf_production_process_form">
|
||||||
<field name="model">sf.production.process</field>
|
<field name="model">sf.production.process</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="表面工艺" create="0" edit="0" delete="1">
|
<form string="表面工艺" create="0" edit="1" delete="1">
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<h1>
|
<h1>
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ class SfSaintenanceStandards(models.Model):
|
|||||||
|
|
||||||
class MaintenanceStandardImage(models.Model):
|
class MaintenanceStandardImage(models.Model):
|
||||||
_name = 'maintenance.standard.image'
|
_name = 'maintenance.standard.image'
|
||||||
|
_description = 'maintenance.standard.image'
|
||||||
|
|
||||||
image = fields.Binary(string='维保图片')
|
image = fields.Binary(string='维保图片')
|
||||||
standard_id = fields.Many2one('maintenance.standards', string='Standard')
|
standard_id = fields.Many2one('maintenance.standards', string='Standard')
|
||||||
|
|||||||
@@ -66,7 +66,14 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
|
|
||||||
MTcode = fields.Char("编码", default=get_no)
|
MTcode = fields.Char("编码", default=get_no)
|
||||||
created_user = fields.Many2one('res.users', string='创建人', default=lambda self: self.env.user)
|
created_user = fields.Many2one('res.users', string='创建人', default=lambda self: self.env.user)
|
||||||
equipment_type = fields.Selection([('机床', '机床')], related='category_id.equipment_type')
|
equipment_type = fields.Selection([('机床', '机床')], compute='_compute_category_id')
|
||||||
|
|
||||||
|
@api.depends('category_id')
|
||||||
|
def _compute_category_id(self):
|
||||||
|
for record in self:
|
||||||
|
if record:
|
||||||
|
record.equipment_type = record.category_id.equipment_type
|
||||||
|
|
||||||
code = fields.Char('机台号')
|
code = fields.Char('机台号')
|
||||||
name = fields.Char('名称')
|
name = fields.Char('名称')
|
||||||
knife_type = fields.Selection(
|
knife_type = fields.Selection(
|
||||||
@@ -114,7 +121,7 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
feed_speed = fields.Char('进给速度(mm/min)')
|
feed_speed = fields.Char('进给速度(mm/min)')
|
||||||
tool_speed = fields.Char('刀具速度(m/min)')
|
tool_speed = fields.Char('刀具速度(m/min)')
|
||||||
distance_min = fields.Char('主轴端面至工作台面距离MIN(mm)')
|
distance_min = fields.Char('主轴端面至工作台面距离MIN(mm)')
|
||||||
distance_max = fields.Char('主轴端面至工作台面距离MIN(mm)')
|
distance_max = fields.Char('主轴端面至工作台面距离MAX(mm)')
|
||||||
taper = fields.Char('主轴锥度(°)')
|
taper = fields.Char('主轴锥度(°)')
|
||||||
torque = fields.Char('主轴电机扭矩(n/m)')
|
torque = fields.Char('主轴电机扭矩(n/m)')
|
||||||
motor_power = fields.Char('主轴电机功率(kw)')
|
motor_power = fields.Char('主轴电机功率(kw)')
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class SfMaintenanceLogs(models.Model):
|
|||||||
code = fields.Char(string='编码')
|
code = fields.Char(string='编码')
|
||||||
name = fields.Char(string='名称')
|
name = fields.Char(string='名称')
|
||||||
type = fields.Selection([('type1', '类型1'), ('type2', '类型2')], string='类型')
|
type = fields.Selection([('type1', '类型1'), ('type2', '类型2')], string='类型')
|
||||||
brand = fields.Many2one('sf.machine.brand', relared='model.brand_id', string='品牌')
|
brand = fields.Many2one('sf.machine.brand', related='maintenance_equipment_id.brand_id', string='品牌')
|
||||||
maintenance_equipment_id = fields.Many2one('maintenance.equipment', string='设备')
|
maintenance_equipment_id = fields.Many2one('maintenance.equipment', string='设备')
|
||||||
code_location = fields.Char(string='编码位置')
|
code_location = fields.Char(string='编码位置')
|
||||||
fault_type = fields.Selection([('电气类', '电气类'), ('机械类', '机械类'), ('程序类', '程序类'), ('系统类', '系统类')], string='故障类型')
|
fault_type = fields.Selection([('电气类', '电气类'), ('机械类', '机械类'), ('程序类', '程序类'), ('系统类', '系统类')], string='故障类型')
|
||||||
|
|||||||
@@ -182,7 +182,7 @@
|
|||||||
|
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
<xpath expr="//div[@class='o_row'][field[@name='maintenance_duration']]" position="after">
|
<xpath expr="//div[hasclass('o_row')][field[@name='maintenance_duration']]" position="after">
|
||||||
|
|
||||||
|
|
||||||
<field name='overhaul_id'/>
|
<field name='overhaul_id'/>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from odoo import fields, models
|
from odoo import fields, models,api
|
||||||
|
|
||||||
|
|
||||||
class ResProductCategory(models.Model):
|
class ResProductCategory(models.Model):
|
||||||
@@ -32,14 +32,26 @@ class ProductModelTypeRoutingSort(models.Model):
|
|||||||
sequence = fields.Integer('Sequence')
|
sequence = fields.Integer('Sequence')
|
||||||
route_workcenter_id = fields.Many2one('mrp.routing.workcenter')
|
route_workcenter_id = fields.Many2one('mrp.routing.workcenter')
|
||||||
is_repeat = fields.Boolean('重复', related='route_workcenter_id.is_repeat')
|
is_repeat = fields.Boolean('重复', related='route_workcenter_id.is_repeat')
|
||||||
routing_type = fields.Selection([
|
|
||||||
('获取CNC加工程序', '获取CNC加工程序'),
|
# routing_type = fields.Selection([
|
||||||
('装夹', '装夹'),
|
# ('获取CNC加工程序', '获取CNC加工程序'),
|
||||||
('前置三元定位检测', '前置三元定位检测'),
|
# ('装夹', '装夹'),
|
||||||
('CNC加工', 'CNC加工'),
|
# ('前置三元定位检测', '前置三元定位检测'),
|
||||||
('后置三元质量检测', '后置三元质量检测'),
|
# ('CNC加工', 'CNC加工'),
|
||||||
('解除装夹', '解除装夹'), ('切割', '切割'), ('表面工艺', '表面工艺')
|
# ('后置三元质量检测', '后置三元质量检测'),
|
||||||
], string="工序类型", related='route_workcenter_id.routing_type')
|
# ('解除装夹', '解除装夹'), ('切割', '切割'), ('表面工艺', '表面工艺')
|
||||||
|
# ], string="工序类型", compute='_compute_route_workcenter_id')
|
||||||
|
#
|
||||||
|
# @api.depends('route_workcenter_id')
|
||||||
|
# def _compute_route_workcenter_id(self):
|
||||||
|
# for record in self:
|
||||||
|
# if record:
|
||||||
|
# record.routing_type = record.route_workcenter_id.routing_type
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
routing_type = fields.Selection(string="工序类型", related='route_workcenter_id.routing_type')
|
||||||
|
|
||||||
workcenter_ids = fields.Many2many('mrp.workcenter', required=False, related='route_workcenter_id.workcenter_ids')
|
workcenter_ids = fields.Many2many('mrp.workcenter', required=False, related='route_workcenter_id.workcenter_ids')
|
||||||
product_model_type_id = fields.Many2one('sf.model.type')
|
product_model_type_id = fields.Many2one('sf.model.type')
|
||||||
|
|
||||||
@@ -55,14 +67,25 @@ class EmbryoModelTypeRoutingSort(models.Model):
|
|||||||
sequence = fields.Integer('Sequence')
|
sequence = fields.Integer('Sequence')
|
||||||
route_workcenter_id = fields.Many2one('mrp.routing.workcenter')
|
route_workcenter_id = fields.Many2one('mrp.routing.workcenter')
|
||||||
is_repeat = fields.Boolean('重复', related='route_workcenter_id.is_repeat')
|
is_repeat = fields.Boolean('重复', related='route_workcenter_id.is_repeat')
|
||||||
routing_type = fields.Selection([
|
|
||||||
('获取CNC加工程序', '获取CNC加工程序'),
|
# routing_type = fields.Selection([
|
||||||
('装夹', '装夹'),
|
# ('获取CNC加工程序', '获取CNC加工程序'),
|
||||||
('前置三元定位检测', '前置三元定位检测'),
|
# ('装夹', '装夹'),
|
||||||
('CNC加工', 'CNC加工'),
|
# ('前置三元定位检测', '前置三元定位检测'),
|
||||||
('后置三元质量检测', '后置三元质量检测'),
|
# ('CNC加工', 'CNC加工'),
|
||||||
('解除装夹', '解除装夹'), ('切割', '切割'), ('表面工艺', '表面工艺')
|
# ('后置三元质量检测', '后置三元质量检测'),
|
||||||
], string="工序类型", related='route_workcenter_id.routing_type')
|
# ('解除装夹', '解除装夹'), ('切割', '切割'), ('表面工艺', '表面工艺')
|
||||||
|
# ], string="工序类型", compute='_compute_route_workcenter_id')
|
||||||
|
#
|
||||||
|
# @api.depends('route_workcenter_id')
|
||||||
|
# def _compute_route_workcenter_id(self):
|
||||||
|
# for record in self:
|
||||||
|
# if record:
|
||||||
|
# record.routing_type = record.route_workcenter_id.routing_type
|
||||||
|
|
||||||
|
|
||||||
|
routing_type = fields.Selection(string="工序类型", related='route_workcenter_id.routing_type')
|
||||||
|
|
||||||
workcenter_ids = fields.Many2many('mrp.workcenter', required=False, related='route_workcenter_id.workcenter_ids')
|
workcenter_ids = fields.Many2many('mrp.workcenter', required=False, related='route_workcenter_id.workcenter_ids')
|
||||||
embryo_model_type_id = fields.Many2one('sf.model.type')
|
embryo_model_type_id = fields.Many2one('sf.model.type')
|
||||||
|
|
||||||
@@ -78,14 +101,25 @@ class SurfaceTechnicsModelTypeRoutingSort(models.Model):
|
|||||||
sequence = fields.Integer('Sequence')
|
sequence = fields.Integer('Sequence')
|
||||||
route_workcenter_id = fields.Many2one('mrp.routing.workcenter')
|
route_workcenter_id = fields.Many2one('mrp.routing.workcenter')
|
||||||
is_repeat = fields.Boolean('重复', related='route_workcenter_id.is_repeat')
|
is_repeat = fields.Boolean('重复', related='route_workcenter_id.is_repeat')
|
||||||
routing_type = fields.Selection([
|
|
||||||
('获取CNC加工程序', '获取CNC加工程序'),
|
# routing_type = fields.Selection([
|
||||||
('装夹', '装夹'),
|
# ('获取CNC加工程序', '获取CNC加工程序'),
|
||||||
('前置三元定位检测', '前置三元定位检测'),
|
# ('装夹', '装夹'),
|
||||||
('CNC加工', 'CNC加工'),
|
# ('前置三元定位检测', '前置三元定位检测'),
|
||||||
('后置三元质量检测', '后置三元质量检测'),
|
# ('CNC加工', 'CNC加工'),
|
||||||
('解除装夹', '解除装夹'), ('切割', '切割'), ('表面工艺', '表面工艺')
|
# ('后置三元质量检测', '后置三元质量检测'),
|
||||||
], string="工序类型", related='route_workcenter_id.routing_type')
|
# ('解除装夹', '解除装夹'), ('切割', '切割'), ('表面工艺', '表面工艺')
|
||||||
|
# ], string="工序类型", compute='_compute_route_workcenter_id')
|
||||||
|
#
|
||||||
|
# @api.depends('route_workcenter_id')
|
||||||
|
# def _compute_route_workcenter_id(self):
|
||||||
|
# for record in self:
|
||||||
|
# if record:
|
||||||
|
# record.routing_type = record.route_workcenter_id.routing_type
|
||||||
|
|
||||||
|
|
||||||
|
routing_type = fields.Selection(string="工序类型", related='route_workcenter_id.routing_type')
|
||||||
|
|
||||||
workcenter_ids = fields.Many2many('mrp.workcenter', required=False, related='route_workcenter_id.workcenter_ids')
|
workcenter_ids = fields.Many2many('mrp.workcenter', required=False, related='route_workcenter_id.workcenter_ids')
|
||||||
surface_technics_model_type_id = fields.Many2one('sf.model.type')
|
surface_technics_model_type_id = fields.Many2one('sf.model.type')
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class ResWorkcenter(models.Model):
|
|||||||
_inherit = "mrp.workcenter"
|
_inherit = "mrp.workcenter"
|
||||||
|
|
||||||
# 生产线显示
|
# 生产线显示
|
||||||
production_line_show = fields.Char(string='生产线')
|
production_line_show = fields.Char(string='生产线名称')
|
||||||
machine_tool_id = fields.Many2one('sf.machine_tool', string='机床')
|
machine_tool_id = fields.Many2one('sf.machine_tool', string='机床')
|
||||||
production_line_id = fields.Many2one('sf.production.line', string='生产线')
|
production_line_id = fields.Many2one('sf.production.line', string='生产线')
|
||||||
is_process_outsourcing = fields.Boolean('工艺外协')
|
is_process_outsourcing = fields.Boolean('工艺外协')
|
||||||
@@ -20,7 +20,13 @@ class ResWorkcenter(models.Model):
|
|||||||
|
|
||||||
equipment_status = fields.Selection(
|
equipment_status = fields.Selection(
|
||||||
[("正常", "正常"), ("故障", "故障"), ("不可用", "不可用")],
|
[("正常", "正常"), ("故障", "故障"), ("不可用", "不可用")],
|
||||||
string="设备状态", related='equipment_id.state')
|
string="设备状态", compute='_compute_equipment_id')
|
||||||
|
|
||||||
|
@api.depends('equipment_id')
|
||||||
|
def _compute_equipment_id(self):
|
||||||
|
for record in self:
|
||||||
|
if record:
|
||||||
|
record.equipment_status = record.equipment_id.state
|
||||||
|
|
||||||
equipment_image = fields.Binary('设备图片', related='equipment_id.machine_tool_picture')
|
equipment_image = fields.Binary('设备图片', related='equipment_id.machine_tool_picture')
|
||||||
|
|
||||||
|
|||||||
@@ -19,11 +19,11 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
_order = 'sequence asc,create_date desc'
|
_order = 'sequence asc,create_date desc'
|
||||||
|
|
||||||
product_tmpl_id_length = fields.Float(related='production_id.product_tmpl_id.length', readonly=True, store=True,
|
product_tmpl_id_length = fields.Float(related='production_id.product_tmpl_id.length', readonly=True, store=True,
|
||||||
check_company=True, string="坯料长度(mm)")
|
string="坯料长度(mm)")
|
||||||
product_tmpl_id_width = fields.Float(related='production_id.product_tmpl_id.width', readonly=True, store=True,
|
product_tmpl_id_width = fields.Float(related='production_id.product_tmpl_id.width', readonly=True, store=True,
|
||||||
check_company=True, string="坯料宽度(mm)")
|
string="坯料宽度(mm)")
|
||||||
product_tmpl_id_height = fields.Float(related='production_id.product_tmpl_id.height', readonly=True, store=True,
|
product_tmpl_id_height = fields.Float(related='production_id.product_tmpl_id.height', readonly=True, store=True,
|
||||||
check_company=True, string="坯料高度(mm)")
|
string="坯料高度(mm)")
|
||||||
product_tmpl_id_materials_id = fields.Many2one(related='production_id.product_tmpl_id.materials_id', readonly=True,
|
product_tmpl_id_materials_id = fields.Many2one(related='production_id.product_tmpl_id.materials_id', readonly=True,
|
||||||
store=True, check_company=True, string="材料")
|
store=True, check_company=True, string="材料")
|
||||||
product_tmpl_id_materials_type_id = fields.Many2one(related='production_id.product_tmpl_id.materials_type_id',
|
product_tmpl_id_materials_type_id = fields.Many2one(related='production_id.product_tmpl_id.materials_type_id',
|
||||||
@@ -41,7 +41,7 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
('解除装夹', '解除装夹'),
|
('解除装夹', '解除装夹'),
|
||||||
('切割', '切割'), ('表面工艺', '表面工艺')
|
('切割', '切割'), ('表面工艺', '表面工艺')
|
||||||
], string="工序类型")
|
], string="工序类型")
|
||||||
results = fields.Char('检测结果')
|
results = fields.Char('结果')
|
||||||
|
|
||||||
@api.onchange('users_ids')
|
@api.onchange('users_ids')
|
||||||
def get_user_permissions(self):
|
def get_user_permissions(self):
|
||||||
@@ -118,7 +118,7 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
chuck_brand_id = fields.Many2one('sf.machine.brand', string="卡盘品牌")
|
chuck_brand_id = fields.Many2one('sf.machine.brand', string="卡盘品牌")
|
||||||
chuck_type_id = fields.Char(string="卡盘类型")
|
chuck_type_id = fields.Char(string="卡盘类型")
|
||||||
chuck_model_id = fields.Char(string="卡盘型号")
|
chuck_model_id = fields.Char(string="卡盘型号")
|
||||||
tray_serial_number = fields.Char(string="卡盘序列号")
|
tray_serial_number = fields.Char(string="托盘序列号")
|
||||||
tray_name = fields.Char(string="托盘名称")
|
tray_name = fields.Char(string="托盘名称")
|
||||||
tray_brand_id = fields.Many2one('sf.machine.brand', string="托盘品牌")
|
tray_brand_id = fields.Many2one('sf.machine.brand', string="托盘品牌")
|
||||||
tray_type_id = fields.Char(string="托盘类型")
|
tray_type_id = fields.Char(string="托盘类型")
|
||||||
|
|||||||
@@ -12,11 +12,22 @@ import os
|
|||||||
class ResProductMo(models.Model):
|
class ResProductMo(models.Model):
|
||||||
_inherit = 'product.template'
|
_inherit = 'product.template'
|
||||||
model_file = fields.Binary('模型文件')
|
model_file = fields.Binary('模型文件')
|
||||||
categ_type = fields.Selection(
|
|
||||||
[("成品", "成品"), ("坯料", "坯料"), ("原材料", "原材料"), ("表面工艺", "表面工艺"), ("刀具", "刀具"),
|
# categ_type = fields.Selection(
|
||||||
("夹具", "夹具")],
|
# [("成品", "成品"), ("坯料", "坯料"), ("原材料", "原材料"), ("表面工艺", "表面工艺"), ("刀具", "刀具"),
|
||||||
string='产品的类别', related='categ_id.type',
|
# ("夹具", "夹具")],
|
||||||
store=True)
|
# string='产品的类别', compute='_compute_categ_id',
|
||||||
|
# store=True)
|
||||||
|
#
|
||||||
|
# @api.depends('categ_id')
|
||||||
|
# def _compute_categ_id(self):
|
||||||
|
# for record in self:
|
||||||
|
# if record:
|
||||||
|
# record.categ_type = record.categ_id.type
|
||||||
|
|
||||||
|
|
||||||
|
categ_type = fields.Selection(string='产品的类别', related='categ_id.type', store=True)
|
||||||
|
|
||||||
model_name = fields.Char('模型名称')
|
model_name = fields.Char('模型名称')
|
||||||
model_long = fields.Float('模型长(mm)', digits=(16, 3))
|
model_long = fields.Float('模型长(mm)', digits=(16, 3))
|
||||||
model_width = fields.Float('模型宽(mm)', digits=(16, 3))
|
model_width = fields.Float('模型宽(mm)', digits=(16, 3))
|
||||||
@@ -56,11 +67,12 @@ class ResProductMo(models.Model):
|
|||||||
domain="[('cutting_tool_material_id.name', '=', cutting_tool_type)]")
|
domain="[('cutting_tool_material_id.name', '=', cutting_tool_type)]")
|
||||||
|
|
||||||
brand_id = fields.Many2one('sf.machine.brand', '品牌')
|
brand_id = fields.Many2one('sf.machine.brand', '品牌')
|
||||||
tool_length = fields.Integer('长度(mm)', size=6)
|
tool_length = fields.Integer('长度(mm)')
|
||||||
tool_width = fields.Integer('宽度(mm)', size=6)
|
tool_width = fields.Integer('宽度(mm)')
|
||||||
tool_height = fields.Integer('高度(mm)', size=6)
|
tool_height = fields.Integer('高度(mm)')
|
||||||
tool_thickness = fields.Integer('厚度(mm)', size=6)
|
tool_thickness = fields.Integer('厚度(mm)')
|
||||||
tool_weight = fields.Float('重量(kg)', size=4)
|
tool_weight = fields.Float('重量(kg)')
|
||||||
|
|
||||||
coating_material = fields.Char('涂层材质')
|
coating_material = fields.Char('涂层材质')
|
||||||
# 整体式刀具参数
|
# 整体式刀具参数
|
||||||
cutting_tool_total_length = fields.Float('总长度(mm)')
|
cutting_tool_total_length = fields.Float('总长度(mm)')
|
||||||
@@ -138,22 +150,75 @@ class ResProductMo(models.Model):
|
|||||||
fixture_clamping_way = fields.Char(string="装夹方式")
|
fixture_clamping_way = fields.Char(string="装夹方式")
|
||||||
fixture_port_type = fields.Char(string="接口类型")
|
fixture_port_type = fields.Char(string="接口类型")
|
||||||
fixture_model_file = fields.Binary(string="3D模型图")
|
fixture_model_file = fields.Binary(string="3D模型图")
|
||||||
fixture_clamp_workpiece_length_max = fields.Integer(string="夹持工件长度MAX(mm)", size=6)
|
|
||||||
fixture_clamp_workpiece_width_max = fields.Integer(string="夹持工件宽度MAX(mm)", size=6)
|
fixture_clamp_workpiece_length_max = fields.Integer(string="夹持工件长度max(mm)")
|
||||||
fixture_clamp_workpiece_height_max = fields.Integer(string="夹持工件高度MAX(mm)", size=6)
|
fixture_clamp_workpiece_width_max = fields.Integer(string="夹持工件宽度max(mm)")
|
||||||
fixture_clamp_workpiece_diameter_max = fields.Float(string="夹持工件直径MAX(mm)", digits=(16, 6))
|
fixture_clamp_workpiece_height_max = fields.Integer(string="夹持工件高度max(mm)")
|
||||||
|
fixture_clamp_workpiece_diameter_max = fields.Float(string="夹持工件直径max(mm)", digits=(16, 6))
|
||||||
|
|
||||||
fixture_maximum_carrying_weight = fields.Float(string="最大承载重量(kg)", digits=(16, 4))
|
fixture_maximum_carrying_weight = fields.Float(string="最大承载重量(kg)", digits=(16, 4))
|
||||||
fixture_maximum_clamping_force = fields.Integer(string="最大夹持力(n)", size=8)
|
fixture_maximum_clamping_force = fields.Integer(string="最大夹持力(n)")
|
||||||
fixture_driving_way = fields.Char(string="驱动方式")
|
fixture_driving_way = fields.Char(string="驱动方式")
|
||||||
fixture_apply_machine_tool_type_ids = fields.Many2many('sf.machine_tool.type', 'rel_product_machine_tool_type',
|
fixture_apply_machine_tool_type_ids = fields.Many2many('sf.machine_tool.type', 'rel_product_machine_tool_type',
|
||||||
string="适用机床型号")
|
string="适用机床型号")
|
||||||
fixture_through_hole_size = fields.Integer(string="过孔大小(mm)", size=6)
|
fixture_through_hole_size = fields.Integer(string="过孔大小(mm)")
|
||||||
fixture_screw_size = fields.Integer(string="螺牙大小(mm)", size=6)
|
fixture_screw_size = fields.Integer(string="螺牙大小(mm)")
|
||||||
|
|
||||||
# 注册状态
|
# 注册状态
|
||||||
register_state = fields.Selection([('未注册', '未注册'), ('已注册', '已注册'), ('注册失败', '注册失败')],
|
register_state = fields.Selection([('未注册', '未注册'), ('已注册', '已注册'), ('注册失败', '注册失败')],
|
||||||
string='注册状态', default='未注册')
|
string='注册状态', default='未注册')
|
||||||
industry_code = fields.Char('行业编码', readonly=True)
|
industry_code = fields.Char('行业编码', readonly=True)
|
||||||
|
|
||||||
|
@api.constrains('tool_length')
|
||||||
|
def _check_tool_length_size(self):
|
||||||
|
if self.tool_length > 1000000:
|
||||||
|
raise ValidationError("长度不能超过1000000")
|
||||||
|
|
||||||
|
@api.constrains('tool_width')
|
||||||
|
def _check_tool_width_size(self):
|
||||||
|
if self.tool_width > 1000000:
|
||||||
|
raise ValidationError("宽度不能超过1000000")
|
||||||
|
|
||||||
|
@api.constrains('tool_height')
|
||||||
|
def _check_tool_height_size(self):
|
||||||
|
if self.tool_height > 1000000:
|
||||||
|
raise ValidationError("高度不能超过1000000")
|
||||||
|
|
||||||
|
@api.constrains('tool_thickness')
|
||||||
|
def _check_tool_thickness_size(self):
|
||||||
|
if self.tool_thickness > 1000000:
|
||||||
|
raise ValidationError("厚度不能超过1000000")
|
||||||
|
|
||||||
|
@api.constrains('fixture_clamp_workpiece_length_max')
|
||||||
|
def _check_fixture_clamp_workpiece_length_max_size(self):
|
||||||
|
if self.fixture_clamp_workpiece_length_max > 1000000:
|
||||||
|
raise ValidationError("夹持工件长度MAX不能超过1000000")
|
||||||
|
|
||||||
|
@api.constrains('fixture_clamp_workpiece_width_max')
|
||||||
|
def _check_fixture_clamp_workpiece_width_max_size(self):
|
||||||
|
if self.fixture_clamp_workpiece_width_max > 1000000:
|
||||||
|
raise ValidationError("夹持工件宽度MAX不能超过1000000")
|
||||||
|
|
||||||
|
@api.constrains('fixture_clamp_workpiece_height_max')
|
||||||
|
def _check_fixture_clamp_workpiece_height_max_size(self):
|
||||||
|
if self.fixture_clamp_workpiece_height_max > 1000000:
|
||||||
|
raise ValidationError("夹持工件高度MAX不能超过1000000")
|
||||||
|
|
||||||
|
@api.constrains('fixture_maximum_clamping_force')
|
||||||
|
def _check_fixture_maximum_clamping_force_size(self):
|
||||||
|
if self.fixture_maximum_clamping_force > 100000000:
|
||||||
|
raise ValidationError("最大夹持力不能超过100000000")
|
||||||
|
|
||||||
|
@api.constrains('fixture_through_hole_size')
|
||||||
|
def _check_fixture_through_hole_size_size(self):
|
||||||
|
if self.fixture_through_hole_size > 1000000:
|
||||||
|
raise ValidationError("过孔大小不能超过1000000")
|
||||||
|
|
||||||
|
@api.constrains('fixture_screw_size')
|
||||||
|
def _check_fixture_through_hole_size_size(self):
|
||||||
|
if self.fixture_screw_size > 1000000:
|
||||||
|
raise ValidationError("螺牙大小不能超过1000000")
|
||||||
|
|
||||||
def _json_apply_machine_tool_type_item_code(self, item):
|
def _json_apply_machine_tool_type_item_code(self, item):
|
||||||
code_arr = []
|
code_arr = []
|
||||||
for i in item.product_id.fixture_apply_machine_tool_type_ids:
|
for i in item.product_id.fixture_apply_machine_tool_type_ids:
|
||||||
@@ -368,7 +433,8 @@ class ResProductMo(models.Model):
|
|||||||
'materials_type_id': self.env['sf.materials.model'].search(
|
'materials_type_id': self.env['sf.materials.model'].search(
|
||||||
[('materials_no', '=', item['texture_type_code'])]).id,
|
[('materials_no', '=', item['texture_type_code'])]).id,
|
||||||
# 'model_surface_process_ids': self.get_production_process_id(item['surface_process_code']),
|
# 'model_surface_process_ids': self.get_production_process_id(item['surface_process_code']),
|
||||||
'model_process_parameters_ids': [(6, 0, [])] if not item.get('process_parameters_code') else self.get_process_parameters_id(item['process_parameters_code']),
|
'model_process_parameters_ids': [(6, 0, [])] if not item.get(
|
||||||
|
'process_parameters_code') else self.get_process_parameters_id(item['process_parameters_code']),
|
||||||
'model_remark': item['remark'],
|
'model_remark': item['remark'],
|
||||||
'default_code': '%s-%s' % (order_number, i),
|
'default_code': '%s-%s' % (order_number, i),
|
||||||
# 'barcode': item['barcode'],
|
# 'barcode': item['barcode'],
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class WorkLogSetting(models.Model):
|
|||||||
return num
|
return num
|
||||||
|
|
||||||
code = fields.Char(string='序号', default=_get_code)
|
code = fields.Char(string='序号', default=_get_code)
|
||||||
name = fields.Char(string='工作日历名称', required=True, size=15, length=30)
|
name = fields.Char(string='工作日历名称', required=True, size=15)
|
||||||
|
|
||||||
working_shift_ids = fields.Many2many('sf.working.shift', string='班次', required=True)
|
working_shift_ids = fields.Many2many('sf.working.shift', string='班次', required=True)
|
||||||
start_time = fields.Datetime(string='日开始时间', readonly=True, compute='_compute_working_shift_ids')
|
start_time = fields.Datetime(string='日开始时间', readonly=True, compute='_compute_working_shift_ids')
|
||||||
@@ -106,12 +106,12 @@ class WorkLogSetting(models.Model):
|
|||||||
# 'calendar_code': self.code,
|
# 'calendar_code': self.code,
|
||||||
# 'date_time': target_date})
|
# 'date_time': target_date})
|
||||||
|
|
||||||
@api.model
|
@api.model_create_multi
|
||||||
def create(self, vals):
|
def create(self, vals_list):
|
||||||
"""
|
"""
|
||||||
创建记录时,生成工作日历
|
创建记录时,生成工作日历
|
||||||
"""
|
"""
|
||||||
record = super(WorkLogSetting, self).create(vals)
|
record = super(WorkLogSetting, self).create(vals_list)
|
||||||
record.generate_work_calendar()
|
record.generate_work_calendar()
|
||||||
return record
|
return record
|
||||||
|
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ class QuickEasyOrder(models.Model):
|
|||||||
('0.01', '±0.01mm')], string='加工精度', default='0.10')
|
('0.01', '±0.01mm')], string='加工精度', default='0.10')
|
||||||
material_id = fields.Many2one('sf.production.materials', '材料', compute='_compute_material_model', store=True)
|
material_id = fields.Many2one('sf.production.materials', '材料', compute='_compute_material_model', store=True)
|
||||||
material_model_id = fields.Many2one('sf.materials.model', '型号', compute='_compute_material_model', store=True)
|
material_model_id = fields.Many2one('sf.materials.model', '型号', compute='_compute_material_model', store=True)
|
||||||
process_id = fields.Many2one('sf.production.process', string='表面工艺')
|
# process_id = fields.Many2one('sf.production.process', string='表面工艺')
|
||||||
parameter_ids = fields.One2many('sf.production.process.parameter', 'process_id', string='可选参数')
|
parameter_ids = fields.Many2many('sf.production.process.parameter', 'process_item_order_rel', string='可选参数')
|
||||||
quantity = fields.Integer('数量', default=1)
|
quantity = fields.Integer('数量', default=1)
|
||||||
unit_price = fields.Float('单价')
|
unit_price = fields.Float('单价')
|
||||||
price = fields.Float('总价')
|
price = fields.Float('总价')
|
||||||
@@ -49,6 +49,11 @@ class QuickEasyOrder(models.Model):
|
|||||||
('success', '成功'),
|
('success', '成功'),
|
||||||
('fail', '失败')], string='模型上色状态')
|
('fail', '失败')], string='模型上色状态')
|
||||||
|
|
||||||
|
@api.depends('unit_price', 'quantity')
|
||||||
|
def _compute_total_amount(self):
|
||||||
|
for item in self:
|
||||||
|
item.price = item.unit_price * item.quantity
|
||||||
|
|
||||||
@api.depends('material_id', 'material_model_id')
|
@api.depends('material_id', 'material_model_id')
|
||||||
def _compute_material_model(self):
|
def _compute_material_model(self):
|
||||||
for item in self:
|
for item in self:
|
||||||
@@ -75,18 +80,18 @@ class QuickEasyOrder(models.Model):
|
|||||||
logging.info('create-model_file:%s' % len(vals['model_file']))
|
logging.info('create-model_file:%s' % len(vals['model_file']))
|
||||||
|
|
||||||
obj = super(QuickEasyOrder, self).create(vals)
|
obj = super(QuickEasyOrder, self).create(vals)
|
||||||
self.model_coloring()
|
self.model_coloring(obj)
|
||||||
self.distribute_to_factory(obj)
|
self.distribute_to_factory(obj)
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
# 将attach的datas内容转为glb文件
|
# 将attach的datas内容转为glb文件
|
||||||
def transition_glb_file(self, report_path, model_code):
|
def transition_glb_file(self, report_path, model_code):
|
||||||
shapes = read_step_file(report_path)
|
shapes = read_step_file(report_path)
|
||||||
#output_file = os.path.join('C:/Users/43484/Desktop/机企猫工作文档', str(model_code) + '.stl')
|
# output_file = os.path.join('C:/Users/43484/Desktop/机企猫工作文档', str(model_code) + '.stl')
|
||||||
output_file = os.path.join('/tmp', str(model_code) + '.stl')
|
output_file = os.path.join('/tmp', str(model_code) + '.stl')
|
||||||
write_stl_file(shapes, output_file, 'binary', 0.03, 0.5)
|
write_stl_file(shapes, output_file, 'binary', 0.03, 0.5)
|
||||||
# 转化为glb
|
# 转化为glb
|
||||||
#output_glb_file = os.path.join('C:/Users/43484/Desktop/机企猫工作文档', str(model_code) + '.glb')
|
# output_glb_file = os.path.join('C:/Users/43484/Desktop/机企猫工作文档', str(model_code) + '.glb')
|
||||||
output_glb_file = os.path.join('/tmp', str(model_code) + '.glb')
|
output_glb_file = os.path.join('/tmp', str(model_code) + '.glb')
|
||||||
util_path = get_resource_path('sf_dlm', 'static/util')
|
util_path = get_resource_path('sf_dlm', 'static/util')
|
||||||
cmd = 'python3 %s/stl2gltf.py %s %s -b' % (util_path, output_file, output_glb_file)
|
cmd = 'python3 %s/stl2gltf.py %s %s -b' % (util_path, output_file, output_glb_file)
|
||||||
@@ -96,6 +101,7 @@ class QuickEasyOrder(models.Model):
|
|||||||
image_data = fileObj.read()
|
image_data = fileObj.read()
|
||||||
base64_data = base64.b64encode(image_data)
|
base64_data = base64.b64encode(image_data)
|
||||||
return base64_data
|
return base64_data
|
||||||
|
|
||||||
# return False
|
# return False
|
||||||
|
|
||||||
@api.onchange('upload_model_file')
|
@api.onchange('upload_model_file')
|
||||||
@@ -137,22 +143,15 @@ class QuickEasyOrder(models.Model):
|
|||||||
派单到工厂
|
派单到工厂
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
web_base_url = self.env['ir.config_parameter'].sudo().get_param('web.base.url', default='')
|
try:
|
||||||
logging.info("web_base_url: %s" % web_base_url)
|
res = {'bfm_process_order_list': []}
|
||||||
url = '/api/bfm_process_order/list'
|
|
||||||
res = {'order_number': obj.name, 'delivery_end_date': str(datetime.now()),
|
|
||||||
'delivery_name': 'XXXXX', 'delivery_telephone': 'XXXXX',
|
|
||||||
'delivery_address': 'XXXXX',
|
|
||||||
'bfm_process_order_list': []}
|
|
||||||
factory = self.env['res.partner'].sudo().search([], limit=1, order='id desc')
|
|
||||||
config_header = Common.get_headers(self, factory.sf_token, factory.sf_secret_key)
|
|
||||||
for item in obj:
|
for item in obj:
|
||||||
attachment = item.upload_model_file[0]
|
attachment = item.upload_model_file[0]
|
||||||
base64_data = base64.b64encode(attachment.datas)
|
base64_data = base64.b64encode(attachment.datas)
|
||||||
base64_datas = base64_data.decode('utf-8')
|
base64_datas = base64_data.decode('utf-8')
|
||||||
barcode = hashlib.sha1(base64_datas.encode('utf-8')).hexdigest()
|
barcode = hashlib.sha1(base64_datas.encode('utf-8')).hexdigest()
|
||||||
logging.info('model_file-size: %s' % len(item.model_file))
|
logging.info('model_file-size: %s' % len(item.model_file))
|
||||||
val = {
|
res['bfm_process_order_list'].append({
|
||||||
'model_long': item.model_length,
|
'model_long': item.model_length,
|
||||||
'model_width': item.model_width,
|
'model_width': item.model_width,
|
||||||
'model_height': item.model_height,
|
'model_height': item.model_height,
|
||||||
@@ -164,35 +163,86 @@ class QuickEasyOrder(models.Model):
|
|||||||
'texture_code': item.material_id.materials_no,
|
'texture_code': item.material_id.materials_no,
|
||||||
'texture_type_code': item.material_model_id.materials_no,
|
'texture_type_code': item.material_model_id.materials_no,
|
||||||
# 'surface_process_code': self.env['jikimo.surface.process']._json_surface_process_code(item),
|
# 'surface_process_code': self.env['jikimo.surface.process']._json_surface_process_code(item),
|
||||||
# 'process_parameters_code': self.env['jikimo.surface.process.item']._json_surface_process_item_code(
|
'process_parameters_code': self.env[
|
||||||
# item),
|
'sf.production.process.parameter']._json_production_process_item_code(
|
||||||
|
item),
|
||||||
'price': item.price,
|
'price': item.price,
|
||||||
'number': item.quantity,
|
'number': item.quantity,
|
||||||
'total_amount': item.price,
|
'total_amount': item.price,
|
||||||
'remark': '',
|
'remark': '',
|
||||||
'barcode': barcode
|
'barcode': barcode
|
||||||
}
|
})
|
||||||
res['bfm_process_order_list'].append(val)
|
# res['bfm_process_order_list'] = json.dumps(res['bfm_process_order_list'])
|
||||||
res['bfm_process_order_list'] = json.dumps(res['bfm_process_order_list'])
|
product_id = self.env.ref('sf_dlm.product_template_sf').sudo()
|
||||||
try:
|
self_machining_id = self.env.ref('sf_dlm.product_embryo_sf_self_machining').sudo()
|
||||||
ret = requests.post((web_base_url[0] + url), json={}, data=res,
|
outsource_id = self.env.ref('sf_dlm.product_embryo_sf_outsource').sudo()
|
||||||
headers=config_header)
|
purchase_id = self.env.ref('sf_dlm.product_embryo_sf_purchase').sudo()
|
||||||
ret = ret.json()
|
company_id = self.env.ref('base.main_company').sudo()
|
||||||
if ret['status'] == 1:
|
# user_id = request.env.ref('base.user_admin').sudo()
|
||||||
self.write(
|
order_id = self.env['sale.order'].sale_order_create(company_id, 'XXXXX', 'XXXXX', 'XXXXX',
|
||||||
{'state': '待接单'})
|
str(datetime.now()))
|
||||||
|
i = 1
|
||||||
|
# 给sale_order的default_code字段赋值
|
||||||
|
aa = self.env['sale.order'].sudo().search([('name', '=', order_id.name)])
|
||||||
|
aa.default_code = obj.name
|
||||||
|
for item in res['bfm_process_order_list']:
|
||||||
|
product = self.env['product.template'].sudo().product_create(product_id, item, order_id,
|
||||||
|
obj.name, i)
|
||||||
|
bom_data = self.env['mrp.bom'].get_bom(product)
|
||||||
|
logging.info('bom_data:%s' % bom_data)
|
||||||
|
if bom_data:
|
||||||
|
bom = self.env['mrp.bom'].bom_create(product, 'normal', False)
|
||||||
|
bom.bom_create_line_has(bom_data)
|
||||||
else:
|
else:
|
||||||
raise UserError(ret['message'])
|
if product.materials_type_id.gain_way == '自加工':
|
||||||
|
# 创建坯料
|
||||||
|
self_machining_embryo = self.env['product.template'].sudo().no_bom_product_create(
|
||||||
|
self_machining_id,
|
||||||
|
item, order_id,
|
||||||
|
'self_machining',
|
||||||
|
i)
|
||||||
|
# 创建坯料的bom
|
||||||
|
self_machining_bom = self.env['mrp.bom'].bom_create(self_machining_embryo, 'normal', False)
|
||||||
|
# 创建坯料里bom的组件
|
||||||
|
self_machining_bom_line = self_machining_bom.bom_create_line(self_machining_embryo)
|
||||||
|
if self_machining_bom_line == False:
|
||||||
|
self.cr.rollback()
|
||||||
|
return UserError('该订单模型的材料型号在您分配的工厂里暂未有原材料,请先配置再进行分配')
|
||||||
|
# 产品配置bom
|
||||||
|
product_bom_self_machining = self.env['mrp.bom'].bom_create(product, 'normal', False)
|
||||||
|
product_bom_self_machining.bom_create_line_has(self_machining_embryo)
|
||||||
|
elif product.materials_type_id.gain_way == '外协':
|
||||||
|
# 创建坯料
|
||||||
|
outsource_embryo = self.env['product.template'].sudo().no_bom_product_create(outsource_id, item,
|
||||||
|
order_id,
|
||||||
|
'subcontract', i)
|
||||||
|
# 创建坯料的bom
|
||||||
|
outsource_bom = self.env['mrp.bom'].bom_create(outsource_embryo, 'subcontract', True)
|
||||||
|
# 创建坯料的bom的组件
|
||||||
|
outsource_bom_line = outsource_bom.with_user(
|
||||||
|
self.env.ref("base.user_admin")).bom_create_line(outsource_embryo)
|
||||||
|
if outsource_bom_line == False:
|
||||||
|
self.cr.rollback()
|
||||||
|
return UserError('该订单模型的材料型号在您分配的工厂里暂未有原材料,请先配置再进行分配')
|
||||||
|
# 产品配置bom
|
||||||
|
product_bom_outsource = self.env['mrp.bom'].bom_create(product, 'normal', False)
|
||||||
|
product_bom_outsource.bom_create_line_has(outsource_embryo)
|
||||||
|
elif product.materials_type_id.gain_way == '采购':
|
||||||
|
purchase_embryo = self.env['product.template'].sudo().no_bom_product_create(purchase_id, item,
|
||||||
|
order_id,
|
||||||
|
'purchase', i)
|
||||||
|
# 产品配置bom
|
||||||
|
product_bom_purchase = self.env['mrp.bom'].bom_create(product, 'normal', False)
|
||||||
|
product_bom_purchase.bom_create_line_has(purchase_embryo)
|
||||||
|
order_id.with_user(self.env.ref("base.user_admin")).sale_order_create_line(product, item)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if ret['status'] != 1:
|
self.cr.rollback()
|
||||||
raise UserError(e)
|
return UserError('工厂创建销售订单和产品失败,请联系管理员')
|
||||||
else:
|
|
||||||
raise UserError("分配工厂失败,请联系管理员")
|
|
||||||
|
|
||||||
# 特征识别
|
|
||||||
|
# 特征识别
|
||||||
def feature_recognition(self, report_path, model_code):
|
def feature_recognition(self, report_path, model_code):
|
||||||
feature_path = self.env['sf.auto_quatotion.common'].sudo().get_feature_full_path()
|
feature_path = self.env['sf.auto_quatotion.common'].sudo().get_feature_full_path()
|
||||||
# price_path = self.env['jikimo.auto_quatotion.common'].get_price_full_path()
|
|
||||||
process_time_db_path = self.env['sf.auto_quatotion.common'].sudo().get_process_time_db_path()
|
process_time_db_path = self.env['sf.auto_quatotion.common'].sudo().get_process_time_db_path()
|
||||||
ret = self.env['sf.auto_quatotion.common'].sudo().get_auto_quatotion(report_path, feature_path,
|
ret = self.env['sf.auto_quatotion.common'].sudo().get_auto_quatotion(report_path, feature_path,
|
||||||
process_time_db_path,
|
process_time_db_path,
|
||||||
@@ -200,11 +250,10 @@ class QuickEasyOrder(models.Model):
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
# 模型上色
|
# 模型上色
|
||||||
def model_coloring(self):
|
def model_coloring(self, order):
|
||||||
url = '/api/library_of_models/create'
|
url = '/api/library_of_models/create'
|
||||||
config = self.env['res.config.settings'].get_values()
|
config = self.env['res.config.settings'].get_values()
|
||||||
config_header = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
config_header = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
||||||
order = self.search([('id', '=', self.id)])
|
|
||||||
logging.info('order: %s' % order.name)
|
logging.info('order: %s' % order.name)
|
||||||
if order:
|
if order:
|
||||||
attachment = order.upload_model_file[0]
|
attachment = order.upload_model_file[0]
|
||||||
@@ -252,11 +301,13 @@ class QuickEasyOrder(models.Model):
|
|||||||
vals['accuracy'] = order.machining_precision
|
vals['accuracy'] = order.machining_precision
|
||||||
vals['number'] = order.quantity
|
vals['number'] = order.quantity
|
||||||
vals['process_code'] = 0
|
vals['process_code'] = 0
|
||||||
vals['texture_code'] = order.material_model_id.code
|
vals['texture_code'] = order.material_model_id.materials_no
|
||||||
vals['delivery_days'] = 15
|
vals['delivery_days'] = 15
|
||||||
if order.model_file:
|
if order.model_file:
|
||||||
attachment = self.env['ir.attachment'].sudo().search(
|
for item in order.upload_model_file:
|
||||||
[('id', '=', order.upload_model_file[0])])
|
if item.ids[0]:
|
||||||
|
logging.info('create-attachment:%s' % int(item.ids[0]))
|
||||||
|
attachment = self.env['ir.attachment'].sudo().search([('id', '=', int(item.ids[0]))])
|
||||||
vals['attachment_id'] = attachment.id
|
vals['attachment_id'] = attachment.id
|
||||||
else:
|
else:
|
||||||
vals['attachment_id'] = ''
|
vals['attachment_id'] = ''
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
access_quick_easy_order,quick_easy_order,model_quick_easy_order,base.group_user,1,1,1,1
|
access_quick_easy_order,quick_easy_order,model_quick_easy_order,base.group_user,1,1,1,1
|
||||||
|
access_sf_auto_quatotion_common,sf_auto_quatotion_common,model_sf_auto_quatotion_common,base.group_user,1,1,1,1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
|
@@ -19,7 +19,7 @@
|
|||||||
<field optional="show" name="customer_id" string="客户"/>
|
<field optional="show" name="customer_id" string="客户"/>
|
||||||
<field optional="show" name="material_id"/>
|
<field optional="show" name="material_id"/>
|
||||||
<field optional="show" name="material_model_id"/>
|
<field optional="show" name="material_model_id"/>
|
||||||
<field optional="show" name="process_id"/>
|
<field optional="show" name="parameter_ids"/>
|
||||||
<field optional="show" name="quantity"/>
|
<field optional="show" name="quantity"/>
|
||||||
<field optional="show" name="price"/>
|
<field optional="show" name="price"/>
|
||||||
<field optional="hide" name="delivery_time"/>
|
<field optional="hide" name="delivery_time"/>
|
||||||
@@ -41,8 +41,8 @@
|
|||||||
<field name="customer_id" readonly="1" force_save="1"/>
|
<field name="customer_id" readonly="1" force_save="1"/>
|
||||||
<field name="material_id"/>
|
<field name="material_id"/>
|
||||||
<field name="material_model_id"/>
|
<field name="material_model_id"/>
|
||||||
<field name="process_id"/>
|
<!-- <field name="process_id"/>-->
|
||||||
<field name="parameter_ids" widget="many2many_tags"/>
|
<field name="parameter_ids" widget="many2many_tags" string="表面工艺参数"/>
|
||||||
<field name="machining_precision"/>
|
<field name="machining_precision"/>
|
||||||
<field name="quantity"/>
|
<field name="quantity"/>
|
||||||
<field name="unit_price"/>
|
<field name="unit_price"/>
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ class FunctionalCuttingToolEntity(models.Model):
|
|||||||
code = fields.Char('编码')
|
code = fields.Char('编码')
|
||||||
name = fields.Char('名称', required=True, size=20)
|
name = fields.Char('名称', required=True, size=20)
|
||||||
mrs_cutting_tool_model_id = fields.Many2one('sf.cutting.tool.model', string='刀具型号')
|
mrs_cutting_tool_model_id = fields.Many2one('sf.cutting.tool.model', string='刀具型号')
|
||||||
mrs_cutting_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', tracking=True,
|
mrs_cutting_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型',
|
||||||
group_expand='_read_group_mrs_cutting_tool_type_ids')
|
group_expand='_read_group_mrs_cutting_tool_type_id', compute_sudo=True)
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _read_group_mrs_cutting_tool_type_ids(self, categories, domain, order):
|
def _read_group_mrs_cutting_tool_type_id(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)
|
||||||
return categories.browse(mrs_cutting_tool_type_ids)
|
return categories.browse(mrs_cutting_tool_type_ids)
|
||||||
|
|
||||||
@@ -65,7 +65,6 @@ class FunctionalCuttingToolEntity(models.Model):
|
|||||||
# record.mrs_cutting_tool_cutterbar_model_ids = None
|
# record.mrs_cutting_tool_cutterbar_model_ids = None
|
||||||
# record.mrs_cutting_tool_cutterpad_model_ids = None
|
# record.mrs_cutting_tool_cutterpad_model_ids = None
|
||||||
|
|
||||||
|
|
||||||
diameter = fields.Float('直径(mm)')
|
diameter = fields.Float('直径(mm)')
|
||||||
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
||||||
string='刀具等级')
|
string='刀具等级')
|
||||||
@@ -218,11 +217,11 @@ class FunctionalToolWarning(models.Model):
|
|||||||
|
|
||||||
diameter = fields.Float('直径(mm)', readonly=True, related='functional_cutting_tool_id.diameter')
|
diameter = fields.Float('直径(mm)', readonly=True, related='functional_cutting_tool_id.diameter')
|
||||||
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
||||||
string='刀具等级', readonly=True, related='functional_cutting_tool_id.tool_grade')
|
string='刀具等级', readonly=True, compute='_compute_functional_cutting_tool_id')
|
||||||
machining_accuracy = fields.Float('加工精度(mm)', readonly=True,
|
machining_accuracy = fields.Float('加工精度(mm)', readonly=True,
|
||||||
related='functional_cutting_tool_id.machining_accuracy')
|
related='functional_cutting_tool_id.machining_accuracy')
|
||||||
|
|
||||||
tool_length = fields.Float('装刀长', readonly=True, related='functional_cutting_tool_id.tool_length')
|
# tool_length = fields.Float('装刀长', readonly=True, related='functional_cutting_tool_id.tool_length')
|
||||||
|
|
||||||
tool_length = fields.Float('装刀长(mm)', readonly=True, related='functional_cutting_tool_id.tool_length')
|
tool_length = fields.Float('装刀长(mm)', readonly=True, related='functional_cutting_tool_id.tool_length')
|
||||||
blade_number = fields.Integer('刃数', readonly=True, related='functional_cutting_tool_id.blade_number')
|
blade_number = fields.Integer('刃数', readonly=True, related='functional_cutting_tool_id.blade_number')
|
||||||
@@ -231,16 +230,24 @@ class FunctionalToolWarning(models.Model):
|
|||||||
effective_blade_length = fields.Float('有效刃长(mm)', readonly=True,
|
effective_blade_length = fields.Float('有效刃长(mm)', readonly=True,
|
||||||
related='functional_cutting_tool_id.effective_blade_length')
|
related='functional_cutting_tool_id.effective_blade_length')
|
||||||
max_life = fields.Float('最大寿命值', readonly=True, related='functional_cutting_tool_id.max_life')
|
max_life = fields.Float('最大寿命值', readonly=True, related='functional_cutting_tool_id.max_life')
|
||||||
is_standard = fields.Selection([('1', '是'), ('0', '否')],'是否标准刀', readonly=True, related='functional_cutting_tool_id.is_standard')
|
is_standard = fields.Selection([('1', '是'), ('0', '否')],'是否标准刀', readonly=True,
|
||||||
|
compute='_compute_functional_cutting_tool_id')
|
||||||
applicable_range = fields.Char('适用范围', readonly=True, related='functional_cutting_tool_id.applicable_range')
|
applicable_range = fields.Char('适用范围', readonly=True, related='functional_cutting_tool_id.applicable_range')
|
||||||
image = fields.Binary('图片', readonly=True, related='functional_cutting_tool_id.image')
|
|
||||||
|
|
||||||
# 功能刀具预警 特有字段
|
image = fields.Binary('图片', readonly=True, related='functional_cutting_tool_id.image')
|
||||||
install_tool_time = fields.Datetime("装刀时间", readonly=True,
|
install_tool_time = fields.Datetime("装刀时间", readonly=True,
|
||||||
related='functional_tool_assembly_id.tool_loading_time')
|
related='functional_tool_assembly_id.tool_loading_time')
|
||||||
|
|
||||||
|
@api.depends('functional_cutting_tool_id')
|
||||||
|
def _compute_functional_cutting_tool_id(self):
|
||||||
|
if self.functional_cutting_tool_id:
|
||||||
|
self.tool_grade = self.functional_cutting_tool_id.tool_grade
|
||||||
|
self.is_standard = self.functional_cutting_tool_id.is_standard
|
||||||
|
|
||||||
|
# 功能刀具预警 特有字段
|
||||||
outbound_time = fields.Datetime('出库时间', readonly=True, related='functional_tool_assembly_id.receive_time')
|
outbound_time = fields.Datetime('出库时间', readonly=True, related='functional_tool_assembly_id.receive_time')
|
||||||
on_board_time = fields.Datetime('上机时间', readonly=False)
|
on_board_time = fields.Datetime('上机时间', readonly=False)
|
||||||
machine_table_name_id = fields.Many2one('maintenance.equipment', string='机床名称', readonly=True, tracking=True,
|
machine_table_name_id = fields.Many2one('maintenance.equipment', string='机床名称', readonly=True,
|
||||||
group_expand='_read_group_machine_table_name_ids')
|
group_expand='_read_group_machine_table_name_ids')
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
@@ -250,7 +257,7 @@ class FunctionalToolWarning(models.Model):
|
|||||||
|
|
||||||
machine_tool_code = fields.Char('机台号', readonly=True, related='functional_tool_assembly_id.machine_tool_code')
|
machine_tool_code = fields.Char('机台号', readonly=True, related='functional_tool_assembly_id.machine_tool_code')
|
||||||
cutting_tool_code = fields.Char('刀位号', readonly=True, related='functional_tool_assembly_id.cutter_spacing_code')
|
cutting_tool_code = fields.Char('刀位号', readonly=True, related='functional_tool_assembly_id.cutter_spacing_code')
|
||||||
idle_time = fields.Char('闲置时长', readonly=False)
|
# idle_time = fields.Char('闲置时长', readonly=False)
|
||||||
idle_time = fields.Char('闲置时长(h)', readonly=False)
|
idle_time = fields.Char('闲置时长(h)', readonly=False)
|
||||||
alarm_value = fields.Char('报警值', readonly=False)
|
alarm_value = fields.Char('报警值', readonly=False)
|
||||||
used_value = fields.Char('已使用值', readonly=False)
|
used_value = fields.Char('已使用值', readonly=False)
|
||||||
@@ -272,9 +279,9 @@ class RealTimeDistributionOfFunctionalTools(models.Model):
|
|||||||
|
|
||||||
functional_cutting_tool_id = fields.Many2one('sf.functional.cutting.tool.entity', '功能刀具', readonly=True)
|
functional_cutting_tool_id = fields.Many2one('sf.functional.cutting.tool.entity', '功能刀具', readonly=True)
|
||||||
mrs_cutting_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', readonly=True,
|
mrs_cutting_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', readonly=True,
|
||||||
tracking=True, group_expand='_read_mrs_cutting_tool_type_ids',
|
group_expand='_read_mrs_cutting_tool_type_ids',
|
||||||
store=True,
|
store=True,
|
||||||
compute='_compute_functional_cutting_tool_id')
|
compute='_compute_functional_cutting_tool_ids')
|
||||||
|
|
||||||
@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):
|
||||||
@@ -282,7 +289,7 @@ class RealTimeDistributionOfFunctionalTools(models.Model):
|
|||||||
return categories.browse(mrs_cutting_tool_type_ids)
|
return categories.browse(mrs_cutting_tool_type_ids)
|
||||||
|
|
||||||
@api.depends('functional_cutting_tool_id')
|
@api.depends('functional_cutting_tool_id')
|
||||||
def _compute_functional_cutting_tool_id(self):
|
def _compute_functional_cutting_tool_ids(self):
|
||||||
for record in self:
|
for record in self:
|
||||||
if record:
|
if record:
|
||||||
record.mrs_cutting_tool_type_id = record.functional_cutting_tool_id.mrs_cutting_tool_type_id.id
|
record.mrs_cutting_tool_type_id = record.functional_cutting_tool_id.mrs_cutting_tool_type_id.id
|
||||||
@@ -344,7 +351,7 @@ class RealTimeDistributionOfFunctionalTools(models.Model):
|
|||||||
|
|
||||||
diameter = fields.Float('直径(mm)', readonly=True, related='functional_cutting_tool_id.diameter')
|
diameter = fields.Float('直径(mm)', readonly=True, related='functional_cutting_tool_id.diameter')
|
||||||
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
||||||
string='刀具等级', readonly=True, related='functional_cutting_tool_id.tool_grade')
|
string='刀具等级', readonly=True, compute='_compute_functional_cutting_tool_id')
|
||||||
machining_accuracy = fields.Float('加工精度(mm)', readonly=True,
|
machining_accuracy = fields.Float('加工精度(mm)', readonly=True,
|
||||||
related='functional_cutting_tool_id.machining_accuracy')
|
related='functional_cutting_tool_id.machining_accuracy')
|
||||||
tool_length = fields.Float('装刀长(mm)', readonly=True, related='functional_cutting_tool_id.tool_length')
|
tool_length = fields.Float('装刀长(mm)', readonly=True, related='functional_cutting_tool_id.tool_length')
|
||||||
@@ -354,10 +361,17 @@ class RealTimeDistributionOfFunctionalTools(models.Model):
|
|||||||
effective_blade_length = fields.Float('有效刃长(mm)', readonly=True,
|
effective_blade_length = fields.Float('有效刃长(mm)', readonly=True,
|
||||||
related='functional_cutting_tool_id.effective_blade_length')
|
related='functional_cutting_tool_id.effective_blade_length')
|
||||||
max_life = fields.Float('最大寿命值', readonly=True, related='functional_cutting_tool_id.max_life')
|
max_life = fields.Float('最大寿命值', readonly=True, related='functional_cutting_tool_id.max_life')
|
||||||
is_standard = fields.Selection([('1', '是'), ('0', '否')],'是否标准刀', readonly=True, related='functional_cutting_tool_id.is_standard')
|
is_standard = fields.Selection([('1', '是'), ('0', '否')],'是否标准刀', readonly=True,
|
||||||
|
compute='_compute_functional_cutting_tool_id')
|
||||||
applicable_range = fields.Char('适用范围', readonly=True, related='functional_cutting_tool_id.applicable_range')
|
applicable_range = fields.Char('适用范围', readonly=True, related='functional_cutting_tool_id.applicable_range')
|
||||||
image = fields.Binary('图片', readonly=True, related='functional_cutting_tool_id.image')
|
image = fields.Binary('图片', readonly=True, related='functional_cutting_tool_id.image')
|
||||||
|
|
||||||
|
@api.depends('functional_cutting_tool_id')
|
||||||
|
def _compute_functional_cutting_tool_id(self):
|
||||||
|
if self.functional_cutting_tool_id:
|
||||||
|
self.tool_grade = self.functional_cutting_tool_id.tool_grade
|
||||||
|
self.is_standard = self.functional_cutting_tool_id.is_standard
|
||||||
|
|
||||||
# 功能刀具实时分布
|
# 功能刀具实时分布
|
||||||
tool_stock_num = fields.Integer(string='刀具房库存数量', readonly=False)
|
tool_stock_num = fields.Integer(string='刀具房库存数量', readonly=False)
|
||||||
side_shelf_num = fields.Integer(string='线边货架货架数量', readonly=False)
|
side_shelf_num = fields.Integer(string='线边货架货架数量', readonly=False)
|
||||||
@@ -395,9 +409,9 @@ class InboundAndOutboundRecordsOfFunctionalTools(models.Model):
|
|||||||
|
|
||||||
functional_cutting_tool_id = fields.Many2one('sf.functional.cutting.tool.entity', '功能刀具', readonly=True)
|
functional_cutting_tool_id = fields.Many2one('sf.functional.cutting.tool.entity', '功能刀具', readonly=True)
|
||||||
mrs_cutting_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', readonly=True,
|
mrs_cutting_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', readonly=True,
|
||||||
tracking=True, group_expand='_read_mrs_cutting_tool_type_ids',
|
group_expand='_read_mrs_cutting_tool_type_ids',
|
||||||
store=True,
|
store=True,
|
||||||
compute='_compute_functional_cutting_tool_id')
|
compute='_compute_functional_cutting_tool_ids')
|
||||||
|
|
||||||
@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):
|
||||||
@@ -405,7 +419,7 @@ class InboundAndOutboundRecordsOfFunctionalTools(models.Model):
|
|||||||
return categories.browse(mrs_cutting_tool_type_ids)
|
return categories.browse(mrs_cutting_tool_type_ids)
|
||||||
|
|
||||||
@api.depends('functional_cutting_tool_id')
|
@api.depends('functional_cutting_tool_id')
|
||||||
def _compute_functional_cutting_tool_id(self):
|
def _compute_functional_cutting_tool_ids(self):
|
||||||
for record in self:
|
for record in self:
|
||||||
if record:
|
if record:
|
||||||
record.mrs_cutting_tool_type_id = record.functional_cutting_tool_id.mrs_cutting_tool_type_id.id
|
record.mrs_cutting_tool_type_id = record.functional_cutting_tool_id.mrs_cutting_tool_type_id.id
|
||||||
@@ -465,7 +479,7 @@ class InboundAndOutboundRecordsOfFunctionalTools(models.Model):
|
|||||||
|
|
||||||
diameter = fields.Float('直径(mm)', readonly=True, related='functional_cutting_tool_id.diameter')
|
diameter = fields.Float('直径(mm)', readonly=True, related='functional_cutting_tool_id.diameter')
|
||||||
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
||||||
string='刀具等级', readonly=True, related='functional_cutting_tool_id.tool_grade')
|
string='刀具等级', readonly=True, compute='_compute_functional_cutting_tool_id')
|
||||||
machining_accuracy = fields.Float('加工精度(mm)', readonly=True,
|
machining_accuracy = fields.Float('加工精度(mm)', readonly=True,
|
||||||
related='functional_cutting_tool_id.machining_accuracy')
|
related='functional_cutting_tool_id.machining_accuracy')
|
||||||
tool_length = fields.Float('装刀长(mm)', readonly=True, related='functional_cutting_tool_id.tool_length')
|
tool_length = fields.Float('装刀长(mm)', readonly=True, related='functional_cutting_tool_id.tool_length')
|
||||||
@@ -475,10 +489,17 @@ class InboundAndOutboundRecordsOfFunctionalTools(models.Model):
|
|||||||
effective_blade_length = fields.Float('有效刃长(mm)', readonly=True,
|
effective_blade_length = fields.Float('有效刃长(mm)', readonly=True,
|
||||||
related='functional_cutting_tool_id.effective_blade_length')
|
related='functional_cutting_tool_id.effective_blade_length')
|
||||||
max_life = fields.Float('最大寿命值', readonly=True, related='functional_cutting_tool_id.max_life')
|
max_life = fields.Float('最大寿命值', readonly=True, related='functional_cutting_tool_id.max_life')
|
||||||
is_standard = fields.Selection([('1', '是'), ('0', '否')],'是否标准刀', readonly=True, related='functional_cutting_tool_id.is_standard')
|
is_standard = fields.Selection([('1', '是'), ('0', '否')],'是否标准刀', readonly=True,
|
||||||
|
compute='_compute_functional_cutting_tool_id')
|
||||||
applicable_range = fields.Char('适用范围', readonly=True, related='functional_cutting_tool_id.applicable_range')
|
applicable_range = fields.Char('适用范围', readonly=True, related='functional_cutting_tool_id.applicable_range')
|
||||||
image = fields.Binary('图片', readonly=True, related='functional_cutting_tool_id.image')
|
image = fields.Binary('图片', readonly=True, related='functional_cutting_tool_id.image')
|
||||||
|
|
||||||
|
@api.depends('functional_cutting_tool_id')
|
||||||
|
def _compute_functional_cutting_tool_id(self):
|
||||||
|
if self.functional_cutting_tool_id:
|
||||||
|
self.tool_grade = self.functional_cutting_tool_id.tool_grade
|
||||||
|
self.is_standard = self.functional_cutting_tool_id.is_standard
|
||||||
|
|
||||||
# 功能刀具出入库记录 特有字段
|
# 功能刀具出入库记录 特有字段
|
||||||
current_state = fields.Char(string='当前状态', readonly=False)
|
current_state = fields.Char(string='当前状态', readonly=False)
|
||||||
current_store_area = fields.Char(string='当前库区', readonly=False)
|
current_store_area = fields.Char(string='当前库区', readonly=False)
|
||||||
@@ -486,7 +507,7 @@ class InboundAndOutboundRecordsOfFunctionalTools(models.Model):
|
|||||||
tool_install_staff = fields.Char(string='装刀人', readonly=False)
|
tool_install_staff = fields.Char(string='装刀人', readonly=False)
|
||||||
tool_install_time = fields.Datetime(string='装刀时间', readonly=False)
|
tool_install_time = fields.Datetime(string='装刀时间', readonly=False)
|
||||||
thickness = fields.Selection([('1', '粗'), ('2', '中'), ('3', '精')], string='粗/中/精', readonly=False)
|
thickness = fields.Selection([('1', '粗'), ('2', '中'), ('3', '精')], string='粗/中/精', readonly=False)
|
||||||
max_life_span = fields.Char(string='最大寿命值', readonly=False)
|
# max_life_span = fields.Char(string='最大寿命值', readonly=False)
|
||||||
alarm_value = fields.Char(string='报警值', readonly=False)
|
alarm_value = fields.Char(string='报警值', readonly=False)
|
||||||
used_value = fields.Char(string='已使用值', readonly=False)
|
used_value = fields.Char(string='已使用值', readonly=False)
|
||||||
reason_application = fields.Char(string='申请原因', readonly=False)
|
reason_application = fields.Char(string='申请原因', readonly=False)
|
||||||
@@ -528,12 +549,11 @@ class MachineTableToolChangingApply(models.Model):
|
|||||||
# string='换刀需求信息',
|
# string='换刀需求信息',
|
||||||
# attrs="{'invisible': 1}")
|
# attrs="{'invisible': 1}")
|
||||||
|
|
||||||
|
name = fields.Many2one('maintenance.equipment', string='CNC机床',required=True, readonly=False,
|
||||||
name = fields.Many2one('maintenance.equipment', string='CNC机床',required=True, readonly=False, tracking=True,
|
|
||||||
group_expand='_read_group_names')
|
group_expand='_read_group_names')
|
||||||
machine_table_type_id = fields.Many2one('sf.machine_tool.category', string='机床类型', readonly=True,
|
machine_table_type_id = fields.Many2one('sf.machine_tool.category', string='机床类型', readonly=True,
|
||||||
compute='_compute_name')
|
compute='_compute_name')
|
||||||
machine_tool_code = fields.Char(string='机台号', attrs="{'invisible': 1}", readonly=True, compute='_compute_name')
|
machine_tool_code = fields.Char(string='机台号', invisible=True, readonly=True, compute='_compute_name')
|
||||||
cutter_spacing_code = fields.Char(string='刀位号', readonly=False)
|
cutter_spacing_code = fields.Char(string='刀位号', readonly=False)
|
||||||
functional_tool_code = fields.Char(string='功能刀具编码', readonly=True, compute='_compute_functional_tool_name_id')
|
functional_tool_code = fields.Char(string='功能刀具编码', readonly=True, compute='_compute_functional_tool_name_id')
|
||||||
functional_tool_name_id = fields.Many2one('sf.functional.cutting.tool', string='功能刀具名称', readonly=False)
|
functional_tool_name_id = fields.Many2one('sf.functional.cutting.tool', string='功能刀具名称', readonly=False)
|
||||||
@@ -555,7 +575,7 @@ class MachineTableToolChangingApply(models.Model):
|
|||||||
replacement_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='待换功能刀具类型',
|
replacement_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='待换功能刀具类型',
|
||||||
readonly=True)
|
readonly=True)
|
||||||
replacement_tool_coarse_middle_thin = fields.Selection([("1", "粗"), ('2', '中'), ('3', '精')],
|
replacement_tool_coarse_middle_thin = fields.Selection([("1", "粗"), ('2', '中'), ('3', '精')],
|
||||||
string='粗/中/精', readonly=True)
|
string='粗/中/精(待换)', readonly=True)
|
||||||
new_former = fields.Selection([('0', '新'), ('1', '旧')], string='新/旧', readonly=True)
|
new_former = fields.Selection([('0', '新'), ('1', '旧')], string='新/旧', readonly=True)
|
||||||
applicant = fields.Char(string='申请人', readonly=True)
|
applicant = fields.Char(string='申请人', readonly=True)
|
||||||
used_tool_time = fields.Datetime(string='用刀时间', readonly=True)
|
used_tool_time = fields.Datetime(string='用刀时间', readonly=True)
|
||||||
@@ -692,7 +712,7 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
|
|||||||
functional_tool_code = fields.Char(string='功能刀具编码', readonly=False)
|
functional_tool_code = fields.Char(string='功能刀具编码', readonly=False)
|
||||||
functional_tool_name_id = fields.Many2one('sf.functional.cutting.tool', string='功能刀具名称', readonly=False)
|
functional_tool_name_id = fields.Many2one('sf.functional.cutting.tool', string='功能刀具名称', readonly=False)
|
||||||
functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', readonly=False)
|
functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', readonly=False)
|
||||||
machine_table_name_id = fields.Many2one('maintenance.equipment', string='机床名称', readonly=False, tracking=True,
|
machine_table_name_id = fields.Many2one('maintenance.equipment', string='机床名称', readonly=False,
|
||||||
group_expand='_read_group_machine_table_name_ids')
|
group_expand='_read_group_machine_table_name_ids')
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
@@ -786,7 +806,7 @@ class FunctionalToolAssembly(models.Model):
|
|||||||
functional_tool_code = fields.Char(string='功能刀具编码', readonly=True)
|
functional_tool_code = fields.Char(string='功能刀具编码', readonly=True)
|
||||||
name = fields.Many2one('sf.functional.cutting.tool', string='功能刀具名称', readonly=True)
|
name = fields.Many2one('sf.functional.cutting.tool', string='功能刀具名称', readonly=True)
|
||||||
functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', readonly=True,
|
functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', readonly=True,
|
||||||
tracking=True, group_expand='_read_group_functional_tool_type_ids')
|
group_expand='_read_group_functional_tool_type_ids')
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _read_group_functional_tool_type_ids(self, categories, domain, order):
|
def _read_group_functional_tool_type_ids(self, categories, domain, order):
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ class SfToolMaterialSearch(models.Model):
|
|||||||
# mrs_cutting_tool_model_id = fields.Many2one('sf.cutting.tool.model', '刀具型号')
|
# mrs_cutting_tool_model_id = fields.Many2one('sf.cutting.tool.model', '刀具型号')
|
||||||
|
|
||||||
# 关联刀具物料模型
|
# 关联刀具物料模型
|
||||||
mrs_cutting_tool_material_id = fields.Many2one('sf.cutting.tool.material', '刀具物料',tracking=True,
|
mrs_cutting_tool_material_id = fields.Many2one('sf.cutting.tool.material', '刀具物料',
|
||||||
group_expand='_read_group_mrs_cutting_tool_material_ids')
|
group_expand='_read_group_mrs_cutting_tool_material_ids')
|
||||||
cutting_tool_material_name = fields.Char(string='物料名称',invisible=True)
|
cutting_tool_material_name = fields.Char(string='物料名称', invisible=True)
|
||||||
|
|
||||||
@api.onchange('mrs_cutting_tool_material_id')
|
@api.onchange('mrs_cutting_tool_material_id')
|
||||||
def _onchange_mrs_cutting_tool_material_id(self):
|
def _onchange_mrs_cutting_tool_material_id(self):
|
||||||
@@ -40,19 +40,19 @@ class SfToolMaterialSearch(models.Model):
|
|||||||
|
|
||||||
# 刀片特有字段
|
# 刀片特有字段
|
||||||
blade_code = fields.Char('刀片编码', readonly=True)
|
blade_code = fields.Char('刀片编码', readonly=True)
|
||||||
blade_length = fields.Float('长度L(mm)')
|
blade_length = fields.Float('刀片长度L(mm)')
|
||||||
blade_width = fields.Float('宽度D(mm)')
|
blade_width = fields.Float('刀片宽度D(mm)')
|
||||||
blade_height = fields.Float('高度T(mm)')
|
blade_height = fields.Float('刀片高度T(mm)')
|
||||||
blade_top_angle = fields.Float('顶角(°)')
|
blade_top_angle = fields.Float('刀片顶角(°)')
|
||||||
blade_front_angle = fields.Float('前角(°)')
|
blade_front_angle = fields.Float('刀片前角(°)')
|
||||||
blade_rear_angle = fields.Float('后角(°)')
|
blade_rear_angle = fields.Float('刀片后角(°)')
|
||||||
blade_main_included_angle = fields.Float('主偏角(°)')
|
blade_main_included_angle = fields.Float('刀片主偏角(°)')
|
||||||
blade_r_angle = fields.Float('R角(°)')
|
blade_r_angle = fields.Float('刀片R角(°)')
|
||||||
blade_hardness = fields.Char('加工硬度')
|
blade_hardness = fields.Char('刀片加工硬度')
|
||||||
blade_accuracy = fields.Char('精度等级')
|
blade_accuracy = fields.Char('刀片精度等级')
|
||||||
blade_coating_material_id = fields.Char('涂层材质')
|
blade_coating_material_id = fields.Char('刀片涂层材质')
|
||||||
blade_radius = fields.Float('刀尖半径(mm)')
|
blade_radius = fields.Float('刀片刀尖半径(mm)')
|
||||||
blade_nut = fields.Float('配对螺母(mm)')
|
blade_nut = fields.Float('刀片配对螺母(mm)')
|
||||||
mrs_cutting_tool_model_blade_cutter_bar_ids = fields.Many2many(
|
mrs_cutting_tool_model_blade_cutter_bar_ids = fields.Many2many(
|
||||||
'sf.cutting.tool.model',
|
'sf.cutting.tool.model',
|
||||||
relation='sf_tool_material_search_blade_cutter_bar_rel',
|
relation='sf_tool_material_search_blade_cutter_bar_rel',
|
||||||
@@ -74,79 +74,79 @@ class SfToolMaterialSearch(models.Model):
|
|||||||
|
|
||||||
# 整体式刀具特有字段
|
# 整体式刀具特有字段
|
||||||
integral_code = fields.Char('整体式刀具编码', readonly=True)
|
integral_code = fields.Char('整体式刀具编码', readonly=True)
|
||||||
integral_total_length = fields.Float('总长度(mm)')
|
integral_total_length = fields.Float('整体式刀具总长度(mm)')
|
||||||
integral_shank_length = fields.Float('柄部长度(mm)')
|
integral_shank_length = fields.Float('整体式刀具柄部长度(mm)')
|
||||||
integral_blade_length = fields.Float('刃部长度(mm)')
|
integral_blade_length = fields.Float('整体式刀具刃部长度(mm)')
|
||||||
integral_diameter = fields.Float('直径(mm)')
|
integral_diameter = fields.Float('整体式刀具直径(mm)')
|
||||||
integral_blade_number = fields.Integer('刃数')
|
integral_blade_number = fields.Integer('整体式刀具刃数')
|
||||||
integral_front_angle = fields.Float('前角(°)')
|
integral_front_angle = fields.Float('整体式刀具前角(°)')
|
||||||
integral_rear_angle = fields.Float('后角(°)')
|
integral_rear_angle = fields.Float('整体式刀具后角(°)')
|
||||||
integral_main_included_angle = fields.Float('主偏角(°)')
|
integral_main_included_angle = fields.Float('整体式刀具主偏角(°)')
|
||||||
integral_accuracy = fields.Float('精度等级')
|
integral_accuracy = fields.Float('整体式刀具精度等级')
|
||||||
integral_hardness = fields.Float('加工硬度(HRC)')
|
integral_hardness = fields.Float('整体式刀具加工硬度(HRC)')
|
||||||
integral_coating_material = fields.Char('涂层材质')
|
integral_coating_material = fields.Char('整体式刀具涂层材质')
|
||||||
integral_nut = fields.Float('配对螺母(mm)')
|
integral_nut = fields.Float('整体式刀具配对螺母(mm)')
|
||||||
integral_scope = fields.Char('适用范围')
|
integral_scope = fields.Char('整体式刀具适用范围')
|
||||||
|
|
||||||
# 刀杆特有字段
|
# 刀杆特有字段
|
||||||
bar_code = fields.Char('刀杆编码', readonly=True)
|
bar_code = fields.Char('刀杆编码', readonly=True)
|
||||||
# bar_name = fields.Char('刀杆名称', required=True)
|
# bar_name = fields.Char('刀杆名称', required=True)
|
||||||
bar_c_diameter = fields.Float('C柄径(mm)')
|
bar_c_diameter = fields.Float('刀杆C柄径(mm)')
|
||||||
bar_total_length = fields.Float('L总长(mm)')
|
bar_total_length = fields.Float('刀杆L总长(mm)')
|
||||||
bar_blade_number = fields.Integer('刃数')
|
bar_blade_number = fields.Integer('刀杆刃数')
|
||||||
bar_d_diameter = fields.Float('D刃径(mm)')
|
bar_d_diameter = fields.Float('刀杆D刃径(mm)')
|
||||||
mrs_cutting_tool_model_bar_blade_ids = fields.Many2many(
|
mrs_cutting_tool_model_bar_blade_ids = fields.Many2many(
|
||||||
'sf.cutting.tool.model',
|
'sf.cutting.tool.model',
|
||||||
relation='sf_tool_material_search_bar_blade_rel',
|
relation='sf_tool_material_search_bar_blade_rel',
|
||||||
column1='model_id_1',
|
column1='model_id_1',
|
||||||
column2='model_id_2',
|
column2='model_id_2',
|
||||||
domain="[('cutting_tool_type', '=', '刀片')]",
|
domain="[('cutting_tool_type', '=', '刀片')]",
|
||||||
string='适用刀片型号'
|
string='刀杆适用刀片型号'
|
||||||
)
|
)
|
||||||
bar_wrench = fields.Float('配对扳手(mm)')
|
bar_wrench = fields.Float('刀杆配对扳手(mm)')
|
||||||
bar_screw = fields.Float('配备螺丝(mm)')
|
bar_screw = fields.Float('刀杆配备螺丝(mm)')
|
||||||
bar_radius = fields.Float('刀尖圆角半径')
|
bar_radius = fields.Float('刀杆刀尖圆角半径')
|
||||||
bar_accuracy = fields.Char('精度等级')
|
bar_accuracy = fields.Char('刀杆精度等级')
|
||||||
bar_hardness = fields.Char('硬度(°)')
|
bar_hardness = fields.Char('刀杆硬度(°)')
|
||||||
bar_scope = fields.Char('适用范围')
|
bar_scope = fields.Char('刀杆适用范围')
|
||||||
|
|
||||||
# 刀盘特有字段
|
# 刀盘特有字段
|
||||||
pad_code = fields.Char('刀盘编码', readonly=True)
|
pad_code = fields.Char('刀盘编码', readonly=True)
|
||||||
# pad_name = fields.Char('刀盘名称', required=True)
|
# pad_name = fields.Char('刀盘名称', required=True)
|
||||||
pad_c_diameter = fields.Float('C柄径(mm)')
|
pad_c_diameter = fields.Float('刀盘C柄径(mm)')
|
||||||
pad_total_length = fields.Float('L总长(mm)')
|
pad_total_length = fields.Float('刀盘L总长(mm)')
|
||||||
pad_blade_number = fields.Integer('刃数')
|
pad_blade_number = fields.Integer('刀盘刃数')
|
||||||
pad_d_diameter = fields.Float('D刃径(mm)')
|
pad_d_diameter = fields.Float('刀盘D刃径(mm)')
|
||||||
mrs_cutting_tool_model_pad_blade_ids = fields.Many2many(
|
mrs_cutting_tool_model_pad_blade_ids = fields.Many2many(
|
||||||
'sf.cutting.tool.model',
|
'sf.cutting.tool.model',
|
||||||
relation='sf_tool_material_search_pad_blade_rel',
|
relation='sf_tool_material_search_pad_blade_rel',
|
||||||
column1='model_id_1',
|
column1='model_id_1',
|
||||||
column2='model_id_2',
|
column2='model_id_2',
|
||||||
domain="[('cutting_tool_type', '=', '刀片')]",
|
domain="[('cutting_tool_type', '=', '刀片')]",
|
||||||
string='适用刀片型号'
|
string='刀盘适用刀片型号'
|
||||||
)
|
)
|
||||||
pad_wrench = fields.Float('配对扳手(mm)')
|
pad_wrench = fields.Float('刀盘配对扳手(mm)')
|
||||||
pad_screw = fields.Float('配备螺丝(mm)')
|
pad_screw = fields.Float('刀盘配备螺丝(mm)')
|
||||||
pad_radius = fields.Float('刀尖圆角半径')
|
pad_radius = fields.Float('刀盘刀尖圆角半径')
|
||||||
pad_accuracy = fields.Char('精度等级')
|
pad_accuracy = fields.Char('刀盘精度等级')
|
||||||
pad_hardness = fields.Char('硬度(°)')
|
pad_hardness = fields.Char('刀盘硬度(°)')
|
||||||
pad_scope = fields.Char('适用范围')
|
pad_scope = fields.Char('刀盘适用范围')
|
||||||
|
|
||||||
# 刀柄特有字段
|
# 刀柄特有字段
|
||||||
handle_code = fields.Char('刀柄编码', readonly=True)
|
handle_code = fields.Char('刀柄编码', readonly=True)
|
||||||
# 柄长L(mm)、法兰柄长L1(mm)、法兰直径D1(mm)
|
# 柄长L(mm)、法兰柄长L1(mm)、法兰直径D1(mm)
|
||||||
handle_length = fields.Float('柄长L(mm)')
|
handle_length = fields.Float('刀柄柄长L(mm)')
|
||||||
handle_diameter = fields.Float('直径D(mm)')
|
handle_diameter = fields.Float('刀柄直径D(mm)')
|
||||||
handle_flange_length = fields.Float('法兰柄长L1(mm)')
|
handle_flange_length = fields.Float('刀柄法兰柄长L1(mm)')
|
||||||
handle_flange_diameter = fields.Float('法兰直径D1(mm)')
|
handle_flange_diameter = fields.Float('刀柄法兰直径D1(mm)')
|
||||||
# 夹持直径min、夹持直径max、径跳精度、最大转速n/min、3D模型图
|
# 夹持直径min、夹持直径max、径跳精度、最大转速n/min、3D模型图
|
||||||
handle_clamping_diameter_min = fields.Float('夹持直径min')
|
handle_clamping_diameter_min = fields.Float('刀柄夹持直径min')
|
||||||
handle_clamping_diameter_max = fields.Float('夹持直径max')
|
handle_clamping_diameter_max = fields.Float('刀柄夹持直径max')
|
||||||
handle_jump_accuracy = fields.Float('径跳精度')
|
handle_jump_accuracy = fields.Float('刀柄径跳精度')
|
||||||
handle_max_speed = fields.Float('最大转速n/min')
|
handle_max_speed = fields.Float('刀柄最大转速n/min')
|
||||||
handle_weight = fields.Float('重量(kg)')
|
handle_weight = fields.Float('刀柄重量(kg)')
|
||||||
handle_body_accuracy = fields.Float('本体精度(mm)')
|
handle_body_accuracy = fields.Float('刀柄本体精度(mm)')
|
||||||
handle_nut = fields.Float('配对螺母(mm)')
|
handle_nut = fields.Float('刀柄配对螺母(mm)')
|
||||||
mrs_cutting_tool_model_handle_chuck_model_ids = fields.Many2many(
|
mrs_cutting_tool_model_handle_chuck_model_ids = fields.Many2many(
|
||||||
'sf.cutting.tool.model',
|
'sf.cutting.tool.model',
|
||||||
relation='sf_tool_material_search_handle_chuck_rel',
|
relation='sf_tool_material_search_handle_chuck_rel',
|
||||||
@@ -155,22 +155,22 @@ class SfToolMaterialSearch(models.Model):
|
|||||||
domain="[('cutting_tool_type', '=', '夹头')]",
|
domain="[('cutting_tool_type', '=', '夹头')]",
|
||||||
string='适用夹头型号'
|
string='适用夹头型号'
|
||||||
)
|
)
|
||||||
handle_clamping_range = fields.Float('夹持范围(mm)')
|
handle_clamping_range = fields.Float('刀柄夹持范围(mm)')
|
||||||
handle_detection_accuracy = fields.Float('检测精度')
|
handle_detection_accuracy = fields.Float('刀柄检测精度')
|
||||||
handle_detection_hardness = fields.Char('检测硬度')
|
handle_detection_hardness = fields.Char('刀柄检测硬度')
|
||||||
handle_standard_speed = fields.Float('标准转速')
|
handle_standard_speed = fields.Float('刀柄标准转速')
|
||||||
|
|
||||||
# 夹头特有字段
|
# 夹头特有字段
|
||||||
chuck_code = fields.Char('夹头编码', readonly=True)
|
chuck_code = fields.Char('夹头编码', readonly=True)
|
||||||
# chuck_name = fields.Char('夹头名称', required=True)
|
# chuck_name = fields.Char('夹头名称', required=True)
|
||||||
chuck_accuracy = fields.Float('精度(mm)')
|
chuck_accuracy = fields.Float('夹头精度(mm)')
|
||||||
# 夹持直径min、夹持直径max、3D模型图
|
# 夹持直径min、夹持直径max、3D模型图
|
||||||
chuck_clamping_diameter_min = fields.Float('夹持直径min')
|
chuck_clamping_diameter_min = fields.Float('夹头夹持直径min(mm)')
|
||||||
chuck_clamping_diameter_max = fields.Float('夹持直径max')
|
chuck_clamping_diameter_max = fields.Float('夹头夹持直径max(mm)')
|
||||||
chuck_diameter = fields.Float('外径(mm)')
|
chuck_diameter = fields.Float('夹头外径(mm)')
|
||||||
chuck_inner_diameter = fields.Float('内径(mm)')
|
chuck_inner_diameter = fields.Float('夹头内径(mm)')
|
||||||
chuck_height = fields.Float('高度(mm)')
|
chuck_height = fields.Float('夹头高度(mm)')
|
||||||
chuck_nut = fields.Float('配对螺母(mm)')
|
chuck_nut = fields.Float('夹头配对螺母(mm)')
|
||||||
mrs_cutting_tool_model_chuck_handle_model_ids = fields.Many2many(
|
mrs_cutting_tool_model_chuck_handle_model_ids = fields.Many2many(
|
||||||
'sf.cutting.tool.model',
|
'sf.cutting.tool.model',
|
||||||
relation='sf_tool_material_search_chuck_handle_rel',
|
relation='sf_tool_material_search_chuck_handle_rel',
|
||||||
@@ -179,9 +179,9 @@ class SfToolMaterialSearch(models.Model):
|
|||||||
domain="[('cutting_tool_type', '=', '刀柄')]",
|
domain="[('cutting_tool_type', '=', '刀柄')]",
|
||||||
string='适用刀柄型号'
|
string='适用刀柄型号'
|
||||||
)
|
)
|
||||||
chuck_clamping_range = fields.Float('夹持范围(mm)')
|
chuck_clamping_range = fields.Float('夹头夹持范围(mm)')
|
||||||
chuck_feature = fields.Char('特性')
|
chuck_feature = fields.Char('夹头特性')
|
||||||
image = fields.Binary('图片')
|
image = fields.Binary('夹头图片')
|
||||||
|
|
||||||
# 数量、采购入库日期、采购批次、供应商、仓库名称、库区、库位、3D模型
|
# 数量、采购入库日期、采购批次、供应商、仓库名称、库区、库位、3D模型
|
||||||
number = fields.Integer('数量')
|
number = fields.Integer('数量')
|
||||||
|
|||||||
@@ -674,7 +674,7 @@
|
|||||||
<group>
|
<group>
|
||||||
<field name="current_state"/>
|
<field name="current_state"/>
|
||||||
<field name="thickness"/>
|
<field name="thickness"/>
|
||||||
<field name="max_life_span"/>
|
<!-- <field name="max_life_span"/>-->
|
||||||
<field name="used_value"/>
|
<field name="used_value"/>
|
||||||
<field name="tool_install_time"/>
|
<field name="tool_install_time"/>
|
||||||
<field name="reason_application"/>
|
<field name="reason_application"/>
|
||||||
|
|||||||
@@ -168,22 +168,22 @@
|
|||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="blade_code" invisible="True"/>
|
<field name="blade_code" invisible="True"/>
|
||||||
<field name="blade_length"/>
|
<field name="blade_length" string="长度L(mm)"/>
|
||||||
<field name="blade_width"/>
|
<field name="blade_width" string="宽度D(mm)"/>
|
||||||
<field name="blade_height"/>
|
<field name="blade_height" string="高度T(mm)"/>
|
||||||
<field name="blade_radius"/>
|
<field name="blade_radius" string="刀尖半径(mm)"/>
|
||||||
<field name="blade_hardness"/>
|
<field name="blade_hardness" string="加工硬度"/>
|
||||||
<field name="blade_accuracy"/>
|
<field name="blade_accuracy" string="精度等级"/>
|
||||||
<field name="blade_coating_material_id"/>
|
<field name="blade_coating_material_id" string="涂层材质"/>
|
||||||
<field name="mrs_cutting_tool_model_blade_cutter_bar_ids" widget="many2many_tags"/>
|
<field name="mrs_cutting_tool_model_blade_cutter_bar_ids" widget="many2many_tags"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="blade_top_angle"/>
|
<field name="blade_top_angle" string="顶角(°)"/>
|
||||||
<field name="blade_front_angle"/>
|
<field name="blade_front_angle" string="前角(°)"/>
|
||||||
<field name="blade_rear_angle"/>
|
<field name="blade_rear_angle" string="后角(°)"/>
|
||||||
<field name="blade_main_included_angle"/>
|
<field name="blade_main_included_angle" string="主偏角(°)"/>
|
||||||
<field name="blade_r_angle"/>
|
<field name="blade_r_angle" string="R角(°)"/>
|
||||||
<field name="blade_nut"/>
|
<field name="blade_nut" string="配对螺母(mm)"/>
|
||||||
<field name="mrs_cutting_tool_model_blade_cutter_pad_ids" widget="many2many_tags"/>
|
<field name="mrs_cutting_tool_model_blade_cutter_pad_ids" widget="many2many_tags"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
@@ -192,21 +192,21 @@
|
|||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="integral_code" invisible="True"/>
|
<field name="integral_code" invisible="True"/>
|
||||||
<field name="integral_total_length"/>
|
<field name="integral_total_length" string="总长度(mm)"/>
|
||||||
<field name="integral_shank_length"/>
|
<field name="integral_shank_length" string="柄部长度(mm)"/>
|
||||||
<field name="integral_blade_length"/>
|
<field name="integral_blade_length" string="刃部长度(mm)"/>
|
||||||
<field name="integral_diameter"/>
|
<field name="integral_diameter" string="直径(mm)"/>
|
||||||
<field name="integral_blade_number"/>
|
<field name="integral_blade_number" string="刃数"/>
|
||||||
<field name="integral_accuracy"/>
|
<field name="integral_accuracy" string="精度等级"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="integral_front_angle"/>
|
<field name="integral_front_angle" string="前角(°)"/>
|
||||||
<field name="integral_rear_angle"/>
|
<field name="integral_rear_angle" string="后角(°)"/>
|
||||||
<field name="integral_main_included_angle"/>
|
<field name="integral_main_included_angle" string="主偏角(°)"/>
|
||||||
<field name="integral_nut"/>
|
<field name="integral_nut" string="配对螺母(mm)"/>
|
||||||
<field name="integral_hardness"/>
|
<field name="integral_hardness" string="加工硬度(HRC)"/>
|
||||||
<field name="integral_coating_material"/>
|
<field name="integral_coating_material" string="涂层材质"/>
|
||||||
<field name="integral_scope"/>
|
<field name="integral_scope" string="适用范围"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
@@ -214,19 +214,19 @@
|
|||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="bar_code" invisible="True"/>
|
<field name="bar_code" invisible="True"/>
|
||||||
<field name="bar_c_diameter"/>
|
<field name="bar_c_diameter" string="C柄径(mm)"/>
|
||||||
<field name="bar_total_length"/>
|
<field name="bar_total_length" string="L总长(mm)"/>
|
||||||
<field name="bar_blade_number"/>
|
<field name="bar_blade_number" string="刃数"/>
|
||||||
<field name="bar_d_diameter"/>
|
<field name="bar_d_diameter" string="D刃径(mm)"/>
|
||||||
<field name="bar_scope"/>
|
<field name="bar_scope" string="适用范围"/>
|
||||||
<field name="mrs_cutting_tool_model_bar_blade_ids" widget="many2many_tags"/>
|
<field name="mrs_cutting_tool_model_bar_blade_ids" string="适用刀片型号" widget="many2many_tags"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="bar_wrench"/>
|
<field name="bar_wrench" string="配对扳手(mm)"/>
|
||||||
<field name="bar_screw"/>
|
<field name="bar_screw" string="配备螺丝(mm)"/>
|
||||||
<field name="bar_radius"/>
|
<field name="bar_radius" string="刀尖圆角半径"/>
|
||||||
<field name="bar_accuracy"/>
|
<field name="bar_accuracy" string="精度等级"/>
|
||||||
<field name="bar_hardness"/>
|
<field name="bar_hardness" string="硬度(°)"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
@@ -234,19 +234,19 @@
|
|||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="pad_code" invisible="True"/>
|
<field name="pad_code" invisible="True"/>
|
||||||
<field name="pad_c_diameter"/>
|
<field name="pad_c_diameter" string="C柄径(mm)"/>
|
||||||
<field name="pad_total_length"/>
|
<field name="pad_total_length" string="L总长(mm)"/>
|
||||||
<field name="pad_blade_number"/>
|
<field name="pad_blade_number" string="刃数"/>
|
||||||
<field name="pad_d_diameter"/>
|
<field name="pad_d_diameter" string="D刃径(mm)"/>
|
||||||
<field name="pad_scope"/>
|
<field name="pad_scope" string="适用范围"/>
|
||||||
<field name="mrs_cutting_tool_model_pad_blade_ids" widget="many2many_tags"/>
|
<field name="mrs_cutting_tool_model_pad_blade_ids" string="适用刀片型号" widget="many2many_tags"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="pad_wrench"/>
|
<field name="pad_wrench" string="配对扳手(mm)"/>
|
||||||
<field name="pad_screw"/>
|
<field name="pad_screw" string="配备螺丝(mm)"/>
|
||||||
<field name="pad_radius"/>
|
<field name="pad_radius" string="刀尖圆角半径"/>
|
||||||
<field name="pad_accuracy"/>
|
<field name="pad_accuracy" string="精度等级"/>
|
||||||
<field name="pad_hardness"/>
|
<field name="pad_hardness" string="硬度(°)"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
@@ -254,23 +254,25 @@
|
|||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="handle_code" invisible="True"/>
|
<field name="handle_code" invisible="True"/>
|
||||||
<field name="handle_diameter"/>
|
<field name="handle_length" string="柄长L(mm)"/>
|
||||||
<field name="handle_flange_length"/>
|
<field name="handle_diameter" string="直径D(mm)"/>
|
||||||
<field name="handle_flange_diameter"/>
|
<field name="handle_flange_length" string="法兰柄长L1(mm)"/>
|
||||||
<field name="handle_clamping_diameter_min"/>
|
<field name="handle_flange_diameter" string="法兰直径D1(mm)"/>
|
||||||
<field name="handle_clamping_diameter_max"/>
|
<field name="handle_clamping_diameter_min" string="夹持直径min(mm)"/>
|
||||||
<field name="handle_clamping_range"/>
|
<field name="handle_clamping_diameter_max" string="夹持直径max(mm)"/>
|
||||||
<field name="handle_detection_accuracy"/>
|
<field name="handle_clamping_range" string="夹持范围(mm)"/>
|
||||||
|
<field name="handle_detection_accuracy" string="检测精度"/>
|
||||||
<field name="mrs_cutting_tool_model_handle_chuck_model_ids" widget="many2many_tags"/>
|
<field name="mrs_cutting_tool_model_handle_chuck_model_ids" widget="many2many_tags"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="handle_jump_accuracy"/>
|
<field name="handle_jump_accuracy" string="径跳精度"/>
|
||||||
<field name="handle_max_speed"/>
|
<field name="handle_standard_speed" string="标准转速"/>
|
||||||
<field name="handle_standard_speed"/>
|
<field name="handle_max_speed" string="最大转速n/min"/>
|
||||||
<field name="handle_weight"/>
|
<field name="handle_standard_speed" string=""/>
|
||||||
<field name="handle_body_accuracy"/>
|
<field name="handle_weight" string="重量(kg)"/>
|
||||||
<field name="handle_nut"/>
|
<field name="handle_body_accuracy" string="本体精度(mm)"/>
|
||||||
<field name="handle_detection_hardness"/>
|
<field name="handle_nut" string="配对螺母(mm)"/>
|
||||||
|
<field name="handle_detection_hardness" string="检测硬度"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
@@ -278,19 +280,19 @@
|
|||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="chuck_code" invisible="True"/>
|
<field name="chuck_code" invisible="True"/>
|
||||||
<field name="chuck_clamping_diameter_min"/>
|
<field name="chuck_clamping_diameter_min" string="夹持直径min(mm)"/>
|
||||||
<field name="chuck_clamping_diameter_max"/>
|
<field name="chuck_clamping_diameter_max" string="夹持直径max(mm)"/>
|
||||||
<field name="chuck_diameter"/>
|
<field name="chuck_diameter" string="外径(mm)"/>
|
||||||
<field name="chuck_inner_diameter"/>
|
<field name="chuck_inner_diameter" string="内径(mm)"/>
|
||||||
<field name="chuck_feature"/>
|
<field name="chuck_feature" string="特性"/>
|
||||||
<field name="mrs_cutting_tool_model_chuck_handle_model_ids" widget="many2many_tags"/>
|
<field name="mrs_cutting_tool_model_chuck_handle_model_ids" widget="many2many_tags"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="chuck_accuracy"/>
|
<field name="chuck_accuracy" string="精度(mm)"/>
|
||||||
<field name="chuck_height"/>
|
<field name="chuck_height" string="高度(mm)"/>
|
||||||
<field name="chuck_nut"/>
|
<field name="chuck_nut" string="配对螺母(mm)"/>
|
||||||
<field name="chuck_clamping_range"/>
|
<field name="chuck_clamping_range" string="夹持范围(mm)"/>
|
||||||
<field name="image"/>
|
<field name="image" string="图片"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
|
|||||||
@@ -91,7 +91,6 @@ class ToolTransferRequestInformation(models.TransientModel):
|
|||||||
cutter_spacing_code = fields.Char(string='刀位号', readonly=True)
|
cutter_spacing_code = fields.Char(string='刀位号', readonly=True)
|
||||||
functional_tool_code = fields.Char(string='功能刀具编码', readonly=True)
|
functional_tool_code = fields.Char(string='功能刀具编码', readonly=True)
|
||||||
functional_tool_name_id = fields.Many2one('sf.functional.cutting.tool', string='功能刀具名称', readonly=True)
|
functional_tool_name_id = fields.Many2one('sf.functional.cutting.tool', string='功能刀具名称', readonly=True)
|
||||||
# todo 功能刀具类型为 Many2one
|
|
||||||
functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', readonly=True)
|
functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', readonly=True)
|
||||||
transfer_target = fields.Selection([('机台', '机台'),
|
transfer_target = fields.Selection([('机台', '机台'),
|
||||||
('线边刀库', '线边刀库'),
|
('线边刀库', '线边刀库'),
|
||||||
@@ -99,13 +98,13 @@ class ToolTransferRequestInformation(models.TransientModel):
|
|||||||
|
|
||||||
new_cnc_machine_table_id = fields.Many2one('sf.machine_tool', string='机床名称')
|
new_cnc_machine_table_id = fields.Many2one('sf.machine_tool', string='机床名称')
|
||||||
new_machine_tool_code = fields.Char(string='机床号')
|
new_machine_tool_code = fields.Char(string='机床号')
|
||||||
new_cutter_spacing_code = fields.Char(string='刀位号')
|
new_cutter_spacing_code = fields.Char(string='目标刀位号')
|
||||||
|
|
||||||
magazine_tool_warehouse_district = fields.Char(string='库区')
|
magazine_tool_warehouse_district = fields.Char(string='线边刀库库区')
|
||||||
magazine_tool_warehouse_position = fields.Char(string='库位')
|
magazine_tool_warehouse_position = fields.Char(string='线边刀库库位')
|
||||||
|
|
||||||
tool_room_warehouse_district = fields.Char(string='库区')
|
tool_room_warehouse_district = fields.Char(string='刀具房库区')
|
||||||
tool_room_warehouse_position = fields.Char(string='库位')
|
tool_room_warehouse_position = fields.Char(string='刀具房库位')
|
||||||
|
|
||||||
def tool_transfer_apply(self):
|
def tool_transfer_apply(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
<group>
|
<group>
|
||||||
<field name="new_cnc_machine_table_id" attrs="{'invisible': [('transfer_target', '!=', '机台')]}"/>
|
<field name="new_cnc_machine_table_id" attrs="{'invisible': [('transfer_target', '!=', '机台')]}"/>
|
||||||
<field name="new_machine_tool_code" attrs="{'invisible': [('transfer_target', '!=', '机台')]}"/>
|
<field name="new_machine_tool_code" attrs="{'invisible': [('transfer_target', '!=', '机台')]}"/>
|
||||||
<field name="new_cutter_spacing_code" attrs="{'invisible': [('transfer_target', '!=', '机台')]}"/>
|
<field name="new_cutter_spacing_code" string="刀位号" attrs="{'invisible': [('transfer_target', '!=', '机台')]}"/>
|
||||||
<field name="magazine_tool_warehouse_district" attrs="{'invisible': [('transfer_target', '!=', '线边刀库')]}"/>
|
<field name="magazine_tool_warehouse_district" attrs="{'invisible': [('transfer_target', '!=', '线边刀库')]}"/>
|
||||||
<field name="magazine_tool_warehouse_position" attrs="{'invisible': [('transfer_target', '!=', '线边刀库')]}"/>
|
<field name="magazine_tool_warehouse_position" attrs="{'invisible': [('transfer_target', '!=', '线边刀库')]}"/>
|
||||||
<field name="tool_room_warehouse_district" attrs="{'invisible': [('transfer_target', '!=', '刀具房')]}"/>
|
<field name="tool_room_warehouse_district" attrs="{'invisible': [('transfer_target', '!=', '刀具房')]}"/>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"description": "3D模型展示模块(限odoo16)",
|
"description": "3D模型展示模块(限odoo16)",
|
||||||
"author": "Van",
|
"author": "Van",
|
||||||
"website": "https://jikimo.com",
|
"website": "https://jikimo.com",
|
||||||
|
"license": "LGPL-3",
|
||||||
"category": "Tutorials",
|
"category": "Tutorials",
|
||||||
"version": "16.0.0.1",
|
"version": "16.0.0.1",
|
||||||
"depends": ['web'],
|
"depends": ['web'],
|
||||||
@@ -19,6 +20,5 @@
|
|||||||
'web_widget_model_viewer/static/src/js/*',
|
'web_widget_model_viewer/static/src/js/*',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
'license': 'LGPL-3',
|
'license': 'LGPL-3',
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user