Merge branch 'feature/库存优化' into feature/刀具优化
This commit is contained in:
@@ -22,7 +22,8 @@ class ToolMaterialsBasicParameters(models.Model):
|
|||||||
handle_diameter = fields.Float('柄部直径(mm)')
|
handle_diameter = fields.Float('柄部直径(mm)')
|
||||||
handle_length = fields.Float('柄部长度(mm)')
|
handle_length = fields.Float('柄部长度(mm)')
|
||||||
blade_tip_diameter = fields.Integer('刀尖直径(mm)')
|
blade_tip_diameter = fields.Integer('刀尖直径(mm)')
|
||||||
blade_tip_working_size = fields.Char('刀尖处理尺寸(R半径mm/倒角度)', size=20)
|
blade_tip_working_size = fields.Char('刀尖倒角度(°)', size=20)
|
||||||
|
tip_r_size = fields.Float('刀尖R角(mm)')
|
||||||
blade_tip_taper = fields.Integer('刀尖锥度(°)')
|
blade_tip_taper = fields.Integer('刀尖锥度(°)')
|
||||||
blade_diameter = fields.Float('刃部直径(mm)')
|
blade_diameter = fields.Float('刃部直径(mm)')
|
||||||
blade_length = fields.Float('刃部长度(mm)')
|
blade_length = fields.Float('刃部长度(mm)')
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ patch(barcodeGenericHandlers, "start", {
|
|||||||
"O-CMD.PAGER-FIRST": () => updatePager("first"),
|
"O-CMD.PAGER-FIRST": () => updatePager("first"),
|
||||||
"O-CMD.PAGER-LAST": () => updatePager("last"),
|
"O-CMD.PAGER-LAST": () => updatePager("last"),
|
||||||
"O-CMD.CONFIRM": () => customClickOnButton(".jikimo_button_confirm"),
|
"O-CMD.CONFIRM": () => customClickOnButton(".jikimo_button_confirm"),
|
||||||
|
"O-CMD.FLUSHED": () => customClickOnButton(".jikimo_button_flushed"),
|
||||||
};
|
};
|
||||||
|
|
||||||
barcode.bus.addEventListener("barcode_scanned", (ev) => {
|
barcode.bus.addEventListener("barcode_scanned", (ev) => {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
<field name="handle_length"/>
|
<field name="handle_length"/>
|
||||||
<field name="blade_tip_diameter"/>
|
<field name="blade_tip_diameter"/>
|
||||||
<field name="blade_tip_working_size"/>
|
<field name="blade_tip_working_size"/>
|
||||||
|
<field name="tip_r_size"/>
|
||||||
<field name="blade_tip_taper"/>
|
<field name="blade_tip_taper"/>
|
||||||
<field name="blade_diameter"/>
|
<field name="blade_diameter"/>
|
||||||
<field name="blade_length"/>
|
<field name="blade_length"/>
|
||||||
@@ -95,6 +96,7 @@
|
|||||||
<field name="handle_length"/>
|
<field name="handle_length"/>
|
||||||
<field name="blade_tip_diameter"/>
|
<field name="blade_tip_diameter"/>
|
||||||
<field name="blade_tip_working_size"/>
|
<field name="blade_tip_working_size"/>
|
||||||
|
<field name="tip_r_size"/>
|
||||||
<field name="blade_tip_taper"/>
|
<field name="blade_tip_taper"/>
|
||||||
<field name="blade_diameter"/>
|
<field name="blade_diameter"/>
|
||||||
<field name="blade_length"/>
|
<field name="blade_length"/>
|
||||||
@@ -139,6 +141,7 @@
|
|||||||
</group>
|
</group>
|
||||||
<group attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}">
|
<group attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}">
|
||||||
<field name="blade_tip_working_size"/>
|
<field name="blade_tip_working_size"/>
|
||||||
|
<field name="tip_r_size"/>
|
||||||
<field name="blade_tip_diameter" class="diameter"/>
|
<field name="blade_tip_diameter" class="diameter"/>
|
||||||
<field name="blade_tip_taper"/>
|
<field name="blade_tip_taper"/>
|
||||||
<field name="blade_helix_angle"/>
|
<field name="blade_helix_angle"/>
|
||||||
|
|||||||
@@ -222,6 +222,7 @@
|
|||||||
<field name="handle_diameter" class="diameter"/>
|
<field name="handle_diameter" class="diameter"/>
|
||||||
<field name="handle_length"/>
|
<field name="handle_length"/>
|
||||||
<field name="blade_tip_working_size" class="du"/>
|
<field name="blade_tip_working_size" class="du"/>
|
||||||
|
<field name="tip_r_size"/>
|
||||||
<field name="blade_tip_diameter" class="diameter"/>
|
<field name="blade_tip_diameter" class="diameter"/>
|
||||||
<field name="blade_tip_taper" class="du"/>
|
<field name="blade_tip_taper" class="du"/>
|
||||||
<field name="blade_helix_angle" class="du"/>
|
<field name="blade_helix_angle" class="du"/>
|
||||||
|
|||||||
@@ -191,6 +191,8 @@
|
|||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="cutting_tool_blade_tip_working_size"
|
<field name="cutting_tool_blade_tip_working_size"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||||
|
<field name="cutting_tool_blade_tip_r_size"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="cutting_tool_blade_tip_diameter" string="刀尖直径(mm)" class="diameter"
|
<field name="cutting_tool_blade_tip_diameter" string="刀尖直径(mm)" class="diameter"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="cutting_tool_blade_tip_taper" string="刀尖锥度(°)"
|
<field name="cutting_tool_blade_tip_taper" string="刀尖锥度(°)"
|
||||||
|
|||||||
@@ -90,7 +90,8 @@ class ResProductMo(models.Model):
|
|||||||
cutting_tool_coarse_medium_fine = fields.Selection([('粗', '粗'), ('中', '中'), ('精', '精')], '粗/中/精')
|
cutting_tool_coarse_medium_fine = fields.Selection([('粗', '粗'), ('中', '中'), ('精', '精')], '粗/中/精')
|
||||||
cutting_tool_run_out_accuracy_max = fields.Float('端跳精度max', digits=(6, 1))
|
cutting_tool_run_out_accuracy_max = fields.Float('端跳精度max', digits=(6, 1))
|
||||||
cutting_tool_run_out_accuracy_min = fields.Float('端跳精度min', digits=(6, 1))
|
cutting_tool_run_out_accuracy_min = fields.Float('端跳精度min', digits=(6, 1))
|
||||||
cutting_tool_blade_tip_working_size = fields.Char('刀尖处理尺寸(R半径mm/倒角)', size=20)
|
cutting_tool_blade_tip_working_size = fields.Char('刀尖倒角度(°)', size=20)
|
||||||
|
cutting_tool_blade_tip_r_size = fields.Float('刀尖R角(mm)')
|
||||||
fit_blade_shape_id = fields.Many2one('maintenance.equipment.image',
|
fit_blade_shape_id = fields.Many2one('maintenance.equipment.image',
|
||||||
'适配刀片形状', domain=[('type', '=', '刀片形状')])
|
'适配刀片形状', domain=[('type', '=', '刀片形状')])
|
||||||
suitable_machining_method_ids = fields.Many2many('maintenance.equipment.image',
|
suitable_machining_method_ids = fields.Many2many('maintenance.equipment.image',
|
||||||
@@ -236,7 +237,8 @@ class ResProductMo(models.Model):
|
|||||||
self.cutting_tool_blade_tip_diameter = self.specification_id.blade_tip_diameter
|
self.cutting_tool_blade_tip_diameter = self.specification_id.blade_tip_diameter
|
||||||
self.cutting_tool_blade_tip_taper = self.specification_id.blade_tip_taper
|
self.cutting_tool_blade_tip_taper = self.specification_id.blade_tip_taper
|
||||||
self.cutting_tool_blade_helix_angle = self.specification_id.blade_helix_angle
|
self.cutting_tool_blade_helix_angle = self.specification_id.blade_helix_angle
|
||||||
self.cutting_tool_blade_tip_working_size = self.specification_id.blade_tip_working_size
|
self.cutting_tool_blade_tip_working_size = self.specification_id.tip_r_size
|
||||||
|
self.cutting_tool_blade_tip_r_size = self.specification_id.blade_tip_working_size
|
||||||
self.cutting_tool_pitch = self.specification_id.pitch
|
self.cutting_tool_pitch = self.specification_id.pitch
|
||||||
self.cutting_tool_blade_width = self.specification_id.blade_width
|
self.cutting_tool_blade_width = self.specification_id.blade_width
|
||||||
self.cutting_tool_blade_depth = self.specification_id.blade_depth
|
self.cutting_tool_blade_depth = self.specification_id.blade_depth
|
||||||
|
|||||||
@@ -2438,6 +2438,7 @@ class CuttingToolBasicParameters(models.Model):
|
|||||||
'handle_length': integral_tool_item['shank_length'],
|
'handle_length': integral_tool_item['shank_length'],
|
||||||
'blade_tip_diameter': integral_tool_item['tip_diameter'],
|
'blade_tip_diameter': integral_tool_item['tip_diameter'],
|
||||||
'blade_tip_working_size': integral_tool_item['tip_handling_size'],
|
'blade_tip_working_size': integral_tool_item['tip_handling_size'],
|
||||||
|
'tip_r_size': integral_tool_item['tip_r_size'],
|
||||||
'blade_tip_taper': integral_tool_item['knife_tip_taper'],
|
'blade_tip_taper': integral_tool_item['knife_tip_taper'],
|
||||||
'blade_helix_angle': integral_tool_item['blade_helix_angle'],
|
'blade_helix_angle': integral_tool_item['blade_helix_angle'],
|
||||||
'blade_width': integral_tool_item['blade_width'],
|
'blade_width': integral_tool_item['blade_width'],
|
||||||
@@ -2459,6 +2460,7 @@ class CuttingToolBasicParameters(models.Model):
|
|||||||
'handle_length': integral_tool_item['shank_length'],
|
'handle_length': integral_tool_item['shank_length'],
|
||||||
'blade_tip_diameter': integral_tool_item['tip_diameter'],
|
'blade_tip_diameter': integral_tool_item['tip_diameter'],
|
||||||
'blade_tip_working_size': integral_tool_item['tip_handling_size'],
|
'blade_tip_working_size': integral_tool_item['tip_handling_size'],
|
||||||
|
'tip_r_size': integral_tool_item['tip_r_size'],
|
||||||
'blade_tip_taper': integral_tool_item['knife_tip_taper'],
|
'blade_tip_taper': integral_tool_item['knife_tip_taper'],
|
||||||
'blade_helix_angle': integral_tool_item['blade_helix_angle'],
|
'blade_helix_angle': integral_tool_item['blade_helix_angle'],
|
||||||
'blade_width': integral_tool_item['blade_width'],
|
'blade_width': integral_tool_item['blade_width'],
|
||||||
@@ -2789,6 +2791,7 @@ class CuttingToolBasicParameters(models.Model):
|
|||||||
'handle_length': integral_tool_item['shank_length'],
|
'handle_length': integral_tool_item['shank_length'],
|
||||||
'blade_tip_diameter': integral_tool_item['tip_diameter'],
|
'blade_tip_diameter': integral_tool_item['tip_diameter'],
|
||||||
'blade_tip_working_size': integral_tool_item['tip_handling_size'],
|
'blade_tip_working_size': integral_tool_item['tip_handling_size'],
|
||||||
|
'tip_r_size': integral_tool_item['tip_r_size'],
|
||||||
'blade_tip_taper': integral_tool_item['knife_tip_taper'],
|
'blade_tip_taper': integral_tool_item['knife_tip_taper'],
|
||||||
'blade_helix_angle': integral_tool_item['blade_helix_angle'],
|
'blade_helix_angle': integral_tool_item['blade_helix_angle'],
|
||||||
'blade_width': integral_tool_item['blade_width'],
|
'blade_width': integral_tool_item['blade_width'],
|
||||||
@@ -2810,6 +2813,7 @@ class CuttingToolBasicParameters(models.Model):
|
|||||||
'handle_length': integral_tool_item['shank_length'],
|
'handle_length': integral_tool_item['shank_length'],
|
||||||
'blade_tip_diameter': integral_tool_item['tip_diameter'],
|
'blade_tip_diameter': integral_tool_item['tip_diameter'],
|
||||||
'blade_tip_working_size': integral_tool_item['tip_handling_size'],
|
'blade_tip_working_size': integral_tool_item['tip_handling_size'],
|
||||||
|
'tip_r_size': integral_tool_item['tip_r_size'],
|
||||||
'blade_tip_taper': integral_tool_item['knife_tip_taper'],
|
'blade_tip_taper': integral_tool_item['knife_tip_taper'],
|
||||||
'blade_helix_angle': integral_tool_item['blade_helix_angle'],
|
'blade_helix_angle': integral_tool_item['blade_helix_angle'],
|
||||||
'blade_width': integral_tool_item['blade_width'],
|
'blade_width': integral_tool_item['blade_width'],
|
||||||
|
|||||||
@@ -357,6 +357,8 @@ class FunctionalToolAssembly(models.Model):
|
|||||||
"""
|
"""
|
||||||
智能工厂组装单处扫码校验刀具物料
|
智能工厂组装单处扫码校验刀具物料
|
||||||
"""
|
"""
|
||||||
|
if 'O-CMD' in barcode:
|
||||||
|
return ''
|
||||||
for record in self:
|
for record in self:
|
||||||
tool_assembly_id = self.env['sf.functional.tool.assembly'].browse(self.ids)
|
tool_assembly_id = self.env['sf.functional.tool.assembly'].browse(self.ids)
|
||||||
lot_ids = self.env['stock.lot'].sudo().search([('rfid', '=', barcode)])
|
lot_ids = self.env['stock.lot'].sudo().search([('rfid', '=', barcode)])
|
||||||
@@ -835,7 +837,7 @@ class FunctionalToolAssembly(models.Model):
|
|||||||
|
|
||||||
if options == '刀柄+整体式刀具':
|
if options == '刀柄+整体式刀具':
|
||||||
if not integral_ids:
|
if not integral_ids:
|
||||||
raise ValidationError('功能刀具清单的BOM未配置[刀柄]信息,请先配置BOM再开始组装!')
|
raise ValidationError('功能刀具清单的BOM未配置[整体式刀具]信息,请先配置BOM再开始组装!')
|
||||||
return {'options': options, 'handle_ids': handle_ids, 'integral_ids': integral_ids}
|
return {'options': options, 'handle_ids': handle_ids, 'integral_ids': integral_ids}
|
||||||
elif options == '刀柄+刀杆+刀片':
|
elif options == '刀柄+刀杆+刀片':
|
||||||
if not blade_ids:
|
if not blade_ids:
|
||||||
|
|||||||
@@ -298,8 +298,8 @@ class SfShelfLocationLot(models.Model):
|
|||||||
brand_id = fields.Many2one('sf.machine.brand', '品牌', related='product_id.brand_id')
|
brand_id = fields.Many2one('sf.machine.brand', '品牌', related='product_id.brand_id')
|
||||||
|
|
||||||
cutting_tool_blade_diameter = fields.Float('刃部直径(mm)', related='product_id.cutting_tool_blade_diameter')
|
cutting_tool_blade_diameter = fields.Float('刃部直径(mm)', related='product_id.cutting_tool_blade_diameter')
|
||||||
cutting_tool_blade_tip_working_size = fields.Char('刀尖R角(mm)',
|
cutting_tool_blade_tip_working_size = fields.Float('刀尖R角(mm)',
|
||||||
related='product_id.cutting_tool_blade_tip_working_size')
|
related='product_id.cutting_tool_blade_tip_r_size')
|
||||||
cutting_tool_blade_radius = fields.Char('刀尖圆弧半径(mm)',
|
cutting_tool_blade_radius = fields.Char('刀尖圆弧半径(mm)',
|
||||||
related='product_id.cutting_tool_blade_tip_circular_arc_radius')
|
related='product_id.cutting_tool_blade_tip_circular_arc_radius')
|
||||||
cutting_tool_cutter_arbor_diameter = fields.Float('刀杆直径(mm)',
|
cutting_tool_cutter_arbor_diameter = fields.Float('刀杆直径(mm)',
|
||||||
|
|||||||
@@ -18,8 +18,7 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree create="0" export_xlsx="0" delete="0">
|
<tree create="0" export_xlsx="0" delete="0">
|
||||||
<header>
|
<header>
|
||||||
<button string="确认" name="set_tool_material" type="object"
|
<button string="确认" name="set_tool_material" type="object" class="treeHeaderBtn"/>
|
||||||
class="treeHeaderBtn"/>
|
|
||||||
</header>
|
</header>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="cutting_tool_type_id"/>
|
<field name="cutting_tool_type_id"/>
|
||||||
@@ -62,6 +61,7 @@
|
|||||||
<field name="brand_id"/>
|
<field name="brand_id"/>
|
||||||
<field name="shelf_location_id"/>
|
<field name="shelf_location_id"/>
|
||||||
<field name="lot_id"/>
|
<field name="lot_id"/>
|
||||||
|
<field name="qty"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -86,6 +86,7 @@
|
|||||||
<field name="brand_id"/>
|
<field name="brand_id"/>
|
||||||
<field name="shelf_location_id"/>
|
<field name="shelf_location_id"/>
|
||||||
<field name="lot_id"/>
|
<field name="lot_id"/>
|
||||||
|
<field name="qty"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -111,6 +112,7 @@
|
|||||||
<field name="brand_id"/>
|
<field name="brand_id"/>
|
||||||
<field name="shelf_location_id"/>
|
<field name="shelf_location_id"/>
|
||||||
<field name="lot_id"/>
|
<field name="lot_id"/>
|
||||||
|
<field name="qty"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -135,6 +137,7 @@
|
|||||||
<field name="brand_id"/>
|
<field name="brand_id"/>
|
||||||
<field name="shelf_location_id"/>
|
<field name="shelf_location_id"/>
|
||||||
<field name="lot_id"/>
|
<field name="lot_id"/>
|
||||||
|
<field name="qty"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -478,9 +478,9 @@
|
|||||||
class="btn-primary"/>
|
class="btn-primary"/>
|
||||||
<button string="确认组装" name="functional_tool_assembly" type="object"
|
<button string="确认组装" name="functional_tool_assembly" type="object"
|
||||||
attrs="{'invisible': [('assemble_status', 'not in', ['01'])]}"
|
attrs="{'invisible': [('assemble_status', 'not in', ['01'])]}"
|
||||||
class="btn-primary"/>
|
class="btn-primary jikimo_button_confirm"/>
|
||||||
<button name="get_tool_preset_parameter" string="获取测量值"
|
<button name="get_tool_preset_parameter" string="获取测量值"
|
||||||
type="object" class="btn-primary"
|
type="object" class="btn-primary jikimo_button_flushed"
|
||||||
attrs="{'invisible': [('assemble_status', 'in', ['0','1','2'])]}"
|
attrs="{'invisible': [('assemble_status', 'in', ['0','1','2'])]}"
|
||||||
/>
|
/>
|
||||||
<field name="assemble_status" widget="statusbar" statusbar_visible="0,01,1"/>
|
<field name="assemble_status" widget="statusbar" statusbar_visible="0,01,1"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user