Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/刀具物料与夹具物料的反注册
# Conflicts: # sf_mrs_connect/models/res_config_setting.py
This commit is contained in:
@@ -267,7 +267,7 @@ class MachineToolType(models.Model):
|
|||||||
('youyagang', '油压缸驱动'),
|
('youyagang', '油压缸驱动'),
|
||||||
('chilunjia', '齿轮架驱动')
|
('chilunjia', '齿轮架驱动')
|
||||||
], string="主轴加高方式", default='sifudianji')
|
], string="主轴加高方式", default='sifudianji')
|
||||||
workpiece_load = fields.Char('工件负载')
|
workpiece_load = fields.Char('工件最大负载(kg)')
|
||||||
lead_screw = fields.Char('丝杆')
|
lead_screw = fields.Char('丝杆')
|
||||||
workbench_L = fields.Char('工作台长度(mm)')
|
workbench_L = fields.Char('工作台长度(mm)')
|
||||||
workbench_W = fields.Char('工作台宽度(mm)')
|
workbench_W = fields.Char('工作台宽度(mm)')
|
||||||
@@ -276,14 +276,16 @@ class MachineToolType(models.Model):
|
|||||||
machine_tool_W = fields.Char('机床宽度(mm)')
|
machine_tool_W = fields.Char('机床宽度(mm)')
|
||||||
machine_tool_H = fields.Char('机床高度(mm)')
|
machine_tool_H = fields.Char('机床高度(mm)')
|
||||||
feed_speed = fields.Char('进给速度(mm/min)')
|
feed_speed = fields.Char('进给速度(mm/min)')
|
||||||
tool_speed = fields.Char('刀具速度')
|
tool_speed = fields.Char('刀具速度(m/min)')
|
||||||
distance = fields.Char('主轴端面至工作台面距离(mm)')
|
distance_min = fields.Char('主轴端面至工作台面距离MIN(mm)')
|
||||||
|
distance_max = fields.Char('主轴端面至工作台面距离MIN(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)')
|
||||||
tool_quality_max = fields.Char('刀具最大质量')
|
tool_quality_max = fields.Char('刀具最大质量(kg)')
|
||||||
tool_long_max = fields.Char('刀具最大长度')
|
tool_long_max = fields.Char('刀具最大长度(mm)')
|
||||||
tool_diameter_max = fields.Char('刀具最大刀径')
|
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_category = fields.Many2one('sf.machine_tool.category', string='机床类型')
|
||||||
|
|
||||||
# 多个型号对应一个机床
|
# 多个型号对应一个机床
|
||||||
@@ -298,7 +300,8 @@ class MachineToolType(models.Model):
|
|||||||
b_axis = fields.Integer('B轴')
|
b_axis = fields.Integer('B轴')
|
||||||
c_axis = fields.Integer('C轴')
|
c_axis = fields.Integer('C轴')
|
||||||
remark = fields.Char('备注')
|
remark = fields.Char('备注')
|
||||||
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',
|
control_system_id = fields.Many2one('sf.machine.control_system',
|
||||||
string="控制系统")
|
string="控制系统")
|
||||||
active = fields.Boolean('有效', default=True)
|
active = fields.Boolean('有效', default=True)
|
||||||
|
|||||||
@@ -4,4 +4,5 @@
|
|||||||
.test_model>.o_form_label {
|
.test_model>.o_form_label {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
margin-right: 0px !important;
|
margin-right: 0px !important;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
<field name="name">tree.sf.machine_tool.type</field>
|
<field name="name">tree.sf.machine_tool.type</field>
|
||||||
<field name="model">sf.machine_tool.type</field>
|
<field name="model">sf.machine_tool.type</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="机床型号">
|
<tree string="机床型号" create="0">
|
||||||
<field name="code"/>
|
<field name="code"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="brand_id"/>
|
<field name="brand_id"/>
|
||||||
@@ -116,10 +116,10 @@
|
|||||||
<field name="machine_tool_picture" widget="image" nolabel="1"/>
|
<field name="machine_tool_picture" widget="image" nolabel="1"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="基本信息">
|
<page string="基本信息">
|
||||||
<group>
|
<group>
|
||||||
<group string="基础参数">
|
<group string="基本参数">
|
||||||
<field name="control_system_id" required="1" options="{'no_create': True}"/>
|
<field name="control_system_id" required="1" options="{'no_create': True}"/>
|
||||||
<label for="workbench_L" string="工作台尺寸(mm)"/>
|
<label for="workbench_L" string="工作台尺寸(mm)"/>
|
||||||
<div class="test_model">
|
<div class="test_model">
|
||||||
@@ -145,7 +145,16 @@
|
|||||||
options="{'format': false}"/>
|
options="{'format': false}"/>
|
||||||
</div>
|
</div>
|
||||||
<field name="feed_speed" required="1"/>
|
<field name="feed_speed" required="1"/>
|
||||||
<field name="precision" required="1" string="X轴定位精度(mm)"/>
|
<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="workpiece_load" required="1"/>
|
||||||
<field name="number_of_knife_library" required="1" options="{'format': false}"/>
|
<field name="number_of_knife_library" required="1" options="{'format': false}"/>
|
||||||
<field name="lead_screw" required="1"/>
|
<field name="lead_screw" required="1"/>
|
||||||
@@ -187,16 +196,32 @@
|
|||||||
<field name="heightened_way" required="1"/>
|
<field name="heightened_way" required="1"/>
|
||||||
<field name="torque" required="1"/>
|
<field name="torque" required="1"/>
|
||||||
<field name="motor_power" required="1"/>
|
<field name="motor_power" required="1"/>
|
||||||
<field name="distance" required="1"/>
|
<label for="distance_min" string="主轴端面-工作台距离(mm)"/>
|
||||||
</group>
|
<div class="test_model">
|
||||||
<group>
|
<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"/>
|
<field name="guide_rail" required="1"/>
|
||||||
</group>
|
</group>
|
||||||
<group string="刀具">
|
<group string="刀具">
|
||||||
<field name="knife_type" required="1"/>
|
<field name="knife_type" required="1"/>
|
||||||
<field name="tool_speed" required="1"/>
|
<field name="tool_speed" required="1"/>
|
||||||
<field name="tool_long_max" required="1"/>
|
<field name="tool_long_max" required="1"/>
|
||||||
<field name="tool_diameter_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"/>
|
<field name="tool_quality_max" required="1"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
@@ -85,7 +85,8 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
c_axis = fields.Integer('C轴')
|
c_axis = fields.Integer('C轴')
|
||||||
remark = fields.Char('备注')
|
remark = fields.Char('备注')
|
||||||
is_binding = fields.Boolean('是否绑定机床', default=False)
|
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',
|
control_system_id = fields.Many2one('sf.machine.control_system',
|
||||||
string="控制系统")
|
string="控制系统")
|
||||||
# 多个机床型号对应一个机床
|
# 多个机床型号对应一个机床
|
||||||
@@ -102,7 +103,7 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
('youyagang', '油压缸驱动'),
|
('youyagang', '油压缸驱动'),
|
||||||
('chilunjia', '齿轮架驱动')
|
('chilunjia', '齿轮架驱动')
|
||||||
], string="主轴加高方式", default='sifudianji')
|
], string="主轴加高方式", default='sifudianji')
|
||||||
workpiece_load = fields.Char('工件负载')
|
workpiece_load = fields.Char('工件最大负载(kg)')
|
||||||
lead_screw = fields.Char('丝杆')
|
lead_screw = fields.Char('丝杆')
|
||||||
workbench_L = fields.Char('工作台长度(mm)')
|
workbench_L = fields.Char('工作台长度(mm)')
|
||||||
workbench_W = fields.Char('工作台宽度(mm)')
|
workbench_W = fields.Char('工作台宽度(mm)')
|
||||||
@@ -111,14 +112,16 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
machine_tool_W = fields.Char('机床宽度(mm)')
|
machine_tool_W = fields.Char('机床宽度(mm)')
|
||||||
machine_tool_H = fields.Char('机床高度(mm)')
|
machine_tool_H = fields.Char('机床高度(mm)')
|
||||||
feed_speed = fields.Char('进给速度(mm/min)')
|
feed_speed = fields.Char('进给速度(mm/min)')
|
||||||
tool_speed = fields.Char('刀具速度')
|
tool_speed = fields.Char('刀具速度(m/min)')
|
||||||
distance = fields.Char('主轴端面至工作台面距离(mm)')
|
distance_min = fields.Char('主轴端面至工作台面距离MIN(mm)')
|
||||||
|
distance_max = fields.Char('主轴端面至工作台面距离MIN(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)')
|
||||||
tool_quality_max = fields.Char('刀具最大质量')
|
tool_quality_max = fields.Char('刀具最大质量(kg)')
|
||||||
tool_long_max = fields.Char('刀具最大长度')
|
tool_long_max = fields.Char('刀具最大长度(mm)')
|
||||||
tool_diameter_max = fields.Char('刀具最大刀径')
|
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_category = fields.Many2one('sf.machine_tool.category', string='机床类型')
|
||||||
# 一个机床对应一個加工工厂,一个加工工厂对应多个机床
|
# 一个机床对应一個加工工厂,一个加工工厂对应多个机床
|
||||||
factory_id = fields.Many2one('res.partner', string='所属工厂',
|
factory_id = fields.Many2one('res.partner', string='所属工厂',
|
||||||
@@ -132,20 +135,7 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
active = fields.Boolean('有效', default=True)
|
active = fields.Boolean('有效', default=True)
|
||||||
# 多个型号对应一个机床
|
# 多个型号对应一个机床
|
||||||
machine_tool_id = fields.Many2one('sf.machine_tool', '机床')
|
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):
|
def name_get(self):
|
||||||
result = []
|
result = []
|
||||||
@@ -208,7 +198,8 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
item.number_of_knife_library = item.type_id.number_of_knife_library
|
item.number_of_knife_library = item.type_id.number_of_knife_library
|
||||||
item.number_of_axles = item.type_id.number_of_axles
|
item.number_of_axles = item.type_id.number_of_axles
|
||||||
item.rotate_speed = item.type_id.rotate_speed
|
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.control_system_id = item.type_id.control_system_id
|
||||||
item.x_axis = item.type_id.x_axis
|
item.x_axis = item.type_id.x_axis
|
||||||
item.y_axis = item.type_id.y_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.machine_tool_H = item.type_id.machine_tool_H
|
||||||
item.feed_speed = item.type_id.feed_speed
|
item.feed_speed = item.type_id.feed_speed
|
||||||
item.tool_speed = item.type_id.tool_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.taper = item.type_id.taper
|
||||||
item.torque = item.type_id.torque
|
item.torque = item.type_id.torque
|
||||||
item.motor_power = item.type_id.motor_power
|
item.motor_power = item.type_id.motor_power
|
||||||
item.tool_quality_max = item.type_id.tool_quality_max
|
item.tool_quality_max = item.type_id.tool_quality_max
|
||||||
item.tool_long_max = item.type_id.tool_long_max
|
item.tool_long_max = item.type_id.tool_long_max
|
||||||
item.tool_diameter_max = item.type_id.tool_diameter_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.machine_tool_category = item.type_id.machine_tool_category.id
|
||||||
item.brand_id = item.type_id.brand_id.id
|
item.brand_id = item.type_id.brand_id.id
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ 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.Char(string='品牌')
|
brand = fields.Many2one('sf.machine.brand', relared='model.brand_id', string='品牌')
|
||||||
model = fields.Char(string='型号')
|
model = 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='故障类型')
|
||||||
fault_code = fields.Char(string='故障代码')
|
fault_code = fields.Char(string='故障代码')
|
||||||
|
|||||||
@@ -63,6 +63,9 @@
|
|||||||
<field name="model">sf.maintenance.logs</field>
|
<field name="model">sf.maintenance.logs</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search>
|
<search>
|
||||||
|
<searchpanel>
|
||||||
|
<field name="model" icon="fa-building" enable_counters="1"/>
|
||||||
|
</searchpanel>
|
||||||
<field name="code"/>
|
<field name="code"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="type"/>
|
<field name="type"/>
|
||||||
|
|||||||
@@ -38,107 +38,114 @@
|
|||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//page[@name='description']" position="before">
|
<xpath expr="//page[@name='description']" position="before">
|
||||||
<page string="设备参数" name="sf_equipment" attrs="{'invisible': [('type_id', '=', False)]}">
|
<page string="设备参数" name="sf_equipment" attrs="{'invisible': [('type_id', '=', False)]}">
|
||||||
<group string="参数">
|
<group>
|
||||||
<group>
|
<group string="基本参数">
|
||||||
<field name="control_system_id" options="{'no_create': True}"/>
|
<field name="control_system_id" required="1" options="{'no_create': True}"/>
|
||||||
<label for="workbench_L" string="工作台[mm]"/>
|
<label for="workbench_L" string="工作台尺寸(mm)"/>
|
||||||
<div class="o_address_format">
|
<div class="test_model">
|
||||||
<label for="workbench_L" string="长"/>
|
<label for="workbench_L" string="长"/>
|
||||||
<field name="workbench_L" class="o_address_zip"
|
<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}"/>
|
options="{'format': false}"/>
|
||||||
<span>&nbsp;</span>
|
<field name="heightened_way" required="1"/>
|
||||||
<label for="workbench_W" string="宽"/>
|
<field name="torque" required="1"/>
|
||||||
<field name="workbench_W" class="o_address_zip"
|
<field name="motor_power" required="1"/>
|
||||||
options="{'format': false}"/>
|
<label for="distance_min" string="主轴端面-工作台距离(mm)"/>
|
||||||
</div>
|
<div class="test_model">
|
||||||
<!-- <field name="workbench_L"/>-->
|
<label for="distance_min" string="最小(min)"/>
|
||||||
<!-- <field name="workbench_W"/>-->
|
<field name="distance_min" class="o_address_zip" required="1"
|
||||||
<label for="machine_tool_L" string="机床[mm]"/>
|
options="{'format': false}"/>
|
||||||
<div class="o_address_format">
|
<span>&nbsp;</span>
|
||||||
<label for="machine_tool_L" string="长"/>
|
<label for="distance_max" string="最大(max)"/>
|
||||||
<field name="machine_tool_L" class="o_address_zip"
|
<field name="distance_max" class="o_address_zip" required="1"
|
||||||
options="{'format': false}"/>
|
options="{'format': false}"/>
|
||||||
<span>&nbsp;</span>
|
</div>
|
||||||
<label for="machine_tool_W" string="宽"/>
|
<field name="guide_rail" required="1"/>
|
||||||
<field name="machine_tool_W" class="o_address_zip"
|
</group>
|
||||||
options="{'format': false}"/>
|
<group string="刀具">
|
||||||
<span>&nbsp;</span>
|
<field name="knife_type" required="1"/>
|
||||||
<label for="machine_tool_H" string="高"/>
|
<field name="tool_speed" required="1"/>
|
||||||
<field name="machine_tool_H" class="o_address_zip"
|
<field name="tool_long_max" required="1"/>
|
||||||
options="{'format': false}"/>
|
<label for="tool_diameter_min" string="刀具刀径(mm)"/>
|
||||||
</div>
|
<div class="test_model">
|
||||||
<!-- <field name="machine_tool_L"/>-->
|
<label for="tool_diameter_min" string="最小(min)"/>
|
||||||
<!-- <field name="machine_tool_W"/>-->
|
<field name="tool_diameter_min" class="o_address_zip" required="1"
|
||||||
<!-- <field name="machine_tool_H"/>-->
|
options="{'format': false}"/>
|
||||||
<label for="taper" string="主轴"/>
|
<span>&nbsp;</span>
|
||||||
<div class="o_address_format">
|
<label for="tool_diameter_max" string="最大(max)"/>
|
||||||
<label for="taper" string="锥度(°)"/>
|
<field name="tool_diameter_max" class="o_address_zip" required="1"
|
||||||
<field name="taper" class="o_address_zip"
|
options="{'format': false}"/>
|
||||||
options="{'format': false}"/>
|
</div>
|
||||||
<span>&nbsp;</span>
|
<field name="tool_quality_max" required="1"/>
|
||||||
<label for="torque" string="点击扭矩(n/m)"/>
|
</group>
|
||||||
<field name="torque" class="o_address_zip"
|
</group>
|
||||||
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="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>
|
||||||
<page string="其他" attrs="{'invisible': [('type_id', '=', False)]}">
|
<page string="其他" attrs="{'invisible': [('type_id', '=', False)]}">
|
||||||
|
|||||||
@@ -24,12 +24,33 @@
|
|||||||
'views/production_line_view.xml',
|
'views/production_line_view.xml',
|
||||||
'views/tray_view.xml',
|
'views/tray_view.xml',
|
||||||
'views/model_type_view.xml',
|
'views/model_type_view.xml',
|
||||||
|
# 'views/kanban_change.xml'
|
||||||
|
|
||||||
],
|
],
|
||||||
|
'assets': {
|
||||||
|
|
||||||
|
'web.assets_qweb': [
|
||||||
|
],
|
||||||
|
|
||||||
|
'web.assets_backend': [
|
||||||
|
'sf_manufacturing/static/src/xml/kanban_change.xml',
|
||||||
|
'sf_manufacturing/static/src/js/kanban_change.js',
|
||||||
|
'sf_manufacturing/static/src/scss/kanban_change.scss'
|
||||||
|
]
|
||||||
|
|
||||||
|
},
|
||||||
'demo': [
|
'demo': [
|
||||||
],
|
],
|
||||||
'qweb': [
|
'qweb': [
|
||||||
],
|
],
|
||||||
|
'assets': {
|
||||||
|
'web.assets_backend': [
|
||||||
|
'sf_manufacturing/static/src/js/kanban_change.js',
|
||||||
|
'sf_manufacturing/static/src/scss/kanban_change.scss',
|
||||||
|
'sf_manufacturing/static/src/xml/kanban_change.xml',
|
||||||
|
],
|
||||||
|
|
||||||
|
},
|
||||||
'license': 'LGPL-3',
|
'license': 'LGPL-3',
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'application': False,
|
'application': False,
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ from odoo.addons.resource.models.resource import Intervals
|
|||||||
|
|
||||||
class ResWorkcenter(models.Model):
|
class ResWorkcenter(models.Model):
|
||||||
_inherit = "mrp.workcenter"
|
_inherit = "mrp.workcenter"
|
||||||
|
|
||||||
|
# 生产线显示
|
||||||
|
production_line_show = fields.Char(string='生产线')
|
||||||
equipment_id = fields.Many2one('maintenance.equipment', string='设备')
|
equipment_id = fields.Many2one('maintenance.equipment', 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='生产线')
|
||||||
|
|||||||
@@ -154,6 +154,12 @@ class ResProductMo(models.Model):
|
|||||||
fixture_screw_size = fields.Integer(string="螺牙大小(mm)", size=6)
|
fixture_screw_size = fields.Integer(string="螺牙大小(mm)", size=6)
|
||||||
# 注册状态
|
# 注册状态
|
||||||
register_state = fields.Selection([('未注册', '未注册'), ('已注册', '已注册'),('注册失败','注册失败')], string='注册状态', default='未注册')
|
register_state = fields.Selection([('未注册', '未注册'), ('已注册', '已注册'),('注册失败','注册失败')], string='注册状态', default='未注册')
|
||||||
|
industry_code = fields.Char('行业编码', readonly=True)
|
||||||
|
|
||||||
|
@api.onchange('brand_id')
|
||||||
|
def _onchange_brand_id(self):
|
||||||
|
if self.brand_id:
|
||||||
|
self.manufacturer_model_number = self.brand_id.manufacturer_model_number
|
||||||
|
|
||||||
def _json_apply_machine_tool_type_item_code(self, item):
|
def _json_apply_machine_tool_type_item_code(self, item):
|
||||||
code_arr = []
|
code_arr = []
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
import base64
|
||||||
from collections import defaultdict, namedtuple
|
from collections import defaultdict, namedtuple
|
||||||
from odoo.addons.stock.models.stock_rule import ProcurementException
|
from odoo.addons.stock.models.stock_rule import ProcurementException
|
||||||
from odoo.addons.sf_base.commons.common import Common
|
from odoo.addons.sf_base.commons.common import Common
|
||||||
@@ -280,57 +281,14 @@ class StockPicking(models.Model):
|
|||||||
if picking_out.state != 'done':
|
if picking_out.state != 'done':
|
||||||
raise UserError(
|
raise UserError(
|
||||||
_('该入库单对应的单号为%s的出库单还未完成,不能进行验证操作!' % picking_out.name))
|
_('该入库单对应的单号为%s的出库单还未完成,不能进行验证操作!' % picking_out.name))
|
||||||
# 采购单验证(夹具和刀具)
|
|
||||||
if self.product_id.categ_type in ['刀具', '夹具']:
|
|
||||||
self._register_fixture()
|
|
||||||
res = super().button_validate()
|
|
||||||
return res
|
|
||||||
|
|
||||||
# 将采购到的夹具注册到Cloud
|
res = super().button_validate()
|
||||||
def _register_fixture(self):
|
# 采购单验证(夹具和刀具)
|
||||||
create_url = '/api/fixture/create'
|
for item in self.move_ids_without_package:
|
||||||
config = self.env['res.config.settings'].get_values()
|
if item.product_id.categ_type in ['刀具', '夹具']:
|
||||||
headers = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
if item.quantity_done > 0:
|
||||||
strurl = config['sf_url'] + create_url
|
item._register_fixture()
|
||||||
for item in self:
|
return res
|
||||||
val = {
|
|
||||||
'token': config['token'],
|
|
||||||
'name': item.name,
|
|
||||||
'brand_code': self.env['sf.machine.brand'].search([('id', '=', item.product_id.brand_id.id)]).code,
|
|
||||||
'manufacturer_model_number': item.product_id.manufacturer_model_number,
|
|
||||||
'fixture_material_code': self.env['sf.fixture.material'].search(
|
|
||||||
[('id', '=', item.product_id.fixture_material_id.id)]).code,
|
|
||||||
'fixture_multi_mounting_type_code': self.env['sf.multi_mounting.type'].search(
|
|
||||||
[('id', '=', item.product_id.fixture_multi_mounting_type_id.id)]).code,
|
|
||||||
'fixture_materials_type_code': self.env['sf.materials.model'].search(
|
|
||||||
[('id', '=', item.product_id.materials_type_id.id)]).materials_no,
|
|
||||||
'fixture_clamping_way': item.product_id.fixture_clamping_way,
|
|
||||||
'fixture_port_type': item.product_id.fixture_port_type,
|
|
||||||
'fixture_length': item.product_id.tool_length,
|
|
||||||
'fixture_width': item.product_id.tool_width,
|
|
||||||
'fixture_height': item.product_id.tool_height,
|
|
||||||
'fixture_weight': item.product_id.tool_weight,
|
|
||||||
'fixture_clamp_workpiece_length_max': item.product_id.fixture_clamp_workpiece_length_max,
|
|
||||||
'fixture_clamp_workpiece_width_max': item.product_id.fixture_clamp_workpiece_width_max,
|
|
||||||
'fixture_clamp_workpiece_height_max': item.product_id.fixture_clamp_workpiece_height_max,
|
|
||||||
'fixture_clamp_workpiece_diameter_max': item.product_id.fixture_clamp_workpiece_diameter_max,
|
|
||||||
'fixture_maximum_carrying_weight': item.product_id.fixture_maximum_carrying_weight,
|
|
||||||
'fixture_maximum_clamping_force': item.product_id.fixture_maximum_clamping_force,
|
|
||||||
'fixture_driving_way': item.product_id.fixture_driving_way,
|
|
||||||
'fixture_apply_machine_tool_type_codes': self.env[
|
|
||||||
'product.template']._json_apply_machine_tool_type_item_code(item),
|
|
||||||
'fixture_through_hole_size': item.product_id.fixture_through_hole_size,
|
|
||||||
'fixture_screw_size': item.product_id.fixture_screw_size,
|
|
||||||
}
|
|
||||||
try:
|
|
||||||
ret = requests.post(strurl, json={}, data=val, headers=headers)
|
|
||||||
ret = ret.json()
|
|
||||||
if ret['status'] == 200:
|
|
||||||
item.product_id.write({'register_state': '已注册'})
|
|
||||||
else:
|
|
||||||
item.product_id.write({'register_state': '注册失败'})
|
|
||||||
except Exception as e:
|
|
||||||
raise UserError("注册夹具到云端失败,请联系管理员!")
|
|
||||||
|
|
||||||
# 创建 外协出库入单
|
# 创建 外协出库入单
|
||||||
def create_outcontract_picking(self, sorted_workorders_arr, item):
|
def create_outcontract_picking(self, sorted_workorders_arr, item):
|
||||||
@@ -388,3 +346,58 @@ class ReStockMove(models.Model):
|
|||||||
'location_dest_id': self.mapped('location_dest_id').id,
|
'location_dest_id': self.mapped('location_dest_id').id,
|
||||||
'state': 'confirmed',
|
'state': 'confirmed',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 将采购到的夹具注册到Cloud
|
||||||
|
def _register_fixture(self):
|
||||||
|
create_url = '/api/fixture/create'
|
||||||
|
config = self.env['res.config.settings'].get_values()
|
||||||
|
headers = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
||||||
|
strurl = config['sf_url'] + create_url
|
||||||
|
for item in self:
|
||||||
|
val = {
|
||||||
|
'token': config['token'],
|
||||||
|
'name': item.product_id.name,
|
||||||
|
'brand_code': self.env['sf.machine.brand'].search([('id', '=', item.product_id.brand_id.id)]).code,
|
||||||
|
'manufacturer_model_number': item.product_id.manufacturer_model_number,
|
||||||
|
'fixture_material_code': self.env['sf.fixture.material'].search(
|
||||||
|
[('id', '=', item.product_id.fixture_material_id.id)]).code,
|
||||||
|
'fixture_multi_mounting_type_code': self.env['sf.multi_mounting.type'].search(
|
||||||
|
[('id', '=', item.product_id.fixture_multi_mounting_type_id.id)]).code,
|
||||||
|
'fixture_materials_type_code': self.env['sf.materials.model'].search(
|
||||||
|
[('id', '=', item.product_id.materials_type_id.id)]).materials_no,
|
||||||
|
'fixture_clamping_way': item.product_id.fixture_clamping_way,
|
||||||
|
'fixture_port_type': item.product_id.fixture_port_type,
|
||||||
|
'fixture_length': item.product_id.tool_length,
|
||||||
|
'fixture_width': item.product_id.tool_width,
|
||||||
|
'fixture_height': item.product_id.tool_height,
|
||||||
|
'fixture_weight': item.product_id.tool_weight,
|
||||||
|
'fixture_amount': int(item.quantity_done),
|
||||||
|
'fixture_model_file': '' if not item.product_id.fixture_model_file else base64.b64encode(
|
||||||
|
item.product_id.fixture_model_file).decode(
|
||||||
|
'utf-8'),
|
||||||
|
'fixture_clamp_workpiece_length_max': item.product_id.fixture_clamp_workpiece_length_max,
|
||||||
|
'fixture_clamp_workpiece_width_max': item.product_id.fixture_clamp_workpiece_width_max,
|
||||||
|
'fixture_clamp_workpiece_height_max': item.product_id.fixture_clamp_workpiece_height_max,
|
||||||
|
'fixture_clamp_workpiece_diameter_max': item.product_id.fixture_clamp_workpiece_diameter_max,
|
||||||
|
'fixture_maximum_carrying_weight': item.product_id.fixture_maximum_carrying_weight,
|
||||||
|
'fixture_maximum_clamping_force': item.product_id.fixture_maximum_clamping_force,
|
||||||
|
'fixture_driving_way': '' if not item.product_id.fixture_driving_way else item.product_id.fixture_driving_way,
|
||||||
|
'fixture_apply_machine_tool_type_codes': self.env[
|
||||||
|
'product.template']._json_apply_machine_tool_type_item_code(item),
|
||||||
|
'fixture_through_hole_size': item.product_id.fixture_through_hole_size,
|
||||||
|
'fixture_screw_size': item.product_id.fixture_screw_size,
|
||||||
|
}
|
||||||
|
try:
|
||||||
|
if item.product_id.industry_code:
|
||||||
|
val['industry_code'] = item.product_id.industry_code
|
||||||
|
ret = requests.post(strurl, json={}, data=val, headers=headers)
|
||||||
|
ret = ret.json()
|
||||||
|
if ret['status'] == 200:
|
||||||
|
if not item.product_id.industry_code:
|
||||||
|
item.product_id.write({'register_state': '已注册', 'industry_code': ret['industry_code']})
|
||||||
|
else:
|
||||||
|
item.product_id.write({'register_state': '已注册'})
|
||||||
|
else:
|
||||||
|
item.product_id.write({'register_state': '注册失败'})
|
||||||
|
except Exception as e:
|
||||||
|
raise UserError("注册夹具到云端失败,请联系管理员!")
|
||||||
|
|||||||
78
sf_manufacturing/static/src/js/kanban_change.js
Normal file
78
sf_manufacturing/static/src/js/kanban_change.js
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
/** @odoo-module */
|
||||||
|
|
||||||
|
import { KanbanController } from "@web/views/kanban/kanban_controller";
|
||||||
|
import { kanbanView } from "@web/views/kanban/kanban_view";
|
||||||
|
import { registry } from "@web/core/registry";
|
||||||
|
|
||||||
|
// the controller usually contains the Layout and the renderer.
|
||||||
|
class CustomKanbanController extends KanbanController {
|
||||||
|
// Your logic here, override or insert new methods...
|
||||||
|
// if you override setup(), don't forget to call super.setup()
|
||||||
|
|
||||||
|
async setup() {
|
||||||
|
super.setup();
|
||||||
|
console.log('99999999111');
|
||||||
|
this.workOrders = await this.getAllWorkOrders();
|
||||||
|
console.log('lines', this.workOrders);
|
||||||
|
}
|
||||||
|
buttonClick(ev) {
|
||||||
|
const button = ev.currentTarget;
|
||||||
|
const id = button.getAttribute('data-id');
|
||||||
|
|
||||||
|
console.log('true_id', id);
|
||||||
|
const context = {production_line_show: 'shengchanxian1'}
|
||||||
|
this.env.services.rpc('/web/dataset/call_kw', {
|
||||||
|
model: 'mrp.workcenter',
|
||||||
|
method: 'search_read',
|
||||||
|
args: [[], ['id']],
|
||||||
|
kwargs: {}
|
||||||
|
}).then((records) => {
|
||||||
|
console.log(records)
|
||||||
|
const ids = records.map(record => record.id);
|
||||||
|
const context = {production_line_show: id};
|
||||||
|
this.env.services.rpc('/web/dataset/call_kw', {
|
||||||
|
model: 'mrp.workcenter',
|
||||||
|
method: 'write',
|
||||||
|
args: [ids, context],
|
||||||
|
kwargs: {}
|
||||||
|
}).then((response) => {
|
||||||
|
console.log('response', response);
|
||||||
|
setTimeout(function () {
|
||||||
|
location.reload();
|
||||||
|
},2000)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
async getAllWorkOrders() {
|
||||||
|
const response = await this.env.services.rpc('/web/dataset/call_kw',{
|
||||||
|
model: 'sf.production.line',
|
||||||
|
method: 'search_read',
|
||||||
|
args: [],
|
||||||
|
kwargs: {},
|
||||||
|
});
|
||||||
|
// const response1 = await this.env.services.rpc('/web/dataset/call_kw',{
|
||||||
|
// model: 'mrp.workcenter',
|
||||||
|
// method: 'search_read',
|
||||||
|
// args: [],
|
||||||
|
// kwargs: {},
|
||||||
|
// });
|
||||||
|
console.log('response', response);
|
||||||
|
// console.log('response1', response1);
|
||||||
|
// 你可以在这里处理响应,例如将其存储在控制器的状态中
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
CustomKanbanController.template = "sf_manufacturing.CustomKanbanView1";
|
||||||
|
|
||||||
|
export const customKanbanView = {
|
||||||
|
...kanbanView, // contains the default Renderer/Controller/Model
|
||||||
|
Controller: CustomKanbanController,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Register it to the views registry
|
||||||
|
registry.category("views").add("custom_kanban1", customKanbanView);
|
||||||
22
sf_manufacturing/static/src/scss/kanban_change.scss
Normal file
22
sf_manufacturing/static/src/scss/kanban_change.scss
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
.choosekanban {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 16px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.choosekanban > button {
|
||||||
|
padding: 0 2vw !important;
|
||||||
|
height: 2vw !important;
|
||||||
|
border: none !important;
|
||||||
|
border-right: 1px solid #ccc !important;
|
||||||
|
background-color: #EEEEEE;
|
||||||
|
color: #989799;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.o_content > .d-flex {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
|
||||||
16
sf_manufacturing/static/src/xml/kanban_change.xml
Normal file
16
sf_manufacturing/static/src/xml/kanban_change.xml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<templates>
|
||||||
|
<t t-name="sf_manufacturing.CustomKanbanView1" t-inherit="web.KanbanView" owl="1">
|
||||||
|
<xpath expr="//t[@t-component='props.Renderer']" position="before">
|
||||||
|
<div class="choosekanban">
|
||||||
|
<!-- <t t-foreach="env['mrp.workcenter'].get_dynamic_data()" t-as="i" t-key="i"> -->
|
||||||
|
<t t-foreach="workOrders" t-as="i" t-key="i.id">
|
||||||
|
<button t-on-click="buttonClick" t-att-data-id="i.name">
|
||||||
|
<t t-esc="i.name"></t>
|
||||||
|
</button>
|
||||||
|
</t>
|
||||||
|
</div>
|
||||||
|
</xpath>
|
||||||
|
|
||||||
|
</t>
|
||||||
|
</templates>
|
||||||
@@ -94,6 +94,7 @@
|
|||||||
<xpath expr="//field[@name='alternative_workcenter_ids']" position="after">
|
<xpath expr="//field[@name='alternative_workcenter_ids']" position="after">
|
||||||
<field name="production_line_id"/>
|
<field name="production_line_id"/>
|
||||||
<field name="equipment_id"/>
|
<field name="equipment_id"/>
|
||||||
|
<field name="production_line_show" invisible="1"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='resource_calendar_id']" position="after">
|
<xpath expr="//field[@name='resource_calendar_id']" position="after">
|
||||||
<field name="is_process_outsourcing"/>
|
<field name="is_process_outsourcing"/>
|
||||||
@@ -101,15 +102,194 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="mrp_workcenter_view_kanban_inherit_maintenance" model="ir.ui.view">
|
<!-- <record id="mrp_workcenter_view_kanban_inherit_maintenance" model="ir.ui.view"> -->
|
||||||
<field name="name">mrp.workcenter.view.kanban.inherit.maintenance</field>
|
<!-- <field name="name">mrp.workcenter.view.kanban.inherit.maintenance</field> -->
|
||||||
|
<!-- <field name="model">mrp.workcenter</field> -->
|
||||||
|
<!-- <field name="inherit_id" ref="mrp.mrp_workcenter_kanban"/> -->
|
||||||
|
<!-- <field name="arch" type="xml"> -->
|
||||||
|
<!-- <xpath expr="//div[@name='plan_order']" position="after"> -->
|
||||||
|
<!-- <div> -->
|
||||||
|
<!-- <a name="%(maintenance.hr_equipment_request_action)d" type="action">Maintenance</a> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </xpath> -->
|
||||||
|
<!-- </field> -->
|
||||||
|
<!-- </record> -->
|
||||||
|
<!-- 继承原有的看板视图 -->
|
||||||
|
<record id="mrp_workcenter_kanban_inherit1" model="ir.ui.view">
|
||||||
|
<field name="name">mrp.workcenter.kanban.inherit</field>
|
||||||
<field name="model">mrp.workcenter</field>
|
<field name="model">mrp.workcenter</field>
|
||||||
<field name="inherit_id" ref="mrp.mrp_workcenter_kanban"/>
|
<field name="inherit_id" ref="mrp.mrp_workcenter_kanban"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//div[@name='plan_order']" position="after">
|
<xpath expr="//kanban" position="replace">
|
||||||
<div>
|
<kanban class="oe_background_grey o_kanban_dashboard o_workcenter_kanban" create="0" sample="1"
|
||||||
<a name="%(maintenance.hr_equipment_request_action)d" type="action">Maintenance</a>
|
js_class="custom_kanban1">
|
||||||
</div>
|
<field name="name"/>
|
||||||
|
<field name="color"/>
|
||||||
|
<field name="workorder_count"/>
|
||||||
|
<field name="working_state"/>
|
||||||
|
<field name="oee_target"/>
|
||||||
|
<field name="production_line_show"/>
|
||||||
|
<field name="production_line_id"/>
|
||||||
|
<templates>
|
||||||
|
<t t-name="kanban-box"
|
||||||
|
t-if="record.production_line_id.value == record.production_line_show.raw_value">
|
||||||
|
<!-- <div t-on-click="console.log(record.production_line_id,'11111111111')"></div>-->
|
||||||
|
<!-- <div t-on-click="console.log(record.production_line_show,'22222222222')"></div>-->
|
||||||
|
<div t-attf-class="#{!selection_mode ? kanban_color(record.color.raw_value) : ''}">
|
||||||
|
<div t-attf-class="o_kanban_card_header o_kanban_record_top">
|
||||||
|
<div class="o_kanban_record_headings o_kanban_card_header_title">
|
||||||
|
<span class="o_primary ml8" style="display: inline-block">
|
||||||
|
<field name="name"/>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="o_kanban_manage_button_section">
|
||||||
|
<a class="o_kanban_manage_toggle_button" href="#">
|
||||||
|
<i class="fa fa-ellipsis-v" role="img" aria-label="Manage" title="Manage"/>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="container o_kanban_card_content">
|
||||||
|
<div class="row mb16">
|
||||||
|
<div class="col-6 o_kanban_primary_left">
|
||||||
|
<div class="btn-group" name="o_wo">
|
||||||
|
<t t-if="record.workorder_count.raw_value > 0">
|
||||||
|
<button class="btn btn-primary" name="action_work_order"
|
||||||
|
type="object"
|
||||||
|
context="{'search_default_ready': 1, 'search_default_progress': 1}">
|
||||||
|
<span>WORK ORDERS</span>
|
||||||
|
</button>
|
||||||
|
</t>
|
||||||
|
<t t-if="record.workorder_count.raw_value <= 0">
|
||||||
|
<button class="btn btn-warning"
|
||||||
|
name="%(mrp.act_product_mrp_production_workcenter)d"
|
||||||
|
type="action">
|
||||||
|
<span>PLAN ORDERS</span>
|
||||||
|
</button>
|
||||||
|
</t>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 o_kanban_primary_right">
|
||||||
|
<div class="row" t-if="record.workorder_ready_count.raw_value > 0">
|
||||||
|
<div class="col-8">
|
||||||
|
<a name="action_work_order" type="object"
|
||||||
|
context="{'search_default_ready': 1}">
|
||||||
|
To Launch
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 text-end">
|
||||||
|
<field name="workorder_ready_count"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" t-if="record.workorder_progress_count.raw_value > 0">
|
||||||
|
<div class="col-8">
|
||||||
|
<a name="action_work_order" type="object"
|
||||||
|
context="{'search_default_progress': 1}">
|
||||||
|
In Progress
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 text-end">
|
||||||
|
<field name="workorder_progress_count"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" t-if="record.workorder_late_count.raw_value > 0">
|
||||||
|
<div class="col-8">
|
||||||
|
<a name="action_work_order" type="object"
|
||||||
|
context="{'search_default_late': 1}">
|
||||||
|
Late
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 text-end">
|
||||||
|
<field name="workorder_late_count"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" t-if="record.oee.raw_value > 0">
|
||||||
|
<div class="col-6">
|
||||||
|
<a name="%(mrp.mrp_workcenter_productivity_report_oee)d"
|
||||||
|
type="action">
|
||||||
|
OEE
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 text-end">
|
||||||
|
<span t-att-class="record.oee_target.raw_value and (record.oee.raw_value < record.oee_target.raw_value) and 'text-danger' or (record.oee.raw_value > record.oee_target.raw_value) and 'text-success' or 'text-warning'">
|
||||||
|
<strong>
|
||||||
|
<field name="oee" widget="integer"/>%
|
||||||
|
</strong>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 o_kanban_primary_left"
|
||||||
|
style="position:absolute; bottom:10px;" name="wc_stages">
|
||||||
|
<a name="%(mrp.act_mrp_block_workcenter)d" type="action"
|
||||||
|
class="o_status float-end"
|
||||||
|
title="No workorder currently in progress. Click to mark work center as blocked."
|
||||||
|
aria-label="No workorder currently in progress. Click to mark work center as blocked."
|
||||||
|
attrs="{'invisible': [('working_state','in',('blocked','done'))]}"/>
|
||||||
|
<a name="unblock" type="object" class=" o_status o_status_red float-end"
|
||||||
|
title="Workcenter blocked, click to unblock."
|
||||||
|
aria-label="Workcenter blocked, click to unblock."
|
||||||
|
attrs="{'invisible': [('working_state','in',('normal','done'))]}"/>
|
||||||
|
<a name="%(mrp.act_mrp_block_workcenter)d" type="action"
|
||||||
|
class="o_status o_status_green float-end"
|
||||||
|
title="Work orders in progress. Click to block work center."
|
||||||
|
aria-label="Work orders in progress. Click to block work center."
|
||||||
|
attrs="{'invisible': [('working_state','in',('normal','blocked'))]}"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="container o_kanban_card_manage_pane dropdown-menu" role="menu">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6 o_kanban_card_manage_section o_kanban_manage_view">
|
||||||
|
<div role="menuitem" class="o_kanban_card_manage_title">
|
||||||
|
<span>Actions</span>
|
||||||
|
</div>
|
||||||
|
<div role="menuitem" name="plan_order">
|
||||||
|
<a name="action_work_order" type="object">Plan Orders</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a name="%(maintenance.hr_equipment_request_action)d" type="action">
|
||||||
|
Maintenance
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 o_kanban_card_manage_section o_kanban_manage_new">
|
||||||
|
<div role="menuitem" class="o_kanban_card_manage_title">
|
||||||
|
<span>Reporting</span>
|
||||||
|
</div>
|
||||||
|
<div role="menuitem">
|
||||||
|
<a name="%(mrp.mrp_workcenter_productivity_report_oee)d" type="action">
|
||||||
|
OEE
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div role="menuitem">
|
||||||
|
<a name="%(mrp.mrp_workorder_workcenter_report)d" type="action"
|
||||||
|
context="{'search_default_thisyear':True}">
|
||||||
|
Performance
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div role="menuitem">
|
||||||
|
<a name="action_work_order" type="object"
|
||||||
|
context="{'search_default_waiting': 1}">Waiting Availability
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div t-if="widget.editable" class="o_kanban_card_manage_settings row">
|
||||||
|
<div role="menuitem" aria-haspopup="true" class="col-8">
|
||||||
|
<ul role="menu" class="oe_kanban_colorpicker" data-field="color"/>
|
||||||
|
</div>
|
||||||
|
<div role="menuitem" class="text-end">
|
||||||
|
<a type="edit">Settings</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
</templates>
|
||||||
|
</kanban>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -141,5 +321,22 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<!--<!– 测试searchpanel –>-->
|
||||||
|
<!-- <record id="view_location_search_sf11111_inherit" model="ir.ui.view">-->
|
||||||
|
<!-- <field name="name">mrp.workcenter.inherit</field>-->
|
||||||
|
<!-- <field name="model">mrp.workcenter</field>-->
|
||||||
|
<!-- <field name="inherit_id" ref="mrp.view_mrp_workcenter_search"/>-->
|
||||||
|
<!-- <field name="arch" type="xml">-->
|
||||||
|
<!-- <xpath expr="//search[1]" position="inside">-->
|
||||||
|
<!-- <searchpanel class="account_root">-->
|
||||||
|
<!--<!– <field name="location_type" icon="fa-filter"/> –>-->
|
||||||
|
<!-- <field name="production_line_id" select="multi"/>-->
|
||||||
|
<!-- </searchpanel>-->
|
||||||
|
<!-- </xpath>-->
|
||||||
|
<!-- </field>-->
|
||||||
|
<!-- </record>-->
|
||||||
|
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> develop
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ class ResConfigSettings(models.TransientModel):
|
|||||||
_logger.info("同步资源库品牌")
|
_logger.info("同步资源库品牌")
|
||||||
self.env['sf.machine.control_system'].sync_all_machine_tool_type_control_system()
|
self.env['sf.machine.control_system'].sync_all_machine_tool_type_control_system()
|
||||||
_logger.info("同步资源库控制系统")
|
_logger.info("同步资源库控制系统")
|
||||||
self.env['sf.machine_tool.type'].sync_all_machine_tool_type()
|
|
||||||
_logger.info("同步资源库机床型号")
|
|
||||||
self.env['sf.machine_tool.category'].sync_all_machine_tool_category()
|
self.env['sf.machine_tool.category'].sync_all_machine_tool_category()
|
||||||
_logger.info("同步资源库机床类型")
|
_logger.info("同步资源库机床类型")
|
||||||
# self.env['sf.production.process.parameter'].sync_all_production_process_parameter()
|
# self.env['sf.production.process.parameter'].sync_all_production_process_parameter()
|
||||||
@@ -66,7 +65,16 @@ class ResConfigSettings(models.TransientModel):
|
|||||||
self.env['sf.functional.fixture.type'].sync_all_functional_fixture_type()
|
self.env['sf.functional.fixture.type'].sync_all_functional_fixture_type()
|
||||||
_logger.info("同步功能夹具类型")
|
_logger.info("同步功能夹具类型")
|
||||||
# self.env['sf.functional.fixture'].sync_all_functional_fixture()
|
# self.env['sf.functional.fixture'].sync_all_functional_fixture()
|
||||||
|
# self.env['sf.multi_mounting.type'].sync_all_multi_mounting_type()
|
||||||
|
# _logger.info("同步联装类型")
|
||||||
|
# self.env['sf.fixture.model'].sync_all_fixture_model()
|
||||||
|
# _logger.info("同步夹具型号")
|
||||||
|
# self.env['sf.functional.fixture.type'].sync_all_functional_fixture_type()
|
||||||
|
# _logger.info("同步功能夹具类型")
|
||||||
|
# self.env['sf.functional.fixture'].sync_all_functional_fixture()
|
||||||
# _logger.info("同步功能夹具")
|
# _logger.info("同步功能夹具")
|
||||||
|
self.env['sf.machine_tool.type'].sync_all_machine_tool_type()
|
||||||
|
_logger.info("同步资源库机床型号")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
_logger.info("捕获错误信息:%s" % e)
|
_logger.info("捕获错误信息:%s" % e)
|
||||||
raise ValidationError("数据错误导致同步失败,请联系管理员")
|
raise ValidationError("数据错误导致同步失败,请联系管理员")
|
||||||
|
|||||||
@@ -708,9 +708,11 @@ class MachineToolType(models.Model):
|
|||||||
[("code", '=', item['code'])])
|
[("code", '=', item['code'])])
|
||||||
if brand:
|
if brand:
|
||||||
brand.id = item['id'],
|
brand.id = item['id'],
|
||||||
|
brand.knife_type = item['knife_type'],
|
||||||
brand.name = item['name'],
|
brand.name = item['name'],
|
||||||
brand.code = item['code'],
|
brand.code = item['code'],
|
||||||
brand.precision = item['precision'],
|
brand.precision_min = item['precision_min'],
|
||||||
|
brand.precision_max = item['precision_max'],
|
||||||
brand.number_of_knife_library = item['number_of_knife_library'],
|
brand.number_of_knife_library = item['number_of_knife_library'],
|
||||||
brand.rotate_speed = item['rotate_speed'],
|
brand.rotate_speed = item['rotate_speed'],
|
||||||
brand.number_of_axles = item['number_of_axles'],
|
brand.number_of_axles = item['number_of_axles'],
|
||||||
@@ -734,6 +736,7 @@ class MachineToolType(models.Model):
|
|||||||
"id": item['id'],
|
"id": item['id'],
|
||||||
"name": item['name'],
|
"name": item['name'],
|
||||||
"code": item['code'],
|
"code": item['code'],
|
||||||
|
"knife_type": item['knife_type'],
|
||||||
|
|
||||||
"number_of_knife_library": item['number_of_knife_library'],
|
"number_of_knife_library": item['number_of_knife_library'],
|
||||||
"rotate_speed": item['rotate_speed'],
|
"rotate_speed": item['rotate_speed'],
|
||||||
@@ -746,7 +749,8 @@ class MachineToolType(models.Model):
|
|||||||
"b_axis": item['b_axis'],
|
"b_axis": item['b_axis'],
|
||||||
"c_axis": item['c_axis'],
|
"c_axis": item['c_axis'],
|
||||||
"remark": item['remark'],
|
"remark": item['remark'],
|
||||||
"precision": item['precision'],
|
"precision_min": item['precision_min'],
|
||||||
|
"precision_max": item['precision_max'],
|
||||||
'control_system_id': self.env['sf.machine.control_system'].search(
|
'control_system_id': self.env['sf.machine.control_system'].search(
|
||||||
[('code', '=', item['control_system_id'])]).id,
|
[('code', '=', item['control_system_id'])]).id,
|
||||||
"active": item['active'],
|
"active": item['active'],
|
||||||
@@ -763,13 +767,15 @@ class MachineToolType(models.Model):
|
|||||||
"machine_tool_H": item['machine_tool_H'],
|
"machine_tool_H": item['machine_tool_H'],
|
||||||
"feed_speed": item['feed_speed'],
|
"feed_speed": item['feed_speed'],
|
||||||
"tool_speed": item['tool_speed'],
|
"tool_speed": item['tool_speed'],
|
||||||
"distance": item['distance'],
|
"distance_min": item['distance_min'],
|
||||||
|
"distance_max": item['distance_max'],
|
||||||
"taper": item['taper'],
|
"taper": item['taper'],
|
||||||
"torque": item['torque'],
|
"torque": item['torque'],
|
||||||
"motor_power": item['motor_power'],
|
"motor_power": item['motor_power'],
|
||||||
"tool_quality_max": item['tool_quality_max'],
|
"tool_quality_max": item['tool_quality_max'],
|
||||||
"tool_long_max": item['tool_long_max'],
|
"tool_long_max": item['tool_long_max'],
|
||||||
"tool_diameter_max": item['tool_diameter_max'],
|
"tool_diameter_max": item['tool_diameter_max'],
|
||||||
|
"tool_diameter_min": item['tool_diameter_min'],
|
||||||
"machine_tool_category": self.env['sf.machine_tool.category'].search(
|
"machine_tool_category": self.env['sf.machine_tool.category'].search(
|
||||||
[('code', '=', item['machine_tool_category'])]).id,
|
[('code', '=', item['machine_tool_category'])]).id,
|
||||||
|
|
||||||
@@ -812,8 +818,10 @@ class MachineToolType(models.Model):
|
|||||||
"z_axis": item['z_axis'],
|
"z_axis": item['z_axis'],
|
||||||
"b_axis": item['b_axis'],
|
"b_axis": item['b_axis'],
|
||||||
"c_axis": item['c_axis'],
|
"c_axis": item['c_axis'],
|
||||||
|
"knife_type": item['knife_type'],
|
||||||
"remark": item['remark'],
|
"remark": item['remark'],
|
||||||
"precision": item['precision'],
|
"precision_min": item['precision_min'],
|
||||||
|
"precision_max": item['precision_max'],
|
||||||
'control_system_id': self.env['sf.machine.control_system'].search(
|
'control_system_id': self.env['sf.machine.control_system'].search(
|
||||||
[('code', '=', item['control_system_id'])]).id,
|
[('code', '=', item['control_system_id'])]).id,
|
||||||
"active": item['active'],
|
"active": item['active'],
|
||||||
@@ -830,13 +838,15 @@ class MachineToolType(models.Model):
|
|||||||
"machine_tool_H": item['machine_tool_H'],
|
"machine_tool_H": item['machine_tool_H'],
|
||||||
"feed_speed": item['feed_speed'],
|
"feed_speed": item['feed_speed'],
|
||||||
"tool_speed": item['tool_speed'],
|
"tool_speed": item['tool_speed'],
|
||||||
"distance": item['distance'],
|
"distance_min": item['distance_min'],
|
||||||
|
"distance_max": item['distance_max'],
|
||||||
"taper": item['taper'],
|
"taper": item['taper'],
|
||||||
"torque": item['torque'],
|
"torque": item['torque'],
|
||||||
"motor_power": item['motor_power'],
|
"motor_power": item['motor_power'],
|
||||||
"tool_quality_max": item['tool_quality_max'],
|
"tool_quality_max": item['tool_quality_max'],
|
||||||
"tool_long_max": item['tool_long_max'],
|
"tool_long_max": item['tool_long_max'],
|
||||||
"tool_diameter_max": item['tool_diameter_max'],
|
"tool_diameter_max": item['tool_diameter_max'],
|
||||||
|
"tool_diameter_min": item['tool_diameter_min'],
|
||||||
"machine_tool_category": self.env['sf.machine_tool.category'].search(
|
"machine_tool_category": self.env['sf.machine_tool.category'].search(
|
||||||
[('code', '=', item['machine_tool_category'])]).id,
|
[('code', '=', item['machine_tool_category'])]).id,
|
||||||
|
|
||||||
@@ -856,9 +866,11 @@ class MachineToolType(models.Model):
|
|||||||
"y_axis": item['y_axis'],
|
"y_axis": item['y_axis'],
|
||||||
"z_axis": item['z_axis'],
|
"z_axis": item['z_axis'],
|
||||||
"b_axis": item['b_axis'],
|
"b_axis": item['b_axis'],
|
||||||
|
"knife_type": item['knife_type'],
|
||||||
"c_axis": item['c_axis'],
|
"c_axis": item['c_axis'],
|
||||||
"remark": item['remark'],
|
"remark": item['remark'],
|
||||||
"precision": item['precision'],
|
"precision_min": item['precision_min'],
|
||||||
|
"precision_max": item['precision_max'],
|
||||||
'control_system_id': self.env['sf.machine.control_system'].search(
|
'control_system_id': self.env['sf.machine.control_system'].search(
|
||||||
[('code', '=', item['control_system_id'])]).id,
|
[('code', '=', item['control_system_id'])]).id,
|
||||||
"active": item['active'],
|
"active": item['active'],
|
||||||
@@ -875,13 +887,15 @@ class MachineToolType(models.Model):
|
|||||||
"machine_tool_H": item['machine_tool_H'],
|
"machine_tool_H": item['machine_tool_H'],
|
||||||
"feed_speed": item['feed_speed'],
|
"feed_speed": item['feed_speed'],
|
||||||
"tool_speed": item['tool_speed'],
|
"tool_speed": item['tool_speed'],
|
||||||
"distance": item['distance'],
|
"distance_min": item['distance_min'],
|
||||||
|
"distance_max": item['distance_max'],
|
||||||
"taper": item['taper'],
|
"taper": item['taper'],
|
||||||
"torque": item['torque'],
|
"torque": item['torque'],
|
||||||
"motor_power": item['motor_power'],
|
"motor_power": item['motor_power'],
|
||||||
"tool_quality_max": item['tool_quality_max'],
|
"tool_quality_max": item['tool_quality_max'],
|
||||||
"tool_long_max": item['tool_long_max'],
|
"tool_long_max": item['tool_long_max'],
|
||||||
"tool_diameter_max": item['tool_diameter_max'],
|
"tool_diameter_max": item['tool_diameter_max'],
|
||||||
|
"tool_diameter_min": item['tool_diameter_min'],
|
||||||
"machine_tool_category": self.env['sf.machine_tool.category'].search(
|
"machine_tool_category": self.env['sf.machine_tool.category'].search(
|
||||||
[('code', '=', item['machine_tool_category'])]).id,
|
[('code', '=', item['machine_tool_category'])]).id,
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,59 @@ class FunctionalCuttingToolEntity(models.Model):
|
|||||||
return [(6, 0, functional_tool_model_ids)]
|
return [(6, 0, functional_tool_model_ids)]
|
||||||
|
|
||||||
|
|
||||||
|
class FunctionalCuttingToolEntityCache(models.Model):
|
||||||
|
_name = 'sf.functional.cutting.tool.entity.cache'
|
||||||
|
_description = '功能刀具列表缓存'
|
||||||
|
|
||||||
|
code = fields.Char('编码')
|
||||||
|
name = fields.Char('名称')
|
||||||
|
mrs_cutting_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型')
|
||||||
|
mrs_cutting_tool_model_id = fields.Many2one('sf.cutting.tool.model', string='刀具型号')
|
||||||
|
|
||||||
|
# 整体式刀具型号
|
||||||
|
mrs_cutting_tool_integral_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||||
|
'sf_functional_cutting_tool_entity_cache_id',
|
||||||
|
string='整体式刀具型号', domain=
|
||||||
|
[('mrs_cutting_tool_material_name', '=', '整体式刀具')])
|
||||||
|
# 刀片型号
|
||||||
|
mrs_cutting_tool_blade_model_ids = fields.Many2many('sf.cutting.tool.model', 'sf_functional_cutting_tool_entity_cache_id',
|
||||||
|
string='刀片型号', domain=
|
||||||
|
[('mrs_cutting_tool_material_name', '=', '刀片')])
|
||||||
|
# 刀杆型号
|
||||||
|
mrs_cutting_tool_cutterbar_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||||
|
'sf_functional_cutting_tool_entity_cache_id',
|
||||||
|
string='刀杆型号', domain=
|
||||||
|
[('mrs_cutting_tool_material_name', '=', '刀杆')])
|
||||||
|
# 刀盘型号
|
||||||
|
mrs_cutting_tool_cutterpad_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||||
|
'sf_functional_cutting_tool_entity_cache_id',
|
||||||
|
string='刀盘型号', domain=
|
||||||
|
[('mrs_cutting_tool_material_name', '=', '刀盘')])
|
||||||
|
# 刀柄型号
|
||||||
|
mrs_cutting_tool_cutterhandle_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||||
|
'sf_functional_cutting_tool_entity_cache_id',
|
||||||
|
string='刀柄型号', domain=
|
||||||
|
[('mrs_cutting_tool_material_name', '=', '刀柄')])
|
||||||
|
# 夹头型号
|
||||||
|
mrs_cutting_tool_cutterhead_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||||
|
'sf_functional_cutting_tool_entity_cache_id',
|
||||||
|
string='夹头型号', domain=
|
||||||
|
[('mrs_cutting_tool_material_name', '=', '夹头')])
|
||||||
|
|
||||||
|
diameter = fields.Float('直径(mm)')
|
||||||
|
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
||||||
|
string='刀具等级')
|
||||||
|
machining_accuracy = fields.Float('加工精度(mm)')
|
||||||
|
tool_length = fields.Float('装刀长')
|
||||||
|
blade_number = fields.Integer('刃数')
|
||||||
|
integral_blade_length = fields.Float('整体刃长(mm)')
|
||||||
|
effective_blade_length = fields.Float('有效刃长(mm)')
|
||||||
|
max_life = fields.Float('最大寿命值')
|
||||||
|
is_standard = fields.Boolean('是否标准刀')
|
||||||
|
applicable_range = fields.Char('适用范围')
|
||||||
|
image = fields.Binary('图片')
|
||||||
|
|
||||||
|
|
||||||
class FunctionalToolWarning(models.Model):
|
class FunctionalToolWarning(models.Model):
|
||||||
_name = 'sf.functional.tool.warning'
|
_name = 'sf.functional.tool.warning'
|
||||||
_description = '功能刀具预警'
|
_description = '功能刀具预警'
|
||||||
@@ -591,9 +644,59 @@ class FunctionalToolAssembly(models.Model):
|
|||||||
取消功能刀具组装
|
取消功能刀具组装
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
|
if self.new_former == '0':
|
||||||
|
# 如果是新刀,则删除功能刀具列表、
|
||||||
|
self.env['sf.functional.cutting.tool.entity'].search([
|
||||||
|
('code', '=', self.functional_tool_code)]).unlink()
|
||||||
|
else:
|
||||||
|
# 获取功能刀具缓存信息
|
||||||
|
record = self.env['sf.functional.cutting.tool.entity.cache'].search([
|
||||||
|
('code', '=', self.functional_tool_code)], limit=1)
|
||||||
|
# 删除现有功能刀具列表记录
|
||||||
|
self.env['sf.functional.cutting.tool.entity'].search([
|
||||||
|
('code', '=', self.functional_tool_code)]).unlink()
|
||||||
|
# 创建新的功能刀具列表信息
|
||||||
|
self.env['sf.functional.cutting.tool.entity'].create({
|
||||||
|
'code': record.code,
|
||||||
|
'name': record.name,
|
||||||
|
'mrs_cutting_tool_type_id': record.mrs_cutting_tool_type_id.id,
|
||||||
|
'mrs_cutting_tool_model_id': record.mrs_cutting_tool_model_id.id,
|
||||||
|
'mrs_cutting_tool_integral_model_ids': record.mrs_cutting_tool_integral_model_ids.ids,
|
||||||
|
'mrs_cutting_tool_blade_model_ids': record.mrs_cutting_tool_blade_model_ids.ids,
|
||||||
|
'mrs_cutting_tool_cutterbar_model_ids': record.mrs_cutting_tool_cutterbar_model_ids.ids,
|
||||||
|
'mrs_cutting_tool_cutterpad_model_ids': record.mrs_cutting_tool_cutterpad_model_ids.ids,
|
||||||
|
'mrs_cutting_tool_cutterhandle_model_ids': record.mrs_cutting_tool_cutterhandle_model_ids.ids,
|
||||||
|
'mrs_cutting_tool_cutterhead_model_ids': record.mrs_cutting_tool_cutterhead_model_ids.ids,
|
||||||
|
'diameter': record.diameter,
|
||||||
|
'tool_grade': record.tool_grade,
|
||||||
|
'machining_accuracy': record.machining_accuracy,
|
||||||
|
'tool_length': record.tool_length,
|
||||||
|
'blade_number': record.blade_number,
|
||||||
|
'integral_blade_length': record.integral_blade_length,
|
||||||
|
'effective_blade_length': record.effective_blade_length,
|
||||||
|
'max_life': record.max_life,
|
||||||
|
'is_standard': record.is_standard,
|
||||||
|
'applicable_range': record.applicable_range,
|
||||||
|
'image': record.image,
|
||||||
|
})
|
||||||
|
# 删除缓存信息
|
||||||
|
self.env['sf.functional.cutting.tool.entity.cache'].search([
|
||||||
|
('code', '=', self.functional_tool_code)]).unlink()
|
||||||
|
|
||||||
|
|
||||||
|
# # 删除功能刀具预警、实时分布、出入库记录的新记录
|
||||||
|
# self.env['sf.functional.tool.warning'].search([
|
||||||
|
# ('code', '=', self.functional_tool_code)]).unlink()
|
||||||
|
# self.env['sf.real.time.distribution.of.functional.tools'].search([
|
||||||
|
# ('code', '=', self.functional_tool_code)]).unlink()
|
||||||
|
# self.env['sf.inbound.and.outbound.records.of.functional.tools'].search([
|
||||||
|
# ('code', '=', self.functional_tool_code)]).unlink()
|
||||||
|
|
||||||
|
# 修改功能刀具组装的组装信息
|
||||||
self.env['sf.functional.tool.assembly'].search([
|
self.env['sf.functional.tool.assembly'].search([
|
||||||
('machine_tool_name_id', '=', self.machine_tool_name_id.id),
|
('machine_tool_name_id', '=', self.machine_tool_name_id.id),
|
||||||
('cutter_spacing_code', '=', self.cutter_spacing_code)
|
('cutter_spacing_code', '=', self.cutter_spacing_code),
|
||||||
|
('assemble_status', '=', '1')
|
||||||
]).write({
|
]).write({
|
||||||
'mrs_cutting_tool_integral_model_ids': None,
|
'mrs_cutting_tool_integral_model_ids': None,
|
||||||
'integral_code': None,
|
'integral_code': None,
|
||||||
@@ -643,24 +746,22 @@ class FunctionalToolAssembly(models.Model):
|
|||||||
if vals:
|
if vals:
|
||||||
for val in vals:
|
for val in vals:
|
||||||
self.env['sf.delivery.of.cargo.from.storage'].create({
|
self.env['sf.delivery.of.cargo.from.storage'].create({
|
||||||
'functional_tool_code': val.functional_tool_code,
|
'functional_tool_code': val.functional_tool_code,
|
||||||
'name': val.name.id,
|
'name': val.name.id,
|
||||||
'functional_tool_type_id': val.functional_tool_type_id.id,
|
'functional_tool_type_id': val.functional_tool_type_id.id,
|
||||||
'production_line_name_id': val.production_line_name_id.id,
|
'production_line_name_id': val.production_line_name_id.id,
|
||||||
'machine_tool_code': val.machine_tool_code,
|
'machine_tool_code': val.machine_tool_code,
|
||||||
'receive_person': val.receive_person,
|
'receive_person': val.receive_person,
|
||||||
'receive_time': val.receive_time
|
'receive_time': val.receive_time})
|
||||||
})
|
|
||||||
else:
|
else:
|
||||||
self.env['sf.delivery.of.cargo.from.storage'].create({
|
self.env['sf.delivery.of.cargo.from.storage'].create({
|
||||||
'functional_tool_code': self.functional_tool_code,
|
'functional_tool_code': self.functional_tool_code,
|
||||||
'name': self.name.id,
|
'name': self.name.id,
|
||||||
'functional_tool_type_id': self.functional_tool_type_id.id,
|
'functional_tool_type_id': self.functional_tool_type_id.id,
|
||||||
'production_line_name_id': self.production_line_name_id.id,
|
'production_line_name_id': self.production_line_name_id.id,
|
||||||
'machine_tool_code': self.machine_tool_code,
|
'machine_tool_code': self.machine_tool_code,
|
||||||
'receive_person': self.receive_person,
|
'receive_person': self.receive_person,
|
||||||
'receive_time': self.receive_time
|
'receive_time': self.receive_time})
|
||||||
})
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'type': 'ir.actions.act_window',
|
'type': 'ir.actions.act_window',
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
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_sf_functional_cutting_tool_entity,sf.functional.cutting.tool.entity,model_sf_functional_cutting_tool_entity,base.group_user,1,1,1,1
|
access_sf_functional_cutting_tool_entity,sf.functional.cutting.tool.entity,model_sf_functional_cutting_tool_entity,base.group_user,1,1,1,1
|
||||||
access_sf.functional.tool.warning,sf.functional.tool.warning,model_sf_functional_tool_warning,base.group_user,1,0,1,0
|
access_sf_functional_cutting_tool_entity_cache,sf.functional.cutting.tool.entity.cache,model_sf_functional_cutting_tool_entity_cache,base.group_user,1,1,1,1
|
||||||
access_sf.real.time.distribution.of.functional.tools,sf.real.time.distribution.of.functional.tools,model_sf_real_time_distribution_of_functional_tools,base.group_user,1,0,1,0
|
access_sf.functional.tool.warning,sf.functional.tool.warning,model_sf_functional_tool_warning,base.group_user,1,1,1,1
|
||||||
access_sf.inbound.and.outbound.records.of.functional.tools,sf.inbound.and.outbound.records.of.functional.tools,model_sf_inbound_and_outbound_records_of_functional_tools,base.group_user,1,0,1,0
|
access_sf.real.time.distribution.of.functional.tools,sf.real.time.distribution.of.functional.tools,model_sf_real_time_distribution_of_functional_tools,base.group_user,1,1,1,1
|
||||||
|
access_sf.inbound.and.outbound.records.of.functional.tools,sf.inbound.and.outbound.records.of.functional.tools,model_sf_inbound_and_outbound_records_of_functional_tools,base.group_user,1,1,1,1
|
||||||
|
|
||||||
access_sf_cam_work_order_program_knife_plan,sf.cam.work.order.program.knife.plan,model_sf_cam_work_order_program_knife_plan,base.group_user,1,1,1,1
|
access_sf_cam_work_order_program_knife_plan,sf.cam.work.order.program.knife.plan,model_sf_cam_work_order_program_knife_plan,base.group_user,1,1,1,1
|
||||||
access_sf_machine_table_tool_changing_apply,sf.machine.table.tool.changing.apply,model_sf_machine_table_tool_changing_apply,base.group_user,1,1,1,1
|
access_sf_machine_table_tool_changing_apply,sf.machine.table.tool.changing.apply,model_sf_machine_table_tool_changing_apply,base.group_user,1,1,1,1
|
||||||
|
|||||||
|
@@ -176,10 +176,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
|||||||
功能刀具组装
|
功能刀具组装
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
self.env['sf.functional.tool.assembly'].search([
|
desc_1 = {
|
||||||
('machine_tool_name_id', '=', self.machine_tool_name_id.id),
|
|
||||||
('cutter_spacing_code', '=', self.cutter_spacing_code)
|
|
||||||
]).write({
|
|
||||||
'mrs_cutting_tool_integral_model_ids': self.mrs_cutting_tool_integral_model_ids.ids,
|
'mrs_cutting_tool_integral_model_ids': self.mrs_cutting_tool_integral_model_ids.ids,
|
||||||
'integral_code': self.integral_code,
|
'integral_code': self.integral_code,
|
||||||
'integral_name': self.integral_name,
|
'integral_name': self.integral_name,
|
||||||
@@ -214,10 +211,15 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
|||||||
'assemble_status': '1',
|
'assemble_status': '1',
|
||||||
'tool_loading_person': self.env.user.name,
|
'tool_loading_person': self.env.user.name,
|
||||||
'tool_loading_time': fields.Datetime.now()
|
'tool_loading_time': fields.Datetime.now()
|
||||||
})
|
}
|
||||||
|
self.env['sf.functional.tool.assembly'].search([
|
||||||
|
('machine_tool_name_id', '=', self.machine_tool_name_id.id),
|
||||||
|
('cutter_spacing_code', '=', self.cutter_spacing_code),
|
||||||
|
('assemble_status', '=', '0'),
|
||||||
|
]).write(desc_1)
|
||||||
|
|
||||||
# 封装功能刀具数据
|
# 封装功能刀具数据
|
||||||
desc = {
|
desc_2 = {
|
||||||
'code': self.code,
|
'code': self.code,
|
||||||
'name': self.functional_tool_name_id.name,
|
'name': self.functional_tool_name_id.name,
|
||||||
'mrs_cutting_tool_type_id': self.functional_tool_type_id.id,
|
'mrs_cutting_tool_type_id': self.functional_tool_type_id.id,
|
||||||
@@ -239,14 +241,43 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
|||||||
'applicable_range': None,
|
'applicable_range': None,
|
||||||
'image': None,
|
'image': None,
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.new_former == '0':
|
if self.new_former == '0':
|
||||||
# 如果是新刀,则创建功能刀具列表、
|
# 如果是新刀,则创建功能刀具列表、
|
||||||
self.env['sf.functional.cutting.tool.entity'].create(desc)
|
self.env['sf.functional.cutting.tool.entity'].create(desc_2)
|
||||||
# 创建功能刀具预警、实时分布、出入库记录的新记录
|
else:
|
||||||
self.env['sf.functional.tool.warning'].create(desc)
|
record = self.env['sf.functional.cutting.tool.entity'].search([('code', '=', self.code)])
|
||||||
self.env['sf.real.time.distribution.of.functional.tools'].create(desc)
|
# 创建功能刀具缓存信息
|
||||||
self.env['sf.inbound.and.outbound.records.of.functional.tools'].create(desc)
|
self.env['sf.functional.cutting.tool.entity.cache'].create({
|
||||||
|
'code': record.code,
|
||||||
|
'name': record.name,
|
||||||
|
'mrs_cutting_tool_type_id': record.mrs_cutting_tool_type_id.id,
|
||||||
|
'mrs_cutting_tool_model_id': record.mrs_cutting_tool_model_id.id,
|
||||||
|
'mrs_cutting_tool_integral_model_ids': record.mrs_cutting_tool_integral_model_ids.ids,
|
||||||
|
'mrs_cutting_tool_blade_model_ids': record.mrs_cutting_tool_blade_model_ids.ids,
|
||||||
|
'mrs_cutting_tool_cutterbar_model_ids': record.mrs_cutting_tool_cutterbar_model_ids.ids,
|
||||||
|
'mrs_cutting_tool_cutterpad_model_ids': record.mrs_cutting_tool_cutterpad_model_ids.ids,
|
||||||
|
'mrs_cutting_tool_cutterhandle_model_ids': record.mrs_cutting_tool_cutterhandle_model_ids.ids,
|
||||||
|
'mrs_cutting_tool_cutterhead_model_ids': record.mrs_cutting_tool_cutterhead_model_ids.ids,
|
||||||
|
'diameter': record.diameter,
|
||||||
|
'tool_grade': record.tool_grade,
|
||||||
|
'machining_accuracy': record.machining_accuracy,
|
||||||
|
'tool_length': record.tool_length,
|
||||||
|
'blade_number': record.blade_number,
|
||||||
|
'integral_blade_length': record.integral_blade_length,
|
||||||
|
'effective_blade_length': record.effective_blade_length,
|
||||||
|
'max_life': record.max_life,
|
||||||
|
'is_standard': record.is_standard,
|
||||||
|
'applicable_range': record.applicable_range,
|
||||||
|
'image': record.image,
|
||||||
|
})
|
||||||
|
# 删除功能刀具列表信息
|
||||||
|
self.env['sf.functional.cutting.tool.entity'].search([('code', '=', self.code)]).unlink()
|
||||||
|
# 创建功能刀具列表信息
|
||||||
|
self.env['sf.functional.cutting.tool.entity'].search([('code', '=', self.code)]).create(desc_2)
|
||||||
|
# # 创建功能刀具预警、实时分布、出入库记录的新记录
|
||||||
|
# self.env['sf.functional.tool.warning'].create(desc)
|
||||||
|
# self.env['sf.real.time.distribution.of.functional.tools'].create(desc)
|
||||||
|
# self.env['sf.inbound.and.outbound.records.of.functional.tools'].create(desc)
|
||||||
|
|
||||||
# 关闭弹出窗口
|
# 关闭弹出窗口
|
||||||
return {'type': 'ir.actions.act_window_close'}
|
return {'type': 'ir.actions.act_window_close'}
|
||||||
@@ -271,29 +302,30 @@ class DeliveryOfCargoFromStorage(models.TransientModel):
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
vals = self.env['sf.delivery.of.cargo.from.storage'].search([])
|
vals = self.env['sf.delivery.of.cargo.from.storage'].search([])
|
||||||
print(vals)
|
|
||||||
if vals:
|
if vals:
|
||||||
for val in vals:
|
for val in vals:
|
||||||
self.env['sf.functional.tool.assembly'].search([
|
# 删除功能刀具列表缓存的数据
|
||||||
('functional_tool_code', '=', val.functional_tool_code),
|
self.env['sf.functional.cutting.tool.entity.cache'].search([
|
||||||
('machine_tool_code', '=', val.machine_tool_code),
|
('code', '=', self.functional_tool_code)]).unlink()
|
||||||
('name', '=', val.name.id),
|
|
||||||
('production_line_name_id', '=', val.production_line_name_id.id)
|
|
||||||
]).write({
|
|
||||||
'assemble_status': '2',
|
|
||||||
'receive_person': self.env.user.name,
|
|
||||||
'receive_time': fields.Datetime.now()
|
|
||||||
})
|
|
||||||
|
|
||||||
tool_assembly = self.env['sf.functional.tool.assembly'].search([
|
record = self.env['sf.functional.tool.assembly'].search([
|
||||||
('functional_tool_code', '=', val.functional_tool_code),
|
('functional_tool_code', '=', val.functional_tool_code),
|
||||||
('name', '=', val.name.id)
|
('assemble_status', '=', '1')
|
||||||
])
|
])
|
||||||
# 判断装刀任务来源,如果来源于CAM装刀,则修改CAM装刀的计划执行状态
|
# 判断装刀任务来源,如果来源于CAM装刀,则修改CAM装刀的计划执行状态
|
||||||
if tool_assembly.loading_task_source == '0':
|
if record.loading_task_source == '0':
|
||||||
self.env['sf.cam.work.order.program.knife.plan'].search([
|
self.env['sf.cam.work.order.program.knife.plan'].search([
|
||||||
('functional_tool_code', '=', val.functional_tool_code),
|
('functional_tool_code', '=', val.functional_tool_code),
|
||||||
('functional_tool_name_id', '=', val.name.id)
|
('functional_tool_name_id', '=', val.name.id)
|
||||||
]).write({
|
]).write({
|
||||||
'plan_execute_status': '2'
|
'plan_execute_status': '2'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
record.write({
|
||||||
|
'assemble_status': '2',
|
||||||
|
'receive_person': self.env.user.name,
|
||||||
|
'receive_time': fields.Datetime.now()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -189,7 +189,8 @@
|
|||||||
<group string="组装物料信息">
|
<group string="组装物料信息">
|
||||||
<group>
|
<group>
|
||||||
<field name="integral_code"/>
|
<field name="integral_code"/>
|
||||||
<field name="mrs_cutting_tool_integral_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
<field name="mrs_cutting_tool_integral_model_ids" options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags" placeholder="选择整体式刀具型号"/>
|
||||||
<field name="blade_code"/>
|
<field name="blade_code"/>
|
||||||
<field name="mrs_cutting_tool_blade_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
<field name="mrs_cutting_tool_blade_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
||||||
<field name="bar_code"/>
|
<field name="bar_code"/>
|
||||||
|
|||||||
@@ -466,6 +466,7 @@ tour.register('test_receipt_reserved_1', {test: true}, [
|
|||||||
trigger: '.o_field_widget[name="product_id"]',
|
trigger: '.o_field_widget[name="product_id"]',
|
||||||
run: function() {
|
run: function() {
|
||||||
helper.assertFormLocationDest('WH/Stock');
|
helper.assertFormLocationDest('WH/Stock');
|
||||||
|
console.log('123')
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
...tour.stepUtils.discardBarcodeForm(),
|
...tour.stepUtils.discardBarcodeForm(),
|
||||||
|
|||||||
Reference in New Issue
Block a user