修改设备参数以及机床型号基础参数以及同步cloud方法
This commit is contained in:
@@ -85,7 +85,8 @@ class SfMaintenanceEquipment(models.Model):
|
||||
c_axis = fields.Integer('C轴')
|
||||
remark = fields.Char('备注')
|
||||
is_binding = fields.Boolean('是否绑定机床', default=False)
|
||||
precision = fields.Float('加工精度')
|
||||
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="控制系统")
|
||||
# 多个机床型号对应一个机床
|
||||
@@ -102,7 +103,7 @@ class SfMaintenanceEquipment(models.Model):
|
||||
('youyagang', '油压缸驱动'),
|
||||
('chilunjia', '齿轮架驱动')
|
||||
], string="主轴加高方式", default='sifudianji')
|
||||
workpiece_load = fields.Char('工件负载')
|
||||
workpiece_load = fields.Char('工件最大负载(kg)')
|
||||
lead_screw = fields.Char('丝杆')
|
||||
workbench_L = fields.Char('工作台长度(mm)')
|
||||
workbench_W = fields.Char('工作台宽度(mm)')
|
||||
@@ -111,14 +112,16 @@ class SfMaintenanceEquipment(models.Model):
|
||||
machine_tool_W = fields.Char('机床宽度(mm)')
|
||||
machine_tool_H = fields.Char('机床高度(mm)')
|
||||
feed_speed = fields.Char('进给速度(mm/min)')
|
||||
tool_speed = fields.Char('刀具速度')
|
||||
distance = fields.Char('主轴端面至工作台面距离(mm)')
|
||||
tool_speed = fields.Char('刀具速度(m/min)')
|
||||
distance_min = fields.Char('主轴端面至工作台面距离MIN(mm)')
|
||||
distance_max = fields.Char('主轴端面至工作台面距离MIN(mm)')
|
||||
taper = fields.Char('主轴锥度(°)')
|
||||
torque = fields.Char('主轴点击扭矩(n/m)')
|
||||
motor_power = fields.Char('主轴电机功率(kw)')
|
||||
tool_quality_max = fields.Char('刀具最大质量')
|
||||
tool_long_max = fields.Char('刀具最大长度')
|
||||
tool_diameter_max = fields.Char('刀具最大刀径')
|
||||
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='机床类型')
|
||||
# 一个机床对应一個加工工厂,一个加工工厂对应多个机床
|
||||
factory_id = fields.Many2one('res.partner', string='所属工厂',
|
||||
@@ -132,20 +135,7 @@ class SfMaintenanceEquipment(models.Model):
|
||||
active = fields.Boolean('有效', default=True)
|
||||
# 多个型号对应一个机床
|
||||
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轴')
|
||||
z_axis = fields.Integer('Z轴')
|
||||
b_axis = fields.Integer('B轴')
|
||||
c_axis = fields.Integer('C轴')
|
||||
remark = fields.Char('备注')
|
||||
precision = fields.Float('加工精度')
|
||||
control_system_id = fields.Many2one('sf.machine.control_system',
|
||||
string="控制系统")
|
||||
active = fields.Boolean('有效', default=True)
|
||||
|
||||
|
||||
def name_get(self):
|
||||
result = []
|
||||
@@ -208,7 +198,8 @@ class SfMaintenanceEquipment(models.Model):
|
||||
item.number_of_knife_library = item.type_id.number_of_knife_library
|
||||
item.number_of_axles = item.type_id.number_of_axles
|
||||
item.rotate_speed = item.type_id.rotate_speed
|
||||
item.precision = item.type_id.precision
|
||||
item.precision_min = item.type_id.precision_min
|
||||
item.precision_max = item.type_id.precision_max
|
||||
item.control_system_id = item.type_id.control_system_id
|
||||
item.x_axis = item.type_id.x_axis
|
||||
item.y_axis = item.type_id.y_axis
|
||||
@@ -227,13 +218,15 @@ class SfMaintenanceEquipment(models.Model):
|
||||
item.machine_tool_H = item.type_id.machine_tool_H
|
||||
item.feed_speed = item.type_id.feed_speed
|
||||
item.tool_speed = item.type_id.tool_speed
|
||||
item.distance = item.type_id.distance
|
||||
item.distance_min = item.type_id.distance_min
|
||||
item.distance_max = item.type_id.distance_max
|
||||
item.taper = item.type_id.taper
|
||||
item.torque = item.type_id.torque
|
||||
item.motor_power = item.type_id.motor_power
|
||||
item.tool_quality_max = item.type_id.tool_quality_max
|
||||
item.tool_long_max = item.type_id.tool_long_max
|
||||
item.tool_diameter_max = item.type_id.tool_diameter_max
|
||||
item.tool_diameter_min = item.type_id.tool_diameter_min
|
||||
item.machine_tool_category = item.type_id.machine_tool_category.id
|
||||
item.brand_id = item.type_id.brand_id.id
|
||||
|
||||
|
||||
@@ -38,107 +38,114 @@
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='description']" position="before">
|
||||
<page string="设备参数" name="sf_equipment" attrs="{'invisible': [('type_id', '=', False)]}">
|
||||
<group string="参数">
|
||||
<group>
|
||||
<field name="control_system_id" options="{'no_create': True}"/>
|
||||
<label for="workbench_L" string="工作台[mm]"/>
|
||||
<div class="o_address_format">
|
||||
<label for="workbench_L" string="长"/>
|
||||
<field name="workbench_L" class="o_address_zip"
|
||||
<group>
|
||||
<group string="基本参数">
|
||||
<field name="control_system_id" required="1" options="{'no_create': True}"/>
|
||||
<label for="workbench_L" string="工作台尺寸(mm)"/>
|
||||
<div class="test_model">
|
||||
<label for="workbench_L" string="长"/>
|
||||
<field name="workbench_L" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="workbench_W" string="宽"/>
|
||||
<field name="workbench_W" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<label for="machine_tool_L" string="机床尺寸(mm)"/>
|
||||
<div class="test_model">
|
||||
<label for="machine_tool_L" string="长"/>
|
||||
<field name="machine_tool_L" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="machine_tool_W" string="宽"/>
|
||||
<field name="machine_tool_W" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
<label for="machine_tool_H" string="高"/>
|
||||
<field name="machine_tool_H" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="feed_speed" required="1"/>
|
||||
<label for="precision_min" string="X轴定位精度(mm)"/>
|
||||
<div class="test_model">
|
||||
<label for="precision_min" string="最小(min)"/>
|
||||
<field name="precision_min" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="precision_max" string="最大(max)"/>
|
||||
<field name="precision_max" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="workpiece_load" required="1"/>
|
||||
<field name="number_of_knife_library" required="1" options="{'format': false}"/>
|
||||
<field name="lead_screw" required="1"/>
|
||||
<field name="number_of_axles" required="1" widget="radio"
|
||||
options="{'horizontal': true}"/>
|
||||
<label for="x_axis" string="加工行程(mm)"
|
||||
attrs="{'invisible': [('number_of_axles', '=', False)]}"/>
|
||||
<div class="test_model"
|
||||
attrs="{'invisible': [('number_of_axles', '=', False)]}">
|
||||
<label for="x_axis" string="x"/>
|
||||
<field name="x_axis" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="y_axis" string="y"/>
|
||||
<field name="y_axis" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="z_axis" string="z"/>
|
||||
<field name="z_axis" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
<br></br>
|
||||
<label for="b_axis" string="b"
|
||||
attrs="{'invisible': [('number_of_axles', '=', '三轴')]}"/>
|
||||
<field name="b_axis" class="o_address_zip" required="1"
|
||||
attrs="{'invisible': [('number_of_axles', '=', '三轴')]}"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="c_axis" string="c"
|
||||
attrs="{'invisible': [('number_of_axles', 'in', ['三轴','四轴'])]}"/>
|
||||
<field name="c_axis" class="o_address_zip" required="1"
|
||||
attrs="{'invisible': [('number_of_axles', 'in', ['三轴','四轴'])]}"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
</group>
|
||||
<group string="主轴">
|
||||
<field name="taper" required="1"/>
|
||||
<field name="rotate_speed" string="主轴转速(min)" required="1"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="workbench_W" string="宽"/>
|
||||
<field name="workbench_W" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<!-- <field name="workbench_L"/>-->
|
||||
<!-- <field name="workbench_W"/>-->
|
||||
<label for="machine_tool_L" string="机床[mm]"/>
|
||||
<div class="o_address_format">
|
||||
<label for="machine_tool_L" string="长"/>
|
||||
<field name="machine_tool_L" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="machine_tool_W" string="宽"/>
|
||||
<field name="machine_tool_W" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="machine_tool_H" string="高"/>
|
||||
<field name="machine_tool_H" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<!-- <field name="machine_tool_L"/>-->
|
||||
<!-- <field name="machine_tool_W"/>-->
|
||||
<!-- <field name="machine_tool_H"/>-->
|
||||
<label for="taper" string="主轴"/>
|
||||
<div class="o_address_format">
|
||||
<label for="taper" string="锥度(°)"/>
|
||||
<field name="taper" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="torque" string="点击扭矩(n/m)"/>
|
||||
<field name="torque" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="motor_power" string="电机功率(kw)"/>
|
||||
<field name="motor_power" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<label for="motor_power" string="转速(min)"/>
|
||||
<field name="rotate_speed" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="number_of_axles" widget="radio"
|
||||
options="{'horizontal': true}"/>
|
||||
<field name="heightened_way"/>
|
||||
<label for="x_axis" string="加工行程(mm)"
|
||||
attrs="{'invisible': [('number_of_axles', '=', False)]}"/>
|
||||
<div class="test_model"
|
||||
attrs="{'invisible': [('number_of_axles', '=', False)]}">
|
||||
<label for="x_axis" string="x"/>
|
||||
<field name="x_axis" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="y_axis" string="y"/>
|
||||
<field name="y_axis" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="z_axis" string="z"/>
|
||||
<field name="z_axis" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<br></br>
|
||||
<label for="b_axis" string="b"
|
||||
attrs="{'invisible': [('number_of_axles', '=', '三轴')]}"/>
|
||||
<field name="b_axis" class="o_address_zip"
|
||||
attrs="{'invisible': [('number_of_axles', '=', '三轴')]}"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="c_axis" string="c"
|
||||
attrs="{'invisible': [('number_of_axles', 'in', ['三轴','四轴'])]}"/>
|
||||
<field name="c_axis" class="o_address_zip"
|
||||
attrs="{'invisible': [('number_of_axles', 'in', ['三轴','四轴'])]}"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="distance"/>
|
||||
<field name="precision" string="X轴定位精度(mm)"/>
|
||||
<field name="heightened_way" required="1"/>
|
||||
<field name="torque" required="1"/>
|
||||
<field name="motor_power" required="1"/>
|
||||
<label for="distance_min" string="主轴端面-工作台距离(mm)"/>
|
||||
<div class="test_model">
|
||||
<label for="distance_min" string="最小(min)"/>
|
||||
<field name="distance_min" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="distance_max" string="最大(max)"/>
|
||||
<field name="distance_max" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="guide_rail" required="1"/>
|
||||
</group>
|
||||
<group string="刀具">
|
||||
<field name="knife_type" required="1"/>
|
||||
<field name="tool_speed" required="1"/>
|
||||
<field name="tool_long_max" required="1"/>
|
||||
<label for="tool_diameter_min" string="刀具刀径(mm)"/>
|
||||
<div class="test_model">
|
||||
<label for="tool_diameter_min" string="最小(min)"/>
|
||||
<field name="tool_diameter_min" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="tool_diameter_max" string="最大(max)"/>
|
||||
<field name="tool_diameter_max" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="tool_quality_max" required="1"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<!-- <field name="taper"/>-->
|
||||
<!-- <field name="torque"/>-->
|
||||
<!-- <field name="motor_power"/>-->
|
||||
</group>
|
||||
<group>
|
||||
<field name="knife_type"/>
|
||||
<field name="number_of_knife_library" options="{'format': false}"/>
|
||||
<field name="tool_quality_max"/>
|
||||
<field name="tool_long_max"/>
|
||||
<field name="tool_diameter_max"/>
|
||||
<field name="tool_speed"/>
|
||||
<field name="guide_rail"/>
|
||||
|
||||
<field name="feed_speed"/>
|
||||
<field name="workpiece_load"/>
|
||||
<field name="lead_screw"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
</page>
|
||||
<page string="其他" attrs="{'invisible': [('type_id', '=', False)]}">
|
||||
|
||||
Reference in New Issue
Block a user