From 03cc5b22817585c5fbee27c6c7fe6513153fe508 Mon Sep 17 00:00:00 2001 From: yuxianghui <1608204036@qq.com> Date: Thu, 3 Aug 2023 14:31:16 +0800 Subject: [PATCH 01/16] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=88=80=E5=85=B7=E7=BB=84=E8=A3=85=E5=AF=B9=E8=B1=A1=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E7=BB=84=E8=A3=85=E6=97=B6=E5=88=A0=E9=99=A4=E7=BB=84?= =?UTF-8?q?=E8=A3=85=E6=97=B6=E6=89=80=E5=88=9B=E5=BB=BA=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=88=80=E5=85=B7=E5=88=97=E8=A1=A8=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=8C=E5=88=A0=E9=99=A4=E4=BA=86=E5=8A=9F=E8=83=BD=E5=88=80?= =?UTF-8?q?=E5=85=B7=E7=BB=84=E8=A3=85=E5=AF=B9=E8=B1=A1=E7=BB=84=E8=A3=85?= =?UTF-8?q?=E6=97=B6=E5=88=9B=E5=BB=BA=E5=8A=9F=E8=83=BD=E5=88=80=E5=85=B7?= =?UTF-8?q?=E9=A2=84=E8=AD=A6=E3=80=81=E5=AE=9E=E6=97=B6=E5=88=86=E5=B8=83?= =?UTF-8?q?=E3=80=81=E5=87=BA=E5=85=A5=E5=BA=93=E8=AE=B0=E5=BD=95=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=9A=84=E5=8A=9F=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_tool_management/models/base.py | 38 +++++++++++-------- .../security/ir.model.access.csv | 6 +-- sf_tool_management/wizard/wizard.py | 27 +++++++------ sf_tool_management/wizard/wizard_view.xml | 3 +- 4 files changed, 42 insertions(+), 32 deletions(-) diff --git a/sf_tool_management/models/base.py b/sf_tool_management/models/base.py index 7f8b9323..33a489c3 100644 --- a/sf_tool_management/models/base.py +++ b/sf_tool_management/models/base.py @@ -591,6 +591,20 @@ class FunctionalToolAssembly(models.Model): 取消功能刀具组装 :return: """ + if self.new_former == '0': + # 如果是新刀,则删除功能刀具列表、 + self.env['sf.functional.cutting.tool.entity'].search([ + ('code', '=', self.functional_tool_code)]).unlink() + else: + pass + # # 删除功能刀具预警、实时分布、出入库记录的新记录 + # 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([ ('machine_tool_name_id', '=', self.machine_tool_name_id.id), ('cutter_spacing_code', '=', self.cutter_spacing_code) @@ -639,28 +653,20 @@ class FunctionalToolAssembly(models.Model): """ self.env['sf.delivery.of.cargo.from.storage'].search([]).unlink() - vals = self.env['sf.functional.tool.assembly'].search([('check_box_1', '=', True),('assemble_status', '=', '1')]) - if vals: - for val in vals: - self.env['sf.delivery.of.cargo.from.storage'].create({ - 'functional_tool_code': val.functional_tool_code, + desc_1 = {'functional_tool_code': val.functional_tool_code, 'name': val.name.id, 'functional_tool_type_id': val.functional_tool_type_id.id, 'production_line_name_id': val.production_line_name_id.id, 'machine_tool_code': val.machine_tool_code, 'receive_person': val.receive_person, - 'receive_time': val.receive_time - }) + 'receive_time': val.receive_time} + + vals = self.env['sf.functional.tool.assembly'].search([('check_box_1', '=', True),('assemble_status', '=', '1')]) + if vals: + for val in vals: + self.env['sf.delivery.of.cargo.from.storage'].create(desc_1) else: - self.env['sf.delivery.of.cargo.from.storage'].create({ - 'functional_tool_code': self.functional_tool_code, - 'name': self.name.id, - 'functional_tool_type_id': self.functional_tool_type_id.id, - 'production_line_name_id': self.production_line_name_id.id, - 'machine_tool_code': self.machine_tool_code, - 'receive_person': self.receive_person, - 'receive_time': self.receive_time - }) + self.env['sf.delivery.of.cargo.from.storage'].create(desc_1) return { 'type': 'ir.actions.act_window', diff --git a/sf_tool_management/security/ir.model.access.csv b/sf_tool_management/security/ir.model.access.csv index 1cb5d1a0..fe606ac1 100644 --- a/sf_tool_management/security/ir.model.access.csv +++ b/sf_tool_management/security/ir.model.access.csv @@ -1,8 +1,8 @@ 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.tool.warning,sf.functional.tool.warning,model_sf_functional_tool_warning,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,0,1,0 -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.functional.tool.warning,sf.functional.tool.warning,model_sf_functional_tool_warning,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,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_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 diff --git a/sf_tool_management/wizard/wizard.py b/sf_tool_management/wizard/wizard.py index 7afdd536..2927ba63 100644 --- a/sf_tool_management/wizard/wizard.py +++ b/sf_tool_management/wizard/wizard.py @@ -176,10 +176,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel): 功能刀具组装 :return: """ - self.env['sf.functional.tool.assembly'].search([ - ('machine_tool_name_id', '=', self.machine_tool_name_id.id), - ('cutter_spacing_code', '=', self.cutter_spacing_code) - ]).write({ + desc_1 = { 'mrs_cutting_tool_integral_model_ids': self.mrs_cutting_tool_integral_model_ids.ids, 'integral_code': self.integral_code, 'integral_name': self.integral_name, @@ -214,10 +211,14 @@ class FunctionalToolAssemblyOrder(models.TransientModel): 'assemble_status': '1', 'tool_loading_person': self.env.user.name, '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) + ]).write(desc_1) # 封装功能刀具数据 - desc = { + desc_2 = { 'code': self.code, 'name': self.functional_tool_name_id.name, 'mrs_cutting_tool_type_id': self.functional_tool_type_id.id, @@ -239,14 +240,16 @@ class FunctionalToolAssemblyOrder(models.TransientModel): 'applicable_range': None, 'image': None, } - if self.new_former == '0': # 如果是新刀,则创建功能刀具列表、 - self.env['sf.functional.cutting.tool.entity'].create(desc) - # 创建功能刀具预警、实时分布、出入库记录的新记录 - 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) + self.env['sf.functional.cutting.tool.entity'].create(desc_2) + else: + self.env['sf.functional.cutting.tool.entity'].search([ + ('code', '=', self.code)]).write(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'} diff --git a/sf_tool_management/wizard/wizard_view.xml b/sf_tool_management/wizard/wizard_view.xml index 5f156eae..a8101f6d 100644 --- a/sf_tool_management/wizard/wizard_view.xml +++ b/sf_tool_management/wizard/wizard_view.xml @@ -189,7 +189,8 @@ - + From 810ef41c05a292fb2b5d48dc99291d2e62bc1cbe Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Thu, 3 Aug 2023 17:24:37 +0800 Subject: [PATCH 02/16] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E7=9A=84rpc=E6=8B=BF=E5=8F=96=E5=90=8E=E7=AB=AF=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E7=BA=BF=E6=95=B0=E6=8D=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/__manifest__.py | 8 ++++ .../static/src/js/kanban_change.js | 43 +++++++++++++++++++ .../static/src/scss/kanban_change.scss | 18 ++++++++ .../static/src/xml/kanban_change.xml | 21 +++++++++ 4 files changed, 90 insertions(+) create mode 100644 sf_manufacturing/static/src/js/kanban_change.js create mode 100644 sf_manufacturing/static/src/scss/kanban_change.scss create mode 100644 sf_manufacturing/static/src/xml/kanban_change.xml diff --git a/sf_manufacturing/__manifest__.py b/sf_manufacturing/__manifest__.py index 24a400a6..50f94eba 100644 --- a/sf_manufacturing/__manifest__.py +++ b/sf_manufacturing/__manifest__.py @@ -30,6 +30,14 @@ ], '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', 'installable': True, 'application': False, diff --git a/sf_manufacturing/static/src/js/kanban_change.js b/sf_manufacturing/static/src/js/kanban_change.js new file mode 100644 index 00000000..b60a84a4 --- /dev/null +++ b/sf_manufacturing/static/src/js/kanban_change.js @@ -0,0 +1,43 @@ +/** @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); +} + + + async getAllWorkOrders() { + const response = await this.env.services.rpc('/web/dataset/call_kw',{ + model: 'sf.production.line', + method: 'search_read', + args: [], + kwargs: {}, + }); + console.log('response', response); + // 你可以在这里处理响应,例如将其存储在控制器的状态中 + 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); \ No newline at end of file diff --git a/sf_manufacturing/static/src/scss/kanban_change.scss b/sf_manufacturing/static/src/scss/kanban_change.scss new file mode 100644 index 00000000..82e31b87 --- /dev/null +++ b/sf_manufacturing/static/src/scss/kanban_change.scss @@ -0,0 +1,18 @@ +.alerts { + 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; +} + +.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 new file mode 100644 index 00000000..11cb9113 --- /dev/null +++ b/sf_manufacturing/static/src/xml/kanban_change.xml @@ -0,0 +1,21 @@ + + + + + + + + + +
+ + +
+ 产线 +
+
+
+
+ +
+
\ No newline at end of file From fe310de31d72441fc8bd4c9580c84f696490d645 Mon Sep 17 00:00:00 2001 From: yuxianghui <1608204036@qq.com> Date: Thu, 3 Aug 2023 17:29:26 +0800 Subject: [PATCH 03/16] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=88=80=E5=85=B7=E5=88=97=E8=A1=A8=E7=BC=93=E5=AD=98=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=EF=BC=8C=E6=96=B0=E5=A2=9E=E7=BB=84=E8=A3=85=E6=97=A7?= =?UTF-8?q?=E5=88=80=E6=98=AF=E5=88=9B=E5=BB=BA=E7=BC=93=E5=AD=98=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=8F=96=E6=B6=88=E7=BB=84?= =?UTF-8?q?=E8=A3=85=E6=97=B6=E6=B8=85=E9=99=A4=E7=BC=93=E5=AD=98=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_tool_management/models/base.py | 89 ++++++++++++++++--- .../security/ir.model.access.csv | 1 + sf_tool_management/wizard/wizard.py | 8 +- 3 files changed, 86 insertions(+), 12 deletions(-) diff --git a/sf_tool_management/models/base.py b/sf_tool_management/models/base.py index 33a489c3..675542f1 100644 --- a/sf_tool_management/models/base.py +++ b/sf_tool_management/models/base.py @@ -68,6 +68,59 @@ class FunctionalCuttingToolEntity(models.Model): 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): _name = 'sf.functional.tool.warning' _description = '功能刀具预警' @@ -596,7 +649,15 @@ class FunctionalToolAssembly(models.Model): self.env['sf.functional.cutting.tool.entity'].search([ ('code', '=', self.functional_tool_code)]).unlink() else: - pass + # 获取功能刀具缓存信息 + record = self.env['sf.functional.cutting.tool.entity.cache'].search([ + ('code', '=', self.functional_tool_code)]) + # 删除缓存信息 + record.unlink() + # 修改功能刀具列表信息 + self.env['sf.functional.cutting.tool.entity'].search([ + ('code', '=', self.functional_tool_code)]).write(record) + # # 删除功能刀具预警、实时分布、出入库记录的新记录 # self.env['sf.functional.tool.warning'].search([ # ('code', '=', self.functional_tool_code)]).unlink() @@ -653,20 +714,28 @@ class FunctionalToolAssembly(models.Model): """ self.env['sf.delivery.of.cargo.from.storage'].search([]).unlink() - desc_1 = {'functional_tool_code': val.functional_tool_code, - 'name': val.name.id, - 'functional_tool_type_id': val.functional_tool_type_id.id, - 'production_line_name_id': val.production_line_name_id.id, - 'machine_tool_code': val.machine_tool_code, - 'receive_person': val.receive_person, - 'receive_time': val.receive_time} + vals = self.env['sf.functional.tool.assembly'].search([('check_box_1', '=', True),('assemble_status', '=', '1')]) if vals: for val in vals: - self.env['sf.delivery.of.cargo.from.storage'].create(desc_1) + self.env['sf.delivery.of.cargo.from.storage'].create({ + 'functional_tool_code': val.functional_tool_code, + 'name': val.name.id, + 'functional_tool_type_id': val.functional_tool_type_id.id, + 'production_line_name_id': val.production_line_name_id.id, + 'machine_tool_code': val.machine_tool_code, + 'receive_person': val.receive_person, + 'receive_time': val.receive_time}) else: - self.env['sf.delivery.of.cargo.from.storage'].create(desc_1) + self.env['sf.delivery.of.cargo.from.storage'].create({ + 'functional_tool_code': self.functional_tool_code, + 'name': self.name.id, + 'functional_tool_type_id': self.functional_tool_type_id.id, + 'production_line_name_id': self.production_line_name_id.id, + 'machine_tool_code': self.machine_tool_code, + 'receive_person': self.receive_person, + 'receive_time': self.receive_time}) return { 'type': 'ir.actions.act_window', diff --git a/sf_tool_management/security/ir.model.access.csv b/sf_tool_management/security/ir.model.access.csv index fe606ac1..d95ad4c5 100644 --- a/sf_tool_management/security/ir.model.access.csv +++ b/sf_tool_management/security/ir.model.access.csv @@ -1,5 +1,6 @@ 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_cache,sf.functional.cutting.tool.entity.cache,model_sf_functional_cutting_tool_entity_cache,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,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,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 diff --git a/sf_tool_management/wizard/wizard.py b/sf_tool_management/wizard/wizard.py index 2927ba63..8973a8b8 100644 --- a/sf_tool_management/wizard/wizard.py +++ b/sf_tool_management/wizard/wizard.py @@ -244,8 +244,12 @@ class FunctionalToolAssemblyOrder(models.TransientModel): # 如果是新刀,则创建功能刀具列表、 self.env['sf.functional.cutting.tool.entity'].create(desc_2) else: - self.env['sf.functional.cutting.tool.entity'].search([ - ('code', '=', self.code)]).write(desc_2) + record = self.env['sf.functional.cutting.tool.entity'].search([ + ('code', '=', self.code)]) + # 创建功能刀具缓存信息 + self.env['sf.functional.cutting.tool.entity.cache'].create(record) + # 修改功能刀具列表信息 + record.write(desc_2) # # 创建功能刀具预警、实时分布、出入库记录的新记录 # self.env['sf.functional.tool.warning'].create(desc) # self.env['sf.real.time.distribution.of.functional.tools'].create(desc) From 17476fdcf482d6da65c6452abe6085a6170a73f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?WEB=E8=AE=B8=E4=BD=95=E5=93=B2=5Cxuhez?= Date: Thu, 3 Aug 2023 17:31:11 +0800 Subject: [PATCH 04/16] =?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=E5=8A=A8=E6=80=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=A0=87=E7=AD=BE=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/__manifest__.py | 13 ++++++ .../static/src/js/kanban_change.js | 43 +++++++++++++++++++ .../static/src/scss/kanban_change.scss | 18 ++++++++ .../static/src/xml/kanban_change.xml | 21 +++++++++ 4 files changed, 95 insertions(+) create mode 100644 sf_manufacturing/static/src/js/kanban_change.js create mode 100644 sf_manufacturing/static/src/scss/kanban_change.scss create mode 100644 sf_manufacturing/static/src/xml/kanban_change.xml diff --git a/sf_manufacturing/__manifest__.py b/sf_manufacturing/__manifest__.py index f5a1d293..1a1f11db 100644 --- a/sf_manufacturing/__manifest__.py +++ b/sf_manufacturing/__manifest__.py @@ -23,8 +23,21 @@ 'views/production_line_view.xml', 'views/tray_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': [ ], 'qweb': [ diff --git a/sf_manufacturing/static/src/js/kanban_change.js b/sf_manufacturing/static/src/js/kanban_change.js new file mode 100644 index 00000000..b60a84a4 --- /dev/null +++ b/sf_manufacturing/static/src/js/kanban_change.js @@ -0,0 +1,43 @@ +/** @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); +} + + + async getAllWorkOrders() { + const response = await this.env.services.rpc('/web/dataset/call_kw',{ + model: 'sf.production.line', + method: 'search_read', + args: [], + kwargs: {}, + }); + console.log('response', response); + // 你可以在这里处理响应,例如将其存储在控制器的状态中 + 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); \ No newline at end of file diff --git a/sf_manufacturing/static/src/scss/kanban_change.scss b/sf_manufacturing/static/src/scss/kanban_change.scss new file mode 100644 index 00000000..82e31b87 --- /dev/null +++ b/sf_manufacturing/static/src/scss/kanban_change.scss @@ -0,0 +1,18 @@ +.alerts { + 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; +} + +.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 new file mode 100644 index 00000000..c18fc103 --- /dev/null +++ b/sf_manufacturing/static/src/xml/kanban_change.xml @@ -0,0 +1,21 @@ + + + + + + + + + +
+ + +
+ +
+
+
+
+ +
+
\ No newline at end of file From 921336ad135f02ab972d3e3a800a48b027dba6de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?WEB=E8=AE=B8=E4=BD=95=E5=93=B2=5Cxuhez?= Date: Thu, 3 Aug 2023 17:32:43 +0800 Subject: [PATCH 05/16] no message --- .../static/tests/tours/tour_test_barcode_flows_picking.js | 1 + 1 file changed, 1 insertion(+) diff --git a/stock_barcode/static/tests/tours/tour_test_barcode_flows_picking.js b/stock_barcode/static/tests/tours/tour_test_barcode_flows_picking.js index 0c1c0c12..fd6e424d 100644 --- a/stock_barcode/static/tests/tours/tour_test_barcode_flows_picking.js +++ b/stock_barcode/static/tests/tours/tour_test_barcode_flows_picking.js @@ -466,6 +466,7 @@ tour.register('test_receipt_reserved_1', {test: true}, [ trigger: '.o_field_widget[name="product_id"]', run: function() { helper.assertFormLocationDest('WH/Stock'); + console.log('123') }, }, ...tour.stepUtils.discardBarcodeForm(), From 7f6ea605d26220905d9c27ee4498e8521c6e8dc6 Mon Sep 17 00:00:00 2001 From: yuxianghui <1608204036@qq.com> Date: Fri, 4 Aug 2023 10:40:35 +0800 Subject: [PATCH 06/16] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=88=80=E5=85=B7=E7=BB=84=E8=A3=85=E5=87=BA=E5=BA=93?= =?UTF-8?q?bug=EF=BC=8C=E4=BC=98=E5=8C=96=E4=BA=86=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=88=80=E5=85=B7=E7=BB=84=E8=A3=85=E5=AF=B9=E8=B1=A1=E7=BB=84?= =?UTF-8?q?=E8=A3=85=E6=97=A7=E5=88=80=E5=85=B7=E6=97=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_tool_management/models/base.py | 30 ++++++++++++--- sf_tool_management/wizard/wizard.py | 57 ++++++++++++++++++++--------- 2 files changed, 64 insertions(+), 23 deletions(-) diff --git a/sf_tool_management/models/base.py b/sf_tool_management/models/base.py index 675542f1..0e25de4f 100644 --- a/sf_tool_management/models/base.py +++ b/sf_tool_management/models/base.py @@ -652,11 +652,33 @@ class FunctionalToolAssembly(models.Model): # 获取功能刀具缓存信息 record = self.env['sf.functional.cutting.tool.entity.cache'].search([ ('code', '=', self.functional_tool_code)]) - # 删除缓存信息 - record.unlink() # 修改功能刀具列表信息 self.env['sf.functional.cutting.tool.entity'].search([ - ('code', '=', self.functional_tool_code)]).write(record) + ('code', '=', self.functional_tool_code)]).write({ + '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, + }) + # 删除缓存信息 + record.unlink() # # 删除功能刀具预警、实时分布、出入库记录的新记录 # self.env['sf.functional.tool.warning'].search([ @@ -714,8 +736,6 @@ class FunctionalToolAssembly(models.Model): """ self.env['sf.delivery.of.cargo.from.storage'].search([]).unlink() - - vals = self.env['sf.functional.tool.assembly'].search([('check_box_1', '=', True),('assemble_status', '=', '1')]) if vals: for val in vals: diff --git a/sf_tool_management/wizard/wizard.py b/sf_tool_management/wizard/wizard.py index 8973a8b8..2699cf89 100644 --- a/sf_tool_management/wizard/wizard.py +++ b/sf_tool_management/wizard/wizard.py @@ -214,7 +214,8 @@ class FunctionalToolAssemblyOrder(models.TransientModel): } self.env['sf.functional.tool.assembly'].search([ ('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', '=', '0'), ]).write(desc_1) # 封装功能刀具数据 @@ -244,10 +245,31 @@ class FunctionalToolAssemblyOrder(models.TransientModel): # 如果是新刀,则创建功能刀具列表、 self.env['sf.functional.cutting.tool.entity'].create(desc_2) else: - record = self.env['sf.functional.cutting.tool.entity'].search([ - ('code', '=', self.code)]) + record = self.env['sf.functional.cutting.tool.entity'].search([('code', '=', self.code)]) # 创建功能刀具缓存信息 - self.env['sf.functional.cutting.tool.entity.cache'].create(record) + 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, + }) # 修改功能刀具列表信息 record.write(desc_2) # # 创建功能刀具预警、实时分布、出入库记录的新记录 @@ -281,26 +303,25 @@ class DeliveryOfCargoFromStorage(models.TransientModel): print(vals) if vals: for val in vals: - self.env['sf.functional.tool.assembly'].search([ + print(val) + record = self.env['sf.functional.tool.assembly'].search([ ('functional_tool_code', '=', val.functional_tool_code), - ('machine_tool_code', '=', val.machine_tool_code), - ('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([ - ('functional_tool_code', '=', val.functional_tool_code), - ('name', '=', val.name.id) + ('assemble_status', '=', '1') ]) # 判断装刀任务来源,如果来源于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([ ('functional_tool_code', '=', val.functional_tool_code), ('functional_tool_name_id', '=', val.name.id) ]).write({ 'plan_execute_status': '2' }) + + record.write({ + 'assemble_status': '2', + 'receive_person': self.env.user.name, + 'receive_time': fields.Datetime.now() + }) + + + From cd042a80739290e5536a1f38ca095146384f5d53 Mon Sep 17 00:00:00 2001 From: yuxianghui <1608204036@qq.com> Date: Fri, 4 Aug 2023 16:24:12 +0800 Subject: [PATCH 07/16] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=88=80=E5=85=B7=E7=BB=84=E8=A3=85=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E7=BB=84=E8=A3=85=E5=92=8C=E5=8F=96=E6=B6=88=E7=BB=84=E8=A3=85?= =?UTF-8?q?=E6=97=B6=E5=8A=9F=E8=83=BD=E5=88=80=E5=85=B7=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=9A=84many2many=E7=B1=BB=E5=9E=8B=E5=AD=97=E6=AE=B5=E8=B5=8B?= =?UTF-8?q?=E5=80=BC=E4=B8=BA[]=E6=97=B6=E5=80=BC=E4=B8=8D=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_tool_management/models/base.py | 16 +++++++++++----- sf_tool_management/wizard/wizard.py | 12 ++++++++---- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/sf_tool_management/models/base.py b/sf_tool_management/models/base.py index 0e25de4f..2abcc2e7 100644 --- a/sf_tool_management/models/base.py +++ b/sf_tool_management/models/base.py @@ -651,10 +651,12 @@ class FunctionalToolAssembly(models.Model): else: # 获取功能刀具缓存信息 record = self.env['sf.functional.cutting.tool.entity.cache'].search([ - ('code', '=', self.functional_tool_code)]) - # 修改功能刀具列表信息 + ('code', '=', self.functional_tool_code)], limit=1) + # 删除现有功能刀具列表记录 self.env['sf.functional.cutting.tool.entity'].search([ - ('code', '=', self.functional_tool_code)]).write({ + ('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, @@ -678,7 +680,9 @@ class FunctionalToolAssembly(models.Model): 'image': record.image, }) # 删除缓存信息 - record.unlink() + self.env['sf.functional.cutting.tool.entity.cache'].search([ + ('code', '=', self.functional_tool_code)]).unlink() + # # 删除功能刀具预警、实时分布、出入库记录的新记录 # self.env['sf.functional.tool.warning'].search([ @@ -688,9 +692,11 @@ class FunctionalToolAssembly(models.Model): # self.env['sf.inbound.and.outbound.records.of.functional.tools'].search([ # ('code', '=', self.functional_tool_code)]).unlink() + # 修改功能刀具组装的组装信息 self.env['sf.functional.tool.assembly'].search([ ('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({ 'mrs_cutting_tool_integral_model_ids': None, 'integral_code': None, diff --git a/sf_tool_management/wizard/wizard.py b/sf_tool_management/wizard/wizard.py index 2699cf89..a4ebf243 100644 --- a/sf_tool_management/wizard/wizard.py +++ b/sf_tool_management/wizard/wizard.py @@ -270,8 +270,10 @@ class FunctionalToolAssemblyOrder(models.TransientModel): 'applicable_range': record.applicable_range, 'image': record.image, }) - # 修改功能刀具列表信息 - record.write(desc_2) + # 删除功能刀具列表信息 + 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) @@ -300,10 +302,12 @@ class DeliveryOfCargoFromStorage(models.TransientModel): :return: """ vals = self.env['sf.delivery.of.cargo.from.storage'].search([]) - print(vals) if vals: for val in vals: - print(val) + # 删除功能刀具列表缓存的数据 + self.env['sf.functional.cutting.tool.entity.cache'].search([ + ('code', '=', self.functional_tool_code)]).unlink() + record = self.env['sf.functional.tool.assembly'].search([ ('functional_tool_code', '=', val.functional_tool_code), ('assemble_status', '=', '1') 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 08/16] =?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 de32f5db788f8f0eaa5985822f7b59155710a567 Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Mon, 7 Aug 2023 08:58:50 +0800 Subject: [PATCH 09/16] =?UTF-8?q?=E7=9C=8B=E6=9D=BF=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E5=AE=9E=E7=8E=B0=E5=8A=9F=E8=83=BD=E7=9A=84?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E5=B7=B2=E5=85=B7=E5=A4=87=EF=BC=88=E7=9C=8B?= =?UTF-8?q?=E6=9D=BF=E5=B7=B2=E6=8A=A0=EF=BC=8C=E5=AD=97=E6=AE=B5=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=EF=BC=89=EF=BC=8C=E5=BE=85=E4=BC=98=E5=8C=96?= 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/xml/kanban_change.xml | 13 +- .../views/mrp_workcenter_views.xml | 197 ++++++++++++++++-- 4 files changed, 223 insertions(+), 21 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/xml/kanban_change.xml b/sf_manufacturing/static/src/xml/kanban_change.xml index c18fc103..c652b95e 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 4f893929ca4f0c39cc54ffb40d0229887c54b28b Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Mon, 7 Aug 2023 10:50:44 +0800 Subject: [PATCH 10/16] =?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=E5=8A=A8=E6=80=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=A0=87=E7=AD=BE=E9=A1=B5=E5=B9=B6=E5=8F=AF=E5=88=9D?= =?UTF-8?q?=E6=AD=A5=E8=BF=9B=E8=A1=8C=E7=82=B9=E5=87=BB=E6=99=92=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/src/js/kanban_change.js | 1 + .../views/mrp_workcenter_views.xml | 22 +++---------------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/sf_manufacturing/static/src/js/kanban_change.js b/sf_manufacturing/static/src/js/kanban_change.js index 64963d18..5e2bd5e9 100644 --- a/sf_manufacturing/static/src/js/kanban_change.js +++ b/sf_manufacturing/static/src/js/kanban_change.js @@ -36,6 +36,7 @@ class CustomKanbanController extends KanbanController { kwargs: {} }).then((response) => { console.log('response', response); + location.reload(); }); }); diff --git a/sf_manufacturing/views/mrp_workcenter_views.xml b/sf_manufacturing/views/mrp_workcenter_views.xml index dee39525..6d2a2b33 100644 --- a/sf_manufacturing/views/mrp_workcenter_views.xml +++ b/sf_manufacturing/views/mrp_workcenter_views.xml @@ -128,9 +128,10 @@ + - -
+ +
@@ -298,21 +299,4 @@ - - - mrp.workcenter.inherit - mrp.workcenter - - - - - - - - - - From 5f04cbb896c11127b5e500967789c3b49b71be7a Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Mon, 7 Aug 2023 14:37:58 +0800 Subject: [PATCH 11/16] =?UTF-8?q?=E7=9C=8B=E6=9D=BF=E8=A7=86=E5=9B=BEcss?= =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=88=E8=80=81=E8=AE=B8=E5=81=9A=E7=9A=84?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/src/scss/kanban_change.scss | 19 +++++++------------ .../static/src/xml/kanban_change.xml | 2 +- .../views/mrp_workcenter_views.xml | 3 --- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/sf_manufacturing/static/src/scss/kanban_change.scss b/sf_manufacturing/static/src/scss/kanban_change.scss index 82e31b87..24ae15ad 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; + margin-top: 1vw !important; } -.alerts>div { - width: 3vw; - height: 1.5vw; - border: 1px solid grey; - border-radius: 5px; - margin: 0 0.5vw; - justify-content: center; +.choosekanban > button { + width: 4vw !important; + height: 2vw !important; + border: none !important; + margin-left: 16px !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 c652b95e..ccd8fb21 100644 --- a/sf_manufacturing/static/src/xml/kanban_change.xml +++ b/sf_manufacturing/static/src/xml/kanban_change.xml @@ -2,7 +2,7 @@ -
+
+
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 13/16] =?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 14/16] =?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 15/16] =?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 @@
+