修改i机床接口同步以及参数
This commit is contained in:
@@ -9,6 +9,14 @@ from odoo.addons.sf_base.commons.common import Common
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SpindleTaperType(models.Model):
|
||||
_name = 'spindle.taper.type'
|
||||
_description = '主轴锥孔型号'
|
||||
|
||||
name = fields.Char('名称')
|
||||
active = fields.Boolean('有效', default=True)
|
||||
|
||||
|
||||
class MachineBrandTags(models.Model):
|
||||
_name = 'sf.machine.brand.tags'
|
||||
_description = '标签'
|
||||
@@ -269,31 +277,19 @@ class MachineToolType(models.Model):
|
||||
('chilunjia', '齿轮架驱动')
|
||||
], string="主轴加高方式", default='sifudianji')
|
||||
workpiece_load = fields.Char('工件最大负载(kg)')
|
||||
lead_screw = fields.Char('丝杆')
|
||||
workbench_L = fields.Char('工作台长度(mm)')
|
||||
workbench_W = fields.Char('工作台宽度(mm)')
|
||||
guide_rail = fields.Char('导轨')
|
||||
machine_tool_L = fields.Char('机床长度(mm)')
|
||||
machine_tool_W = fields.Char('机床宽度(mm)')
|
||||
machine_tool_H = fields.Char('机床高度(mm)')
|
||||
feed_speed = fields.Char('进给速度(mm/min)')
|
||||
tool_speed = fields.Char('刀具速度(m/min)')
|
||||
distance_min = fields.Char('主轴端面至工作台面距离MIN(mm)')
|
||||
distance_max = fields.Char('主轴端面至工作台面距离MAX(mm)')
|
||||
taper = fields.Char('主轴锥度(°)')
|
||||
torque = fields.Char('主轴电机扭矩(n/m)')
|
||||
motor_power = fields.Char('主轴电机功率(kw)')
|
||||
tool_quality_max = fields.Char('刀具最大质量(kg)')
|
||||
tool_long_max = fields.Char('刀具最大长度(mm)')
|
||||
tool_diameter_max = fields.Char('刀具刀径max(mm)')
|
||||
tool_diameter_min = fields.Char('刀具刀径min(mm)')
|
||||
machine_tool_category = fields.Many2one('sf.machine_tool.category', string='机床类型')
|
||||
|
||||
# 多个型号对应一个机床
|
||||
machine_tool_id = fields.Many2one('sf.machine_tool', '机床')
|
||||
number_of_axles = fields.Selection(
|
||||
[("三轴", "三轴"), ("四轴", "四轴"), ("五轴", "五轴")],
|
||||
default="", string="轴数")
|
||||
# 加工进程
|
||||
x_axis = fields.Integer('X轴')
|
||||
y_axis = fields.Integer('Y轴')
|
||||
@@ -301,13 +297,80 @@ class MachineToolType(models.Model):
|
||||
b_axis = fields.Integer('B轴')
|
||||
c_axis = fields.Integer('C轴')
|
||||
remark = fields.Char('备注')
|
||||
precision_min = fields.Float('X轴定位精度min(mm)', digits=(12, 3))
|
||||
precision_max = fields.Float('X轴定位精度max(mm)', digits=(12, 3))
|
||||
control_system_id = fields.Many2one('sf.machine.control_system',
|
||||
string="控制系统")
|
||||
active = fields.Boolean('有效', default=True)
|
||||
code = fields.Char('编码')
|
||||
|
||||
# 1212修改后的字段
|
||||
number_of_axles = fields.Selection(
|
||||
[("三轴", "三轴"), ("四轴", "四轴"), ("五轴", "五轴"), ("六轴", "六轴")],
|
||||
default="", string="轴数")
|
||||
|
||||
# 1212新增字段
|
||||
a_axis = fields.Integer('a轴')
|
||||
function_type = fields.Selection(
|
||||
[("ZXJGZX", "钻铣加工中心"), ("CXJGZX", "车削加工中心"), ("FHJGZX", "复合加工中心")],
|
||||
default="", string="功能类型")
|
||||
T_trough_num = fields.Integer('槽数')
|
||||
T_trough_wide = fields.Float('槽宽(mm)')
|
||||
T_trough_distance = fields.Float('槽距(mm)')
|
||||
|
||||
taper_type_id = fields.Many2one('spindle.taper.type', string='主轴锥孔型号')
|
||||
spindle_center_distance = fields.Float('主轴中心至立柱滑轨面距离(mm)')
|
||||
spindle_continuous_power = fields.Float('主轴持续功率(kw)')
|
||||
spindle_peak_power = fields.Float('主轴峰值功率(kw)')
|
||||
spindle_sustained_torque = fields.Float('主轴持续扭矩(n/m)')
|
||||
spindle_peak_torque = fields.Float('主轴峰值扭矩(n/m)')
|
||||
linear_axis_guides_type = fields.Char('直线轴导轨类型')
|
||||
axis_driven_type = fields.Char('坐标轴驱动类型')
|
||||
|
||||
X_axis_rapid_traverse_speed = fields.Char('X轴快速进给速度(mm/min)')
|
||||
Y_axis_rapid_traverse_speed = fields.Char('Y轴快速进给速度(mm/min)')
|
||||
Z_axis_rapid_traverse_speed = fields.Char('Z轴快速进给速度(mm/min)')
|
||||
a_axis_rapid_traverse_speed = fields.Char('a轴快速进给速度(mm/min)')
|
||||
b_axis_rapid_traverse_speed = fields.Char('b轴快速进给速度(mm/min)')
|
||||
c_axis_rapid_traverse_speed = fields.Char('c轴快速进给速度(mm/min)')
|
||||
straight_cutting_feed_rate = fields.Char('直线切削进给速度(mm/min)')
|
||||
rotary_cutting_feed_rate = fields.Char('回转切削进给速度(mm/min)')
|
||||
|
||||
X_precision = fields.Float('X轴定位精度(mm)', digits=(12, 3))
|
||||
X_precision_repeat = fields.Float('X轴重复定位精度(mm)', digits=(12, 3))
|
||||
Y_precision = fields.Float('Y轴定位精度(mm)', digits=(12, 3))
|
||||
Y_precision_repeat = fields.Float('Y轴重复定位精度(mm)', digits=(12, 3))
|
||||
Z_precision = fields.Float('Z轴定位精度(mm)', digits=(12, 3))
|
||||
Z_precision_repeat = fields.Float('Z轴重复定位精度(mm)', digits=(12, 3))
|
||||
a_precision = fields.Float('a轴定位精度(mm)', digits=(12, 3))
|
||||
a_precision_repeat = fields.Float('a轴重复定位精度(mm)', digits=(12, 3))
|
||||
b_precision = fields.Float('b轴定位精度(mm)', digits=(12, 3))
|
||||
b_precision_repeat = fields.Float('b轴重复定位精度(mm)', digits=(12, 3))
|
||||
c_precision = fields.Float('c轴定位精度(mm)', digits=(12, 3))
|
||||
c_precision_repeat = fields.Float('c轴重复定位精度(mm)', digits=(12, 3))
|
||||
|
||||
tool_full_diameter_max = fields.Float('刀具满刀最大直径(mm)')
|
||||
tool_perimeter_diameter_max = fields.Float('刀具邻空刀最大直径(mm)')
|
||||
T_tool_time = fields.Integer('T-T换刀时间(s)')
|
||||
C_tool_time = fields.Integer('C-C换刀时间(s)')
|
||||
|
||||
jg_image_id = fields.Many2many('maintenance.equipment.image', 'jg_equipment_id', string='加工能力',
|
||||
domain="[('type', '=', '加工能力')]")
|
||||
lq_image_id = fields.Many2many('maintenance.equipment.image', 'lq_equipment_id', string='冷却方式',
|
||||
domain="[('type', '=', '冷却方式')]")
|
||||
|
||||
|
||||
#待删除字段
|
||||
precision_min = fields.Float('X轴定位精度min(mm)', digits=(12, 3))
|
||||
precision_max = fields.Float('X轴定位精度max(mm)', digits=(12, 3))
|
||||
lead_screw = fields.Char('丝杆')
|
||||
guide_rail = fields.Char('导轨')
|
||||
feed_speed = fields.Char('进给速度(mm/min)')
|
||||
tool_speed = fields.Char('刀具速度(m/min)')
|
||||
torque = fields.Char('主轴点击扭矩(n/m)')
|
||||
motor_power = fields.Char('主轴电机功率(kw)')
|
||||
taper = fields.Char('主轴锥度(°)')
|
||||
tool_diameter_max = fields.Char('刀具刀径max(mm)')
|
||||
tool_diameter_min = fields.Char('刀具刀径min(mm)')
|
||||
|
||||
def _get_ids(self, machine_tool_type_code):
|
||||
machine_tool_type_ids = []
|
||||
for item in machine_tool_type_code:
|
||||
|
||||
Reference in New Issue
Block a user