diff --git a/sf_base/__manifest__.py b/sf_base/__manifest__.py index 6f05a4a5..d6f8a88a 100644 --- a/sf_base/__manifest__.py +++ b/sf_base/__manifest__.py @@ -18,8 +18,6 @@ 'views/common_view.xml', 'views/fixture_view.xml', 'views/functional_fixture_view.xml', - 'wizard/workpiece_clamping_wizard_view.xml', - 'wizard/stock_removal_wizard_view.xml', 'views/menu_view.xml', "views/tool_views.xml", "views/tool_menu.xml", diff --git a/sf_base/models/fixture.py b/sf_base/models/fixture.py index 033ac181..fa0972bf 100644 --- a/sf_base/models/fixture.py +++ b/sf_base/models/fixture.py @@ -32,21 +32,18 @@ class FixtureModel(models.Model): clamping_way = fields.Char(string="装夹方式") port_type = fields.Char(string="接口类型") model_file = fields.Binary(string="3D模型图") - length = fields.Char(string="长度[mm]") - width = fields.Char(string="宽度[mm]") - height = fields.Char(string="高度[mm]") - weight = fields.Char(string="重量[kg]") - clamp_workpiece_length_max = fields.Char(string="夹持工件长度MAX[mm]") - clamp_workpiece_width_max = fields.Char(string="夹持工件宽度MAX[mm]") - clamp_workpiece_height_max = fields.Char(string="夹持工件高度MAX[mm]") - clamp_workpiece_diameter_max = fields.Char(string="夹持工件直径MAX[mm]") - maximum_carrying_weight = fields.Char(string="最大承载重量[kg]") - maximum_clamping_force = fields.Char(string="最大夹持力[n]") + length = fields.Char(string="长度[mm]", size=6) + width = fields.Char(string="宽度[mm]", size=6) + height = fields.Char(string="高度[mm]", size=6) + weight = fields.Char(string="重量[kg]", size=4) + clamp_workpiece_length_max = fields.Char(string="夹持工件长度MAX[mm]", size=6) + clamp_workpiece_width_max = fields.Char(string="夹持工件宽度MAX[mm]", size=6) + clamp_workpiece_height_max = fields.Char(string="夹持工件高度MAX[mm]", size=6) + clamp_workpiece_diameter_max = fields.Char(string="夹持工件直径MAX[mm]", size=6) + maximum_carrying_weight = fields.Char(string="最大承载重量[kg]", size=4) + maximum_clamping_force = fields.Char(string="最大夹持力[n]", size=8) materials_model_id = fields.Many2one('sf.materials.model', string="材料型号") driving_way = fields.Char(string="驱动方式") - apply_machine_tool_type = fields.Char(string="适用机床型号") + apply_machine_tool_type_id = fields.Many2one('sf.machine_tool.type', string="适用机床型号") through_hole_size = fields.Integer(string="过孔大小[mm]", size=6) screw_size = fields.Integer(string="螺牙大小[mm]", size=6) - - - diff --git a/sf_base/security/ir.model.access.csv b/sf_base/security/ir.model.access.csv index 16f639b7..8fd172b6 100644 --- a/sf_base/security/ir.model.access.csv +++ b/sf_base/security/ir.model.access.csv @@ -24,8 +24,6 @@ access_sf_multi_mounting_type,sf_multi_mounting_type,model_sf_multi_mounting_typ access_sf_fixture_model,sf_fixture_model,model_sf_fixture_model,base.group_user,1,1,1,1 access_sf_functional_fixture_type,sf_functional_fixture_type,model_sf_functional_fixture_type,base.group_user,1,1,1,1 access_sf_functional_fixture,sf_functional_fixture,model_sf_functional_fixture,base.group_user,1,1,1,1 -access_sf_workpiece_clamping_wizard,sf_workpiece_clamping_wizard,model_sf_workpiece_clamping_wizard,base.group_user,1,1,1,1 -access_sf_stock_removal_wizard,sf_stock_removal_wizard,model_sf_stock_removal_wizard,base.group_user,1,1,1,1 diff --git a/sf_base/views/fixture_view.xml b/sf_base/views/fixture_view.xml index de9134aa..e064e102 100644 --- a/sf_base/views/fixture_view.xml +++ b/sf_base/views/fixture_view.xml @@ -239,7 +239,7 @@ attrs='{"invisible": [("fixture_material_type","!=",("转接板(锁板)托盘"))]}'/> - diff --git a/sf_base/wizard/__init__.py b/sf_base/wizard/__init__.py deleted file mode 100644 index ac69a1da..00000000 --- a/sf_base/wizard/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -*- coding: utf-8 -*- - -from . import workpiece_clamping_wizard -from . import stock_removal_wizard diff --git a/sf_base/wizard/stock_removal_wizard.py b/sf_base/wizard/stock_removal_wizard.py deleted file mode 100644 index 58d7abc7..00000000 --- a/sf_base/wizard/stock_removal_wizard.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- - -from odoo import models, fields, api, _ -from odoo.exceptions import ValidationError -import logging -_logger = logging.getLogger(__name__) - - -class StockRemovalWizard(models.Model): - _name = 'sf.stock.removal.wizard' - _description = "出库" - - code = fields.Char(string="功能夹具编码", size=25, required=True) - name = fields.Char(string="功能夹具名称", size=25, required=True) - type = fields.Char(string="功能夹具类型", required=True) - production_line = fields.Char(string="生产线", required=True) - machine_tool = fields.Many2one('sf.machine_tool', string="机床", required=True) - - def submit(self): - return 1 - diff --git a/sf_base/wizard/stock_removal_wizard_view.xml b/sf_base/wizard/stock_removal_wizard_view.xml deleted file mode 100644 index fbb7708b..00000000 --- a/sf_base/wizard/stock_removal_wizard_view.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - sf.stock.removal.wizard.form.view - sf.stock.removal.wizard - -
- - - - - - - - - - - - -
-
-
-
-
-
- - - 出库 - sf.stock.removal.wizard - form - new - -
-
\ No newline at end of file diff --git a/sf_base/wizard/workpiece_clamping_wizard.py b/sf_base/wizard/workpiece_clamping_wizard.py deleted file mode 100644 index 81489bc8..00000000 --- a/sf_base/wizard/workpiece_clamping_wizard.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- - -from odoo import models, fields, api, _ -from odoo.exceptions import ValidationError -import logging - -_logger = logging.getLogger(__name__) - - -class WorkpieceClampingWizard(models.Model): - _name = 'sf.workpiece.clamping.wizard' - _description = "工件装夹" - # 以下为坯料(工件)申请信息 - apply_code = fields.Char(string="申请坯料编码", size=25, required=True) - apply_name = fields.Char(string="申请坯料名称", size=25, required=True) - material_id = fields.Many2one('sf.production.materials', string="坯料材料", required=True) - apply_width = fields.Float(string="申请宽度", required=True) - apply_length = fields.Float(string="申请长度", required=True) - apply_height = fields.Float(string="申请高度", required=True) - apply_weight = fields.Float(string="申请重量", required=True) - apply_diameter = fields.Float(string="申请直径", required=True) - surface_accuracy = fields.Char(string="表面精度", required=True) - # 以下为坯料(工件)装夹信息 - chuck_name = fields.Char(string="卡盘名称", required=True) - chuck_brand_id = fields.Many2one('sf.machine.brand', string="卡盘品牌", required=True) - chuck_type_id = fields.Char(string="卡盘类型", required=True) - chuck_model_id = fields.Char(string="卡盘型号", required=True) - tray_name = fields.Char(string="托盘名称", required=True) - tray_brand_id = fields.Many2one('sf.machine.brand', string="托盘品牌", required=True) - tray_type_id = fields.Char(string="托盘类型", required=True) - tray_model_id = fields.Char(string="托盘型号", required=True) - real_code = fields.Char(string="真实坯料编码", size=25, required=True) - real_name = fields.Char(string="真实坯料名称", size=25, required=True) - real_width = fields.Float(string="真实宽度", required=True) - real_length = fields.Float(string="真实长度", required=True) - real_height = fields.Float(string="真实高度", required=True) - real_diameter = fields.Float(string="真实直径", required=True) - # 以下为坯料(工件)预调信息 - # hole_site = fields.Char(string="孔位", required=True) - # curve = fields.Char(string="曲线", required=True) - # straight_line = fields.Char(string="直线", required=True) - # x_axis = fields.Float(string="X轴", required=True) - # y_axis = fields.Float(string="Y轴", required=True) - # z_axis = fields.Float(string="Z轴", required=True) - # tool_radius = fields.Float(string="刀具半径", required=True) - # tool_length = fields.Float(string="刀具长度", required=True) - # tool_offset_point = fields.Float(string="刀具偏移点", required=True) - # tool_compensation_value = fields.Float(string="刀具补偿值", required=True) - # cutting_spindle_speed = fields.Float(string="切削主轴转速", required=True) - # cutting_feed_rate = fields.Float(string="切削进给速度", required=True) - # depth_of_cutting = fields.Float(string="切削深度", required=True) - # cutting_direction = fields.Char(string="切削方向", required=True) - preset_program_information = fields.Char(string="预调程序信息", required=True) - - def submit(self): - return 1 diff --git a/sf_base/wizard/workpiece_clamping_wizard_view.xml b/sf_base/wizard/workpiece_clamping_wizard_view.xml deleted file mode 100644 index 6418f5c9..00000000 --- a/sf_base/wizard/workpiece_clamping_wizard_view.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - sf.workpiece.clamping.wizard.form.view - sf.workpiece.clamping.wizard - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
-
- - - 装夹 - sf.workpiece.clamping.wizard - form - new - -
-
\ No newline at end of file diff --git a/sf_bf_connect/controllers/controllers.py b/sf_bf_connect/controllers/controllers.py index 3a48d16f..4442567e 100644 --- a/sf_bf_connect/controllers/controllers.py +++ b/sf_bf_connect/controllers/controllers.py @@ -34,12 +34,6 @@ class Sf_Bf_Connect(http.Controller): logging.info('get_bfm_process_or===================================:%s' % order_id.name) aa.default_code = kw['order_number'] logging.info('get_bfm_process_order_listaaaaaaaaaaaaaaaaaaaaaaaaaaaa================:%s' % aa.default_code) - # # 给stock.picking的default_code字段赋值 - # bb = request.env['stock.picking'].sudo().search([('origin', '=', order_id.name)]) - # logging.info('get_bfm_process_or===================================:%s' % order_id.name) - # bb.default_code = kw['order_number'] - # logging.info('get_bfm_process_order_listbbbbbbbbbbbbbbbbbbbbbbbbbbbb================:%s' % bb.default_code) - for item in bfm_process_order_list: product = request.env['product.template'].sudo().product_create(product_id, item, order_id, kw['order_number'], i) diff --git a/sf_dlm/__manifest__.py b/sf_dlm/__manifest__.py index 9a2b3150..20211cde 100644 --- a/sf_dlm/__manifest__.py +++ b/sf_dlm/__manifest__.py @@ -15,7 +15,6 @@ 'data': [ 'data/product_data.xml', 'data/uom_data.xml', - # 'data/cutting_tool_data.xml', 'views/product_template_view.xml', 'views/product_workorder.xml' ], diff --git a/sf_dlm/data/cutting_tool_data.xml b/sf_dlm/data/cutting_tool_data.xml deleted file mode 100644 index 9153306e..00000000 --- a/sf_dlm/data/cutting_tool_data.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - 刀具 - 刀具 - - - - 夹具 - 夹具 - - - - - diff --git a/sf_dlm/views/product_template_view.xml b/sf_dlm/views/product_template_view.xml index c475f529..a4a9d998 100644 --- a/sf_dlm/views/product_template_view.xml +++ b/sf_dlm/views/product_template_view.xml @@ -79,7 +79,7 @@ - + @@ -91,10 +91,9 @@ - + - /> - + @@ -123,7 +122,7 @@ - + - + @@ -160,7 +157,7 @@ attrs="{'invisible': [('cutting_tool_type', 'not in', ['刀杆','刀盘'])]}"/> - + @@ -170,7 +167,7 @@ - + @@ -185,7 +182,7 @@ - + @@ -193,7 +190,7 @@ - + @@ -206,7 +203,7 @@ - + - + - + attrs='{"invisible": ["|",("fixture_model_id", "=", False),("fixture_material_type","not in",("气动托盘","转接板(锁板)托盘","磁吸托盘","虎钳托盘","零点卡盘"))]}'>