diff --git a/sf_base/models/tool_other_features.py b/sf_base/models/tool_other_features.py
index e6b80a78..f67e69fd 100644
--- a/sf_base/models/tool_other_features.py
+++ b/sf_base/models/tool_other_features.py
@@ -22,7 +22,7 @@ class ToolMaterialsBasicParameters(models.Model):
handle_diameter = fields.Float('柄部直径(mm)')
handle_length = fields.Float('柄部长度(mm)')
blade_tip_diameter = fields.Integer('刀尖直径(mm)')
- blade_tip_working_size = fields.Char('刀尖处理尺寸(R半径mm/倒角)', size=20)
+ blade_tip_working_size = fields.Char('刀尖处理尺寸(R半径mm/倒角度)', size=20)
blade_tip_taper = fields.Integer('刀尖锥度(°)')
blade_diameter = fields.Float('刃部直径(mm)')
blade_length = fields.Float('刃部长度(mm)')
@@ -31,7 +31,6 @@ class ToolMaterialsBasicParameters(models.Model):
blade_depth = fields.Float('刃部深度(mm)')
pitch = fields.Float('牙距(mm)')
cutting_depth = fields.Float('切削深度(mm)')
- cutting_depth_max = fields.Float('最大切削深度(mm)')
# 刀片参数
length = fields.Float('长度(mm)')
thickness = fields.Float('厚度(mm)')
@@ -39,7 +38,7 @@ class ToolMaterialsBasicParameters(models.Model):
cutting_blade_length = fields.Float('切削刃长(mm)')
relief_angle = fields.Integer('后角(°)')
blade_tip_circular_arc_radius = fields.Char('刀尖圆弧半径(mm)', size=20)
- inscribed_circle_diameter = fields.Float('内接圆直径(mm)')
+ inscribed_circle_diameter = fields.Float('内接圆直径IC/D(mm)')
install_aperture_diameter = fields.Float('安装孔直径(mm)')
chip_breaker_groove = fields.Selection([('无', '无'), ('单面', '单面'), ('双面', '双面')],
string='有无断屑槽')
diff --git a/sf_base/views/tool_basic_param.xml b/sf_base/views/tool_basic_param.xml
index 3226df15..57a4a9a4 100644
--- a/sf_base/views/tool_basic_param.xml
+++ b/sf_base/views/tool_basic_param.xml
@@ -129,30 +129,30 @@
-
+
-
-
+
+
-
+
-
+
-
-
-
+
+
+
@@ -163,7 +163,7 @@
-
+
@@ -176,23 +176,32 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
@@ -201,21 +210,19 @@
-
-
-
+
+
+
-
-
-
+
+
-
-
+
@@ -223,18 +230,26 @@
-
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
+
@@ -242,15 +257,22 @@
-
+
-
+
-
-
+
+
+
+
+
+
+
diff --git a/sf_dlm_management/views/product_template_management_view.xml b/sf_dlm_management/views/product_template_management_view.xml
index 7ee54524..c9a794c9 100644
--- a/sf_dlm_management/views/product_template_management_view.xml
+++ b/sf_dlm_management/views/product_template_management_view.xml
@@ -147,6 +147,10 @@
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('id', '!=', False)]}"/>
+
+
(mm)
+ attrs="{'invisible': [('cutting_tool_type','not in',('刀柄'))],'readonly': [('id', '!=', False)]}"/>
+ attrs="{'invisible': [('cutting_tool_type', 'not in', ('夹头'))],'readonly': [('id', '!=', False)]}"/>
-
+
+
+
diff --git a/sf_manufacturing/models/product_template.py b/sf_manufacturing/models/product_template.py
index 862e6c8f..dcfde0c2 100644
--- a/sf_manufacturing/models/product_template.py
+++ b/sf_manufacturing/models/product_template.py
@@ -8,8 +8,8 @@ from odoo.exceptions import ValidationError
from odoo.modules import get_resource_path
-# from OCC.Extend.DataExchange import read_step_file
-# from OCC.Extend.DataExchange import write_stl_file
+from OCC.Extend.DataExchange import read_step_file
+from OCC.Extend.DataExchange import write_stl_file
class ResProductMo(models.Model):
@@ -70,7 +70,8 @@ class ResProductMo(models.Model):
cutting_tool_shank_length = fields.Float('柄部长度(mm)', digits=(6, 1))
cutting_tool_blade_length = fields.Float('刃部长度(mm)')
cutting_tool_blade_number = fields.Selection(
- [('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'), ('7', '7'), ('8', '8')], '刃数(个)')
+ [('0', '0'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'), ('7', '7'), ('8', '8')],
+ string='刃数(个)', default='0')
# 整体式刀具新增字段
cutting_tool_neck_length = fields.Float('颈部长度(mm)', digits=(6, 1))
cutting_tool_neck_diameter = fields.Float('颈部直径(mm)', digits=(6, 1))
@@ -103,9 +104,9 @@ class ResProductMo(models.Model):
compaction_way_id = fields.Many2one('maintenance.equipment.image',
'压紧方式', domain=[('type', '=', '压紧方式')])
- # @api.onchange('cutting_tool_model_id')
- # def _onchange_cutting_tool_model_id(self):
- # self.specification_id = False
+ @api.onchange('cutting_tool_model_id')
+ def _onchange_cutting_tool_model_id(self):
+ self.specification_id = False
@api.onchange('cutting_tool_material_id')
def _onchange_cutting_tool_material_id(self):
@@ -196,20 +197,24 @@ class ResProductMo(models.Model):
self.cutting_tool_blade_number = self.specification_id.blade_number
self.cutting_tool_blade_type = self.cutting_tool_model_id.blade_type
self.cutting_tool_shank_diameter = self.specification_id.handle_diameter
+ self.cutting_tool_shank_length = self.specification_id.handle_length
+ self.cutting_tool_neck_length = self.specification_id.neck_length
+ self.cutting_tool_neck_diameter = self.specification_id.neck_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_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_pitch = self.specification_id.pitch
self.cutting_tool_blade_width = self.specification_id.blade_width
self.cutting_tool_blade_depth = self.specification_id.blade_depth
- self.cutting_tool_cut_depth = self.specification_id.cutting_depth
+ self.cutting_tool_cut_depth_max = self.specification_id.cut_depth_max
self.cutting_speed_ids = self.cutting_tool_model_id.cutting_speed_ids
self.feed_per_tooth_ids = self.cutting_tool_model_id.feed_per_tooth_ids.filtered(
lambda r: int(r.blade_diameter) == int(self.specification_id.blade_diameter))
elif self.cutting_tool_type == '夹头':
self.cutting_tool_clamping_diameter_min = self.specification_id.min_clamping_diameter
- self.cutting_tool_clamping_diameter_min = self.specification_id.max_clamping_diameter
- self.cutting_tool_clamping_way = self.specification_id.clamping_mode
+ self.cutting_tool_clamping_diameter_max = self.specification_id.max_clamping_diameter
+ self.cutting_tool_taper = self.specification_id.taper
self.cutting_tool_top_diameter = self.specification_id.top_diameter
self.cutting_tool_outer_diameter = self.specification_id.outer_diameter
self.cutting_tool_inner_diameter = self.specification_id.inner_diameter
@@ -247,6 +252,7 @@ class ResProductMo(models.Model):
self.cutting_speed_ids = self.cutting_tool_model_id.cutting_speed_ids
self.feed_per_tooth_ids = self.cutting_tool_model_id.feed_per_tooth_ids
elif self.cutting_tool_type in ('刀盘', '刀杆'):
+ self.cutting_tool_blade_diameter = self.specification_id.blade_diameter
self.cutting_tool_total_length = self.specification_id.total_length
self.tool_length = self.specification_id.length
self.tool_thickness = self.specification_id.thickness
@@ -277,14 +283,19 @@ class ResProductMo(models.Model):
self.cutting_tool_cutter_head_diameter = self.specification_id.cutter_head_diameter
self.cutting_tool_interface_diameter = self.specification_id.interface_diameter
else:
+ self.cutting_tool_cutter_arbor_diameter = self.specification_id.cutter_arbor_diameter
self.cutting_tool_knife_head_height = self.specification_id.knife_head_height
self.cutting_tool_knife_head_width = self.specification_id.knife_head_width
self.cutting_tool_knife_head_length = self.specification_id.knife_head_length
self.cutting_tool_tool_shim = self.specification_id.tool_shim
self.cutting_tool_cotter_pin = self.specification_id.cotter_pin
self.cutting_tool_pressing_plate = self.specification_id.pressing_plate
+ self.cutting_tool_min_machining_aperture = self.specification_id.min_machining_aperture
+ self.cutting_tool_rear_angle = self.specification_id.relief_angle
elif self.cutting_tool_type == '刀柄':
self.cutting_tool_total_length = self.specification_id.total_length
+ self.cutting_tool_shank_diameter = self.specification_id.shank_diameter
+ self.cutting_tool_shank_length = self.specification_id.shank_length
self.cutting_tool_speed_max = self.specification_id.max_rotate_speed
self.cutting_tool_change_time = self.specification_id.tool_changing_time
self.cutting_tool_total_length = self.specification_id.total_length
@@ -301,6 +312,8 @@ class ResProductMo(models.Model):
self.cutting_tool_chuck_id = self.specification_id.chuck_id.id
self.cutting_tool_jump_accuracy = self.specification_id.diameter_slip_accuracy
self.cutting_tool_taper_shank_model = self.specification_id.taper_shank_model
+ self.cutting_tool_cooling_type = self.specification_id.cooling_model
+ self.cutting_tool_clamping_way = self.specification_id.clamping_mode
self.suitable_machining_method_ids = [(6, 0, [])] if not \
self.cutting_tool_model_id.suitable_machining_method_ids \
else [(6, 0, self.cutting_tool_model_id.suitable_machining_method_ids.ids)]
diff --git a/sf_sale/models/auto_quatotion_common.py b/sf_sale/models/auto_quatotion_common.py
index 104cd50c..4feaa7dd 100644
--- a/sf_sale/models/auto_quatotion_common.py
+++ b/sf_sale/models/auto_quatotion_common.py
@@ -2,7 +2,7 @@
import logging
from odoo.modules import get_resource_path
from odoo import fields, models, api
-# from quatotion import readSql, feature_recognize, auto_quatotion
+from quatotion import readSql, feature_recognize, auto_quatotion
__author__ = 'jinling.yang'
_logger = logging.getLogger(__name__)
diff --git a/sf_sale/models/quick_easy_order.py b/sf_sale/models/quick_easy_order.py
index ed52d9de..1ece6b86 100644
--- a/sf_sale/models/quick_easy_order.py
+++ b/sf_sale/models/quick_easy_order.py
@@ -8,8 +8,8 @@ from datetime import datetime
import requests
from odoo import http
from odoo.http import request
-# from OCC.Extend.DataExchange import read_step_file
-# from OCC.Extend.DataExchange import write_stl_file
+from OCC.Extend.DataExchange import read_step_file
+from OCC.Extend.DataExchange import write_stl_file
from odoo import models, fields, api
from odoo.modules import get_resource_path
from odoo.exceptions import ValidationError, UserError
diff --git a/sf_sale/views/sale_order_view.xml b/sf_sale/views/sale_order_view.xml
index de37ae7a..b7a1ef96 100644
--- a/sf_sale/views/sale_order_view.xml
+++ b/sf_sale/views/sale_order_view.xml
@@ -243,6 +243,10 @@
+
+
+
+