From 2321304e2a3d1eb32f59232e1bc1ff55d4fa1800 Mon Sep 17 00:00:00 2001 From: "qihao.gong@jikimo.com" Date: Fri, 4 Aug 2023 17:31:47 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_base/views/base_view.xml | 2 +- sf_maintenance/models/sf_maintenance_logs.py | 4 ++-- sf_maintenance/views/maintenance_logs_views.xml | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sf_base/views/base_view.xml b/sf_base/views/base_view.xml index eadd81f2..da08d342 100644 --- a/sf_base/views/base_view.xml +++ b/sf_base/views/base_view.xml @@ -87,7 +87,7 @@ tree.sf.machine_tool.type sf.machine_tool.type - + diff --git a/sf_maintenance/models/sf_maintenance_logs.py b/sf_maintenance/models/sf_maintenance_logs.py index f9a514f5..8c12529f 100644 --- a/sf_maintenance/models/sf_maintenance_logs.py +++ b/sf_maintenance/models/sf_maintenance_logs.py @@ -8,8 +8,8 @@ class SfMaintenanceLogs(models.Model): code = fields.Char(string='编码') name = fields.Char(string='名称') type = fields.Selection([('type1', '类型1'), ('type2', '类型2')], string='类型') - brand = fields.Char(string='品牌') - model = fields.Char(string='型号') + brand = fields.Many2one('sf.machine.brand', relared='model.brand_id', string='品牌') + model = fields.Many2one('maintenance.equipment', string='设备') code_location = fields.Char(string='编码位置') fault_type = fields.Selection([('电气类', '电气类'), ('机械类', '机械类'), ('程序类', '程序类'), ('系统类', '系统类')], string='故障类型') fault_code = fields.Char(string='故障代码') diff --git a/sf_maintenance/views/maintenance_logs_views.xml b/sf_maintenance/views/maintenance_logs_views.xml index d5cffdae..14ddd9e0 100644 --- a/sf_maintenance/views/maintenance_logs_views.xml +++ b/sf_maintenance/views/maintenance_logs_views.xml @@ -63,6 +63,9 @@ sf.maintenance.logs + + + From 5a28ec75799ebf6c58d156221aee4855ae37551b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?WEB=E8=AE=B8=E4=BD=95=E5=93=B2=5Cxuhez?= Date: Mon, 7 Aug 2023 14:48:55 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E7=9C=8B=E6=9D=BF=E8=A7=86=E5=9B=BE=E6=A0=87=E7=AD=BE=E9=A1=B5?= =?UTF-8?q?=E7=9A=84=E5=8A=A8=E6=80=81=E6=B7=BB=E5=8A=A0=E5=B9=B6=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E7=82=B9=E5=87=BB=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_workcenter.py | 3 + .../static/src/js/kanban_change.js | 31 +++ .../static/src/scss/kanban_change.scss | 19 +- .../static/src/xml/kanban_change.xml | 13 +- .../views/mrp_workcenter_views.xml | 197 ++++++++++++++++-- 5 files changed, 230 insertions(+), 33 deletions(-) diff --git a/sf_manufacturing/models/mrp_workcenter.py b/sf_manufacturing/models/mrp_workcenter.py index 7483d188..525c2f54 100644 --- a/sf_manufacturing/models/mrp_workcenter.py +++ b/sf_manufacturing/models/mrp_workcenter.py @@ -6,6 +6,9 @@ from odoo.addons.resource.models.resource import Intervals class ResWorkcenter(models.Model): _inherit = "mrp.workcenter" + + # 生产线显示 + production_line_show = fields.Char(string='生产线') equipment_id = fields.Many2one('maintenance.equipment', string='设备') machine_tool_id = fields.Many2one('sf.machine_tool', string='机床') production_line_id = fields.Many2one('sf.production.line', string='生产线') diff --git a/sf_manufacturing/static/src/js/kanban_change.js b/sf_manufacturing/static/src/js/kanban_change.js index b60a84a4..64963d18 100644 --- a/sf_manufacturing/static/src/js/kanban_change.js +++ b/sf_manufacturing/static/src/js/kanban_change.js @@ -15,8 +15,32 @@ class CustomKanbanController extends KanbanController { 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) => { + 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); + }); + }); + } async getAllWorkOrders() { const response = await this.env.services.rpc('/web/dataset/call_kw',{ model: 'sf.production.line', @@ -24,7 +48,14 @@ class CustomKanbanController extends KanbanController { 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; } diff --git a/sf_manufacturing/static/src/scss/kanban_change.scss b/sf_manufacturing/static/src/scss/kanban_change.scss index 82e31b87..fe4dfca4 100644 --- a/sf_manufacturing/static/src/scss/kanban_change.scss +++ b/sf_manufacturing/static/src/scss/kanban_change.scss @@ -1,18 +1,13 @@ -.alerts { +.choosekanban { display: flex; justify-content: flex-start; align-items: center; } -.alerts>div { - width: 3vw; - height: 1.5vw; - border: 1px solid grey; - border-radius: 5px; - margin: 0 0.5vw; - justify-content: center; +.choosekanban>button { + width: 5vw !important; + height: 2vw !important; + border: none !important; + margin-left: 16px !important; + margin-top: 1vw !important; } - -.alerts>div:nth-child(1) { - margin-left: 0 !important; -} \ No newline at end of file diff --git a/sf_manufacturing/static/src/xml/kanban_change.xml b/sf_manufacturing/static/src/xml/kanban_change.xml index c18fc103..ccd8fb21 100644 --- a/sf_manufacturing/static/src/xml/kanban_change.xml +++ b/sf_manufacturing/static/src/xml/kanban_change.xml @@ -1,18 +1,13 @@ - - - - - -
- +
+ -
+
+
diff --git a/sf_manufacturing/views/mrp_workcenter_views.xml b/sf_manufacturing/views/mrp_workcenter_views.xml index 8e360993..dee39525 100644 --- a/sf_manufacturing/views/mrp_workcenter_views.xml +++ b/sf_manufacturing/views/mrp_workcenter_views.xml @@ -94,6 +94,7 @@ + @@ -101,18 +102,175 @@ - - mrp.workcenter.view.kanban.inherit.maintenance - mrp.workcenter - - - - - - - + + + + + + + + + + + + + + + mrp.workcenter.kanban.inherit + mrp.workcenter + + + + + + + + + + + + +
+ +
+
+
+
+ + + + +
+
+ +
+
+
+
+
+
+ + + + + + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + + % + + +
+
+
+
+ +
+
+
+
+
+
+
+
@@ -140,6 +298,21 @@ + + + mrp.workcenter.inherit + mrp.workcenter + + + + + + + + From f85a0e4c85774643c6fdc6fe579a5d923fc1b011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?WEB=E8=AE=B8=E4=BD=95=E5=93=B2=5Cxuhez?= Date: Mon, 7 Aug 2023 15:06:35 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E5=88=A0=E9=99=A4searchPannel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/mrp_workcenter_views.xml | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sf_manufacturing/views/mrp_workcenter_views.xml b/sf_manufacturing/views/mrp_workcenter_views.xml index 47597185..691bf16d 100644 --- a/sf_manufacturing/views/mrp_workcenter_views.xml +++ b/sf_manufacturing/views/mrp_workcenter_views.xml @@ -295,21 +295,21 @@ -<<<<<<< HEAD - - - mrp.workcenter.inherit - mrp.workcenter - - - - - - - + + + + + + + + + + + + + + + From f0e1939b954b77b82d413d1fbf79043d1801912a Mon Sep 17 00:00:00 2001 From: "qihao.gong@jikimo.com" Date: Mon, 7 Aug 2023 16:00:26 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=BB=A5=E5=8F=8A=E6=9C=BA=E5=BA=8A=E5=9E=8B?= =?UTF-8?q?=E5=8F=B7=E5=9F=BA=E7=A1=80=E5=8F=82=E6=95=B0=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E5=90=8C=E6=AD=A5cloud=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_base/models/base.py | 17 +- sf_base/static/src/scss/test.scss | 1 + sf_base/views/base_view.xml | 39 +++- sf_maintenance/models/sf_maintenance.py | 39 ++-- sf_maintenance/views/maintenance_views.xml | 205 ++++++++++---------- sf_mrs_connect/models/res_config_setting.py | 22 ++- sf_mrs_connect/models/sync_common.py | 28 ++- 7 files changed, 198 insertions(+), 153 deletions(-) diff --git a/sf_base/models/base.py b/sf_base/models/base.py index f6a945aa..c679ac74 100644 --- a/sf_base/models/base.py +++ b/sf_base/models/base.py @@ -267,7 +267,7 @@ class MachineToolType(models.Model): ('youyagang', '油压缸驱动'), ('chilunjia', '齿轮架驱动') ], string="主轴加高方式", default='sifudianji') - workpiece_load = fields.Char('工件负载') + workpiece_load = fields.Char('工件最大负载(kg)') lead_screw = fields.Char('丝杆') workbench_L = fields.Char('工作台长度(mm)') workbench_W = fields.Char('工作台宽度(mm)') @@ -276,14 +276,16 @@ class MachineToolType(models.Model): machine_tool_W = fields.Char('机床宽度(mm)') machine_tool_H = fields.Char('机床高度(mm)') feed_speed = fields.Char('进给速度(mm/min)') - tool_speed = fields.Char('刀具速度') - distance = fields.Char('主轴端面至工作台面距离(mm)') + tool_speed = fields.Char('刀具速度(m/min)') + distance_min = fields.Char('主轴端面至工作台面距离MIN(mm)') + distance_max = fields.Char('主轴端面至工作台面距离MIN(mm)') taper = fields.Char('主轴锥度(°)') torque = fields.Char('主轴点击扭矩(n/m)') motor_power = fields.Char('主轴电机功率(kw)') - tool_quality_max = fields.Char('刀具最大质量') - tool_long_max = fields.Char('刀具最大长度') - tool_diameter_max = fields.Char('刀具最大刀径') + tool_quality_max = fields.Char('刀具最大质量(kg)') + tool_long_max = fields.Char('刀具最大长度(mm)') + tool_diameter_max = fields.Char('刀具刀径max(mm)') + tool_diameter_min = fields.Char('刀具刀径min(mm)') machine_tool_category = fields.Many2one('sf.machine_tool.category', string='机床类型') # 多个型号对应一个机床 @@ -298,7 +300,8 @@ class MachineToolType(models.Model): b_axis = fields.Integer('B轴') c_axis = fields.Integer('C轴') 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', string="控制系统") active = fields.Boolean('有效', default=True) diff --git a/sf_base/static/src/scss/test.scss b/sf_base/static/src/scss/test.scss index 32aba96d..bb7d8929 100644 --- a/sf_base/static/src/scss/test.scss +++ b/sf_base/static/src/scss/test.scss @@ -4,4 +4,5 @@ .test_model>.o_form_label { margin-left: 20px; margin-right: 0px !important; + white-space: nowrap; } \ No newline at end of file diff --git a/sf_base/views/base_view.xml b/sf_base/views/base_view.xml index da08d342..6d10b4e9 100644 --- a/sf_base/views/base_view.xml +++ b/sf_base/views/base_view.xml @@ -116,10 +116,10 @@ - + - + - + - + diff --git a/sf_maintenance/models/sf_maintenance.py b/sf_maintenance/models/sf_maintenance.py index a541185a..6b1d76f4 100644 --- a/sf_maintenance/models/sf_maintenance.py +++ b/sf_maintenance/models/sf_maintenance.py @@ -85,7 +85,8 @@ class SfMaintenanceEquipment(models.Model): c_axis = fields.Integer('C轴') remark = fields.Char('备注') is_binding = fields.Boolean('是否绑定机床', default=False) - precision = fields.Float('加工精度') + precision_min = fields.Float('X轴定位精度min(mm)', digits=(12, 3)) + precision_max = fields.Float('X轴定位精度max(mm)', digits=(12, 3)) control_system_id = fields.Many2one('sf.machine.control_system', string="控制系统") # 多个机床型号对应一个机床 @@ -102,7 +103,7 @@ class SfMaintenanceEquipment(models.Model): ('youyagang', '油压缸驱动'), ('chilunjia', '齿轮架驱动') ], string="主轴加高方式", default='sifudianji') - workpiece_load = fields.Char('工件负载') + workpiece_load = fields.Char('工件最大负载(kg)') lead_screw = fields.Char('丝杆') workbench_L = fields.Char('工作台长度(mm)') workbench_W = fields.Char('工作台宽度(mm)') @@ -111,14 +112,16 @@ class SfMaintenanceEquipment(models.Model): machine_tool_W = fields.Char('机床宽度(mm)') machine_tool_H = fields.Char('机床高度(mm)') feed_speed = fields.Char('进给速度(mm/min)') - tool_speed = fields.Char('刀具速度') - distance = fields.Char('主轴端面至工作台面距离(mm)') + tool_speed = fields.Char('刀具速度(m/min)') + distance_min = fields.Char('主轴端面至工作台面距离MIN(mm)') + distance_max = fields.Char('主轴端面至工作台面距离MIN(mm)') taper = fields.Char('主轴锥度(°)') torque = fields.Char('主轴点击扭矩(n/m)') motor_power = fields.Char('主轴电机功率(kw)') - tool_quality_max = fields.Char('刀具最大质量') - tool_long_max = fields.Char('刀具最大长度') - tool_diameter_max = fields.Char('刀具最大刀径') + tool_quality_max = fields.Char('刀具最大质量(kg)') + tool_long_max = fields.Char('刀具最大长度(mm)') + tool_diameter_max = fields.Char('刀具刀径max(mm)') + tool_diameter_min = fields.Char('刀具刀径min(mm)') machine_tool_category = fields.Many2one('sf.machine_tool.category', string='机床类型') # 一个机床对应一個加工工厂,一个加工工厂对应多个机床 factory_id = fields.Many2one('res.partner', string='所属工厂', @@ -132,20 +135,7 @@ class SfMaintenanceEquipment(models.Model): active = fields.Boolean('有效', default=True) # 多个型号对应一个机床 machine_tool_id = fields.Many2one('sf.machine_tool', '机床') - number_of_axles = fields.Selection( - [("三轴", "三轴"), ("四轴", "四轴"), ("五轴", "五轴")], - default="", string="轴数") - # 加工进程 - x_axis = fields.Integer('X轴') - y_axis = fields.Integer('Y轴') - z_axis = fields.Integer('Z轴') - b_axis = fields.Integer('B轴') - c_axis = fields.Integer('C轴') - remark = fields.Char('备注') - precision = fields.Float('加工精度') - control_system_id = fields.Many2one('sf.machine.control_system', - string="控制系统") - active = fields.Boolean('有效', default=True) + def name_get(self): result = [] @@ -208,7 +198,8 @@ class SfMaintenanceEquipment(models.Model): item.number_of_knife_library = item.type_id.number_of_knife_library item.number_of_axles = item.type_id.number_of_axles item.rotate_speed = item.type_id.rotate_speed - item.precision = item.type_id.precision + item.precision_min = item.type_id.precision_min + item.precision_max = item.type_id.precision_max item.control_system_id = item.type_id.control_system_id item.x_axis = item.type_id.x_axis item.y_axis = item.type_id.y_axis @@ -227,13 +218,15 @@ class SfMaintenanceEquipment(models.Model): item.machine_tool_H = item.type_id.machine_tool_H item.feed_speed = item.type_id.feed_speed item.tool_speed = item.type_id.tool_speed - item.distance = item.type_id.distance + item.distance_min = item.type_id.distance_min + item.distance_max = item.type_id.distance_max item.taper = item.type_id.taper item.torque = item.type_id.torque item.motor_power = item.type_id.motor_power item.tool_quality_max = item.type_id.tool_quality_max item.tool_long_max = item.type_id.tool_long_max item.tool_diameter_max = item.type_id.tool_diameter_max + item.tool_diameter_min = item.type_id.tool_diameter_min item.machine_tool_category = item.type_id.machine_tool_category.id item.brand_id = item.type_id.brand_id.id diff --git a/sf_maintenance/views/maintenance_views.xml b/sf_maintenance/views/maintenance_views.xml index 3f23cd24..508325f1 100644 --- a/sf_maintenance/views/maintenance_views.xml +++ b/sf_maintenance/views/maintenance_views.xml @@ -38,107 +38,114 @@
- - - - + + + + + + - - - - - - - - - - - - - - - - - - diff --git a/sf_mrs_connect/models/res_config_setting.py b/sf_mrs_connect/models/res_config_setting.py index 4d9c0ece..79ecbbd9 100644 --- a/sf_mrs_connect/models/res_config_setting.py +++ b/sf_mrs_connect/models/res_config_setting.py @@ -36,8 +36,7 @@ class ResConfigSettings(models.TransientModel): _logger.info("同步资源库品牌") self.env['sf.machine.control_system'].sync_all_machine_tool_type_control_system() _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() _logger.info("同步资源库机床类型") # self.env['sf.production.process.parameter'].sync_all_production_process_parameter() @@ -57,16 +56,19 @@ class ResConfigSettings(models.TransientModel): _logger.info("同步所有功能刀具列表...") self.env['sf.functional.cutting.tool'].sync_all_functional_cutting_tool() _logger.info("同步所有功能刀具列表完成") + self.env['sf.fixture.material'].sync_all_fixture_material() _logger.info("同步夹具物料") - 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("同步功能夹具") + # 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("同步功能夹具") + self.env['sf.machine_tool.type'].sync_all_machine_tool_type() + _logger.info("同步资源库机床型号") except Exception as e: _logger.info("捕获错误信息:%s" % e) raise ValidationError("数据错误导致同步失败,请联系管理员") diff --git a/sf_mrs_connect/models/sync_common.py b/sf_mrs_connect/models/sync_common.py index 29628856..a4aca06a 100644 --- a/sf_mrs_connect/models/sync_common.py +++ b/sf_mrs_connect/models/sync_common.py @@ -708,9 +708,11 @@ class MachineToolType(models.Model): [("code", '=', item['code'])]) if brand: brand.id = item['id'], + brand.knife_type = item['knife_type'], brand.name = item['name'], 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.rotate_speed = item['rotate_speed'], brand.number_of_axles = item['number_of_axles'], @@ -734,6 +736,7 @@ class MachineToolType(models.Model): "id": item['id'], "name": item['name'], "code": item['code'], + "knife_type": item['knife_type'], "number_of_knife_library": item['number_of_knife_library'], "rotate_speed": item['rotate_speed'], @@ -746,7 +749,8 @@ class MachineToolType(models.Model): "b_axis": item['b_axis'], "c_axis": item['c_axis'], "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( [('code', '=', item['control_system_id'])]).id, "active": item['active'], @@ -763,13 +767,15 @@ class MachineToolType(models.Model): "machine_tool_H": item['machine_tool_H'], "feed_speed": item['feed_speed'], "tool_speed": item['tool_speed'], - "distance": item['distance'], + "distance_min": item['distance_min'], + "distance_max": item['distance_max'], "taper": item['taper'], "torque": item['torque'], "motor_power": item['motor_power'], "tool_quality_max": item['tool_quality_max'], "tool_long_max": item['tool_long_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( [('code', '=', item['machine_tool_category'])]).id, @@ -812,8 +818,10 @@ class MachineToolType(models.Model): "z_axis": item['z_axis'], "b_axis": item['b_axis'], "c_axis": item['c_axis'], + "knife_type": item['knife_type'], "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( [('code', '=', item['control_system_id'])]).id, "active": item['active'], @@ -830,13 +838,15 @@ class MachineToolType(models.Model): "machine_tool_H": item['machine_tool_H'], "feed_speed": item['feed_speed'], "tool_speed": item['tool_speed'], - "distance": item['distance'], + "distance_min": item['distance_min'], + "distance_max": item['distance_max'], "taper": item['taper'], "torque": item['torque'], "motor_power": item['motor_power'], "tool_quality_max": item['tool_quality_max'], "tool_long_max": item['tool_long_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( [('code', '=', item['machine_tool_category'])]).id, @@ -856,9 +866,11 @@ class MachineToolType(models.Model): "y_axis": item['y_axis'], "z_axis": item['z_axis'], "b_axis": item['b_axis'], + "knife_type": item['knife_type'], "c_axis": item['c_axis'], "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( [('code', '=', item['control_system_id'])]).id, "active": item['active'], @@ -875,13 +887,15 @@ class MachineToolType(models.Model): "machine_tool_H": item['machine_tool_H'], "feed_speed": item['feed_speed'], "tool_speed": item['tool_speed'], - "distance": item['distance'], + "distance_min": item['distance_min'], + "distance_max": item['distance_max'], "taper": item['taper'], "torque": item['torque'], "motor_power": item['motor_power'], "tool_quality_max": item['tool_quality_max'], "tool_long_max": item['tool_long_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( [('code', '=', item['machine_tool_category'])]).id, From 46f40ec4804e7aac968cc5476d8e3057ee98962d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?WEB=E8=AE=B8=E4=BD=95=E5=93=B2=5Cxuhez?= Date: Mon, 7 Aug 2023 16:49:36 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E9=A1=B5=E7=AD=9B=E9=80=89=E5=AE=8C=E5=90=8E=E7=9C=8B=E6=9D=BF?= =?UTF-8?q?=E8=A7=86=E5=9B=BE=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/src/scss/kanban_change.scss | 5 +- .../static/src/xml/kanban_change.xml | 2 +- .../views/mrp_workcenter_views.xml | 176 ++++++++++-------- 3 files changed, 104 insertions(+), 79 deletions(-) diff --git a/sf_manufacturing/static/src/scss/kanban_change.scss b/sf_manufacturing/static/src/scss/kanban_change.scss index e68a6061..bed498d7 100644 --- a/sf_manufacturing/static/src/scss/kanban_change.scss +++ b/sf_manufacturing/static/src/scss/kanban_change.scss @@ -11,6 +11,9 @@ height: 2vw !important; border: none !important; margin-left: 16px !important; - margin-top: 1vw !important; +} + +.o_content > .d-flex { + display: block !important; } diff --git a/sf_manufacturing/static/src/xml/kanban_change.xml b/sf_manufacturing/static/src/xml/kanban_change.xml index ccd8fb21..b3718059 100644 --- a/sf_manufacturing/static/src/xml/kanban_change.xml +++ b/sf_manufacturing/static/src/xml/kanban_change.xml @@ -4,7 +4,7 @@
- + diff --git a/sf_manufacturing/views/mrp_workcenter_views.xml b/sf_manufacturing/views/mrp_workcenter_views.xml index 691bf16d..22037812 100644 --- a/sf_manufacturing/views/mrp_workcenter_views.xml +++ b/sf_manufacturing/views/mrp_workcenter_views.xml @@ -94,7 +94,7 @@ - + @@ -102,66 +102,75 @@ - - - - - - - - - - - - - - - mrp.workcenter.kanban.inherit - mrp.workcenter - - - - + + + + + + + + + + + + + + + mrp.workcenter.kanban.inherit + mrp.workcenter + + + + + - +
-
- + + +
- - - - - - + + + + + +
@@ -171,7 +180,8 @@
@@ -181,7 +191,8 @@
@@ -191,7 +202,8 @@
@@ -206,22 +218,26 @@
+