From ad0603f921478b3f1afc3030dca3830c04dd92fe Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Thu, 14 Sep 2023 09:29:03 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E6=8A=A5=E4=BB=B7=E5=92=8C=E9=94=80?= =?UTF-8?q?=E5=94=AE=E8=AE=A2=E5=8D=95=E9=A1=B5=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/product_template.py | 7 ++-- sf_manufacturing/models/stock.py | 42 ++++++++++----------- sf_sale/models/quick_easy_order.py | 38 +++++++++---------- sf_sale/views/quick_easy_order_view.xml | 4 +- sf_sale/views/sale_order_view.xml | 29 ++++++++++++++ 5 files changed, 75 insertions(+), 45 deletions(-) diff --git a/sf_manufacturing/models/product_template.py b/sf_manufacturing/models/product_template.py index 6f50425f..6549bb7a 100644 --- a/sf_manufacturing/models/product_template.py +++ b/sf_manufacturing/models/product_template.py @@ -1,8 +1,8 @@ from odoo import models, fields, api from odoo.exceptions import ValidationError from odoo.modules import get_resource_path -from OCC.Extend.DataExchange import read_step_file -from OCC.Extend.DataExchange import write_stl_file +# from OCC.Extend.DataExchange import read_step_file +# from OCC.Extend.DataExchange import write_stl_file import logging import base64 import hashlib @@ -734,7 +734,7 @@ class ResProductMo(models.Model): def transition_glb_file(self, report_path, code): shapes = read_step_file(report_path) output_file = os.path.join('/tmp', str(code) + '.stl') - write_stl_file(shapes, output_file, 'binary', 0.03, 0.5) + # write_stl_file(shapes, output_file, 'binary', 0.03, 0.5) # 转化为glb output_glb_file = os.path.join('/tmp', str(code) + '.glb') util_path = get_resource_path('sf_dlm', 'static/util') @@ -797,6 +797,7 @@ class ResMrpBomMo(models.Model): else: return False + # 查询材料型号默认排第一的供应商 def get_supplier(self, materials_type): diff --git a/sf_manufacturing/models/stock.py b/sf_manufacturing/models/stock.py index fd014941..5ba84dd2 100644 --- a/sf_manufacturing/models/stock.py +++ b/sf_manufacturing/models/stock.py @@ -189,27 +189,27 @@ class StockRule(models.Model): 'mail.message_origin_link', values={'self': production, 'origin': origin_production}, subtype_id=self.env.ref('mail.mt_note').id) - ''' - 创建生产计划 - ''' - # 工单耗时 - workorder_duration = 0 - for workorder in production.workorder_ids: - workorder_duration += workorder.duration_expected - - sale_order = self.env['sale.order'].sudo().search([('name', '=', production.origin)]) - if sale_order: - bb = sale_order.deadline_of_delivery - productions = self.env['sf.production.plan'].with_user(SUPERUSER_ID).sudo().with_company(company_id). \ - create({ - 'name': production.name, - 'production_id': production.id, - 'date_planned_start': production.date_planned_start, - 'origin': production.origin, - 'product_qty': production.product_qty, - 'product_id': production.product_id.id, - 'state': 'draft', - }) + # ''' + # 创建生产计划 + # ''' + # # 工单耗时 + # workorder_duration = 0 + # for workorder in production.workorder_ids: + # workorder_duration += workorder.duration_expected + # + # sale_order = self.env['sale.order'].sudo().search([('name', '=', production.origin)]) + # if sale_order: + # bb = sale_order.deadline_of_delivery + # productions = self.env['sf.production.plan'].with_user(SUPERUSER_ID).sudo().with_company(company_id). \ + # create({ + # 'name': production.name, + # 'production_id': production.id, + # 'date_planned_start': production.date_planned_start, + # 'origin': production.origin, + # 'product_qty': production.product_qty, + # 'product_id': production.product_id.id, + # 'state': 'draft', + # }) return True diff --git a/sf_sale/models/quick_easy_order.py b/sf_sale/models/quick_easy_order.py index eed2be57..a6a099b8 100644 --- a/sf_sale/models/quick_easy_order.py +++ b/sf_sale/models/quick_easy_order.py @@ -77,10 +77,10 @@ class QuickEasyOrder(models.Model): model_code = hashlib.sha1(base64_datas.encode('utf-8')).hexdigest() report_path = attachment._full_path(attachment.store_fname) vals['model_file'] = self.transition_glb_file(report_path, model_code) - logging.info('create-model_file:%s' % len(vals['model_file'])) + # logging.info('create-model_file:%s' % len(vals['model_file'])) obj = super(QuickEasyOrder, self).create(vals) - self.model_coloring(obj) + # self.model_coloring(obj) self.distribute_to_factory(obj) obj.state = '待接单' return obj @@ -88,14 +88,14 @@ class QuickEasyOrder(models.Model): # 将attach的datas内容转为glb文件 def transition_glb_file(self, report_path, model_code): shapes = read_step_file(report_path) - # output_file = os.path.join('C:/Users/43484/Desktop/机企猫工作文档', str(model_code) + '.stl') - output_file = os.path.join('/tmp', str(model_code) + '.stl') + output_file = os.path.join('C:/Users/43484/Desktop/机企猫工作文档', str(model_code) + '.stl') + # output_file = os.path.join('/tmp', str(model_code) + '.stl') write_stl_file(shapes, output_file, 'binary', 0.03, 0.5) # 转化为glb - # output_glb_file = os.path.join('C:/Users/43484/Desktop/机企猫工作文档', str(model_code) + '.glb') - output_glb_file = os.path.join('/tmp', str(model_code) + '.glb') + output_glb_file = os.path.join('C:/Users/43484/Desktop/机企猫工作文档', str(model_code) + '.glb') + # output_glb_file = os.path.join('/tmp', str(model_code) + '.glb') util_path = get_resource_path('sf_dlm', 'static/util') - cmd = 'python3 %s/stl2gltf.py %s %s -b' % (util_path, output_file, output_glb_file) + cmd = 'python %s/stl2gltf.py %s %s -b' % (util_path, output_file, output_glb_file) os.system(cmd) # 转base64 with open(output_glb_file, 'rb') as fileObj: @@ -120,17 +120,17 @@ class QuickEasyOrder(models.Model): model_code = hashlib.sha1(base64_datas.encode('utf-8')).hexdigest() logging.info("模型编码: %s" % model_code) item.model_file = self.transition_glb_file(report_path, model_code) - ret = self.feature_recognition(report_path, model_code) - logging.info("自动报价返回值: %s" % ret) - boxshape = ret['boxshape'].tolist() - logging.info("自动报价boxshape: %s" % boxshape) - logging.info('自动报价feature_infos:%s' % ret['feature_infos']) - item.model_length = boxshape[0] # 长 单位mm - item.model_width = boxshape[1] # 宽 - item.model_height = boxshape[2] # 高 - item.model_volume = boxshape[0] * boxshape[1] * boxshape[2] - item.model_feature = json.dumps(ret['feature_infos'], ensure_ascii=False) - self._get_price(item) + # ret = self.feature_recognition(report_path, model_code) + # logging.info("自动报价返回值: %s" % ret) + # boxshape = ret['boxshape'].tolist() + # logging.info("自动报价boxshape: %s" % boxshape) + # logging.info('自动报价feature_infos:%s' % ret['feature_infos']) + # item.model_length = boxshape[0] # 长 单位mm + # item.model_width = boxshape[1] # 宽 + # item.model_height = boxshape[2] # 高 + # item.model_volume = boxshape[0] * boxshape[1] * boxshape[2] + # item.model_feature = json.dumps(ret['feature_infos'], ensure_ascii=False) + # self._get_price(item) else: item.model_file = False item.model_feature = False @@ -151,7 +151,7 @@ class QuickEasyOrder(models.Model): base64_data = base64.b64encode(attachment.datas) base64_datas = base64_data.decode('utf-8') barcode = hashlib.sha1(base64_datas.encode('utf-8')).hexdigest() - logging.info('model_file-size: %s' % len(item.model_file)) + # logging.info('model_file-size: %s' % len(item.model_file)) res['bfm_process_order_list'].append({ 'model_long': item.model_length, 'model_width': item.model_width, diff --git a/sf_sale/views/quick_easy_order_view.xml b/sf_sale/views/quick_easy_order_view.xml index a5ce9da2..df3b25b5 100644 --- a/sf_sale/views/quick_easy_order_view.xml +++ b/sf_sale/views/quick_easy_order_view.xml @@ -16,13 +16,13 @@ quick.easy.order - - + diff --git a/sf_sale/views/sale_order_view.xml b/sf_sale/views/sale_order_view.xml index a8f14c62..f2b59f51 100644 --- a/sf_sale/views/sale_order_view.xml +++ b/sf_sale/views/sale_order_view.xml @@ -1,6 +1,18 @@ + + sale.order.tree + sale.order + + + + + + + + + sale.order.form.inherit.sf sale.order @@ -39,5 +51,22 @@ + + + + sale.order.tree + sale.order + + primary + + + 订单号 + + + 下单时间 + + + + \ No newline at end of file From 69506af2ab0f6825a19644a8edaf20dbea4c1696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?WEB=E8=AE=B8=E4=BD=95=E5=93=B2=5Cxuhez?= Date: Thu, 14 Sep 2023 17:23:50 +0800 Subject: [PATCH 2/9] =?UTF-8?q?sf=E7=9C=8B=E6=9D=BF=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/src/scss/custom_style.scss | 82 ++- .../views/mrp_workcenter_views.xml | 475 +++++++++--------- 2 files changed, 319 insertions(+), 238 deletions(-) diff --git a/jikimo_frontend/static/src/scss/custom_style.scss b/jikimo_frontend/static/src/scss/custom_style.scss index a9f2cee8..9131ea93 100644 --- a/jikimo_frontend/static/src/scss/custom_style.scss +++ b/jikimo_frontend/static/src/scss/custom_style.scss @@ -49,24 +49,29 @@ td.o_required_modifier { display: flex; flex-direction: column; position: absolute; - top: 0; + top: 28px; bottom: 0; - right: 8px; + right: 18px; margin: auto; - height: 34px; + //height: 34px; + height: unset !important; + align-items: center; } .show_state > div { - width: 12px; + width: 20px; height: 12px; border: 1px solid #000 } -.show_state > div:nth-child(2) { - border-top: none; +.show_state > div:nth-child(1) { border-bottom: none; } +.show_state > div:nth-child(2) { + border-top: 1px solid black !important; +} + .oe_kanban_card.kanban_color_2 { background-color: #FF4343 !important; color: #fff; @@ -83,6 +88,11 @@ td.o_required_modifier { color: #fff; } +.my-image div { + width: 122px !important; + height: 122px !important; +} + .my-image img { width: 100%; height: 100%; @@ -148,4 +158,62 @@ td.o_required_modifier { justify-content: flex-start; } -//----------------------------------------------------------- \ No newline at end of file +//----------------------------------------------------------- +div[class="o_content o_component_with_search_panel"] .oe_kanban_color_0 { + position: relative; + padding: 0 !important; +} + +div[class="o_content o_component_with_search_panel"] img[name="equipment_image"] { + width: 150px !important; +} + +div[class="o_content o_component_with_search_panel"] .o_kanban_card_content button { + position: absolute; + top: -52px; + left: -55px; + width: 80px; +} + +div[class="o_content o_component_with_search_panel"] .o_primary > span:nth-of-type(1) { + position: absolute; + top: 10px; + left: 168px; +} + +div[class="o_content o_component_with_search_panel"] .o_primary > span:nth-of-type(2) { + margin-left: 18px; +} + +div[class="o_content o_component_with_search_panel"] .o_kanban_dashboard:not(.o_legacy_kanban_view) .o_kanban_record > div .o_kanban_manage_toggle_button { + top: 10px !important; + right: 17px !important; +} + +div[class="o_content o_component_with_search_panel"] .o_kanban_record_headings .ml8 { + margin-left: 0px !important; +} + +div[class="o_content o_component_with_search_panel"] .o_kanban_dashboard:not(.o_legacy_kanban_view) .o_kanban_record > div .o_kanban_card_content { + min-height: 0 !important; + height: 0 !important; +} + +div[class="o_content o_component_with_search_panel"] .o_kanban_dashboard:not(.o_legacy_kanban_view) .o_kanban_record > div .o_kanban_card_header + .container.o_kanban_card_content { + margin-top: -5px !important; +} + +div[class="o_content o_component_with_search_panel"] .o_kanban_primary_left { + right: 10px; + padding: 0 !important; +} + +div[class="o_content o_component_with_search_panel"] .show_state { + right: 10px !important; + top: 45px !important; +} + +div[class="o_content o_component_with_search_panel"] .show_state span { + margin-top: 10px; + font-size: 12px; +} diff --git a/sf_manufacturing/views/mrp_workcenter_views.xml b/sf_manufacturing/views/mrp_workcenter_views.xml index 48487bfd..a1ea65ec 100644 --- a/sf_manufacturing/views/mrp_workcenter_views.xml +++ b/sf_manufacturing/views/mrp_workcenter_views.xml @@ -24,34 +24,46 @@ - - mrp.workcenter.view.kanban.inherit.mrp.workorder - mrp.workcenter - - - - + + mrp.workcenter.view.kanban.inherit.mrp.workorder + mrp.workcenter + + + + + + + + + - - - - - - - - - - - - - - -
绿色:正常,红色:故障,黄色:下线/暂停
- - -
-
-
+
+ + + +
+
+ + + mrp.workcenter.kanban.inherit + mrp.workcenter + + + +

+

+
+
+ + + +

+
+
+
@@ -118,202 +130,203 @@
- - mrp.workcenter.view.kanban.inherit.maintenance - mrp.workcenter - - - - - - - + + mrp.workcenter.view.kanban.inherit.maintenance + mrp.workcenter + + + + + + + - + - - - - - - - - - - - - - - - - - - - - --> - --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + --> + + --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -342,18 +355,18 @@
- - - mrp.workcenter.inherit - mrp.workcenter - - - - - - - - - + + + mrp.workcenter.inherit + mrp.workcenter + + + + + + + + + From 5fa9d1e16e820c64c9abe8644804abb68417d5bf Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Thu, 14 Sep 2023 18:04:04 +0800 Subject: [PATCH 3/9] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E7=94=9F=E6=88=90?= =?UTF-8?q?=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E5=92=8C=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=8F=A3=EF=BC=9Abfm=E5=88=86=E9=85=8D?= =?UTF-8?q?=E5=B7=A5=E5=8E=82=E6=97=B6=E5=B0=86=E2=80=9C=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E2=80=9D=E5=92=8C=E2=80=9C=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E2=80=9D=E4=BC=A0=E5=88=B0=E8=AF=A5=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=86=85=E7=9A=84=E7=94=9F=E6=88=90=E6=8A=A5=E4=BB=B7?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=96=B9=E6=B3=95=E9=87=8C=202.=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E9=94=80=E5=94=AE=E5=92=8C=E6=8A=A5=E4=BB=B7=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=8F=8A=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=EF=BC=9A?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E2=80=9C=E7=BB=93=E7=AE=97=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E2=80=9D=E5=92=8C=E2=80=9C=E6=94=AF=E4=BB=98=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E2=80=9D=E4=B8=A4=E4=B8=AA=E5=AD=97=E6=AE=B5;=E9=94=80?= =?UTF-8?q?=E5=94=AE=E7=9A=84tree=E5=88=97=E8=A1=A8=E7=9A=84=E2=80=9C?= =?UTF-8?q?=E5=8F=B7=E7=A0=81=E2=80=9D=E6=98=BE=E7=A4=BA=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E2=80=9C=E8=AE=A2=E5=8D=95=E5=8F=B7=E2=80=9D=EF=BC=9B=E6=8A=A5?= =?UTF-8?q?=E4=BB=B7=E7=9A=84tree=E5=88=97=E8=A1=A8=E7=9A=84=E2=80=9C?= =?UTF-8?q?=E5=8F=B7=E7=A0=81=E2=80=9D=E6=98=BE=E7=A4=BA=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E2=80=9C=E8=AE=A2=E5=8D=95=E5=8F=B7=E2=80=9D=EF=BC=8C=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=97=B6=E9=97=B4=E6=94=B9=E4=B8=BA=E2=80=9C=E4=B8=8B?= =?UTF-8?q?=E5=8D=95=E6=97=B6=E9=97=B4=E2=80=9D=203.=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=BF=AB=E9=80=9F=E8=AE=A2=E5=8D=95=EF=BC=9Atree=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=8E=BB=E6=8E=89=E2=80=9C=E8=A1=A8=E9=9D=A2=E5=B7=A5?= =?UTF-8?q?=E8=89=BA=E5=8F=82=E6=95=B0=E2=80=9D=E5=AD=97=E6=AE=B5=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E2=80=9C=E5=88=9B=E5=BB=BA=E4=BA=BA=E2=80=9D?= =?UTF-8?q?=E5=92=8C=E2=80=9C=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4=E2=80=9D?= =?UTF-8?q?2=E4=B8=AA=E5=AD=97=E6=AE=B5=EF=BC=9B=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=96=B0=E5=A2=9E=E2=80=9C=E5=8A=A0=E5=B7=A5?= =?UTF-8?q?=E6=97=B6=E9=95=BF=E2=80=9D=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_bf_connect/controllers/controllers.py | 2 +- sf_dlm/__manifest__.py | 2 +- sf_dlm/views/product_template_view.xml | 11 ++--- sf_maintenance/models/sf_maintenance.py | 18 ++++---- sf_maintenance/views/maintenance_views.xml | 16 ++++---- sf_manufacturing/models/product_template.py | 22 ++++++---- sf_sale/__manifest__.py | 2 +- sf_sale/models/quick_easy_order.py | 2 + sf_sale/models/sale_order.py | 13 +++--- sf_sale/views/quick_easy_order_view.xml | 5 ++- sf_sale/views/sale_order_view.xml | 41 ++++++++++--------- .../static/src/js/3d_viewer.xml | 2 +- 12 files changed, 75 insertions(+), 61 deletions(-) diff --git a/sf_bf_connect/controllers/controllers.py b/sf_bf_connect/controllers/controllers.py index 4442567e..69fb8f30 100644 --- a/sf_bf_connect/controllers/controllers.py +++ b/sf_bf_connect/controllers/controllers.py @@ -27,7 +27,7 @@ class Sf_Bf_Connect(http.Controller): bfm_process_order_list = json.loads(kw['bfm_process_order_list']) order_id = request.env['sale.order'].with_user(request.env.ref("base.user_admin")).sale_order_create( company_id, kw['delivery_name'], kw['delivery_telephone'], kw['delivery_address'], - kw['delivery_end_date']) + kw['delivery_end_date'], kw['payments_way'], kw['pay_way']) i = 1 # 给sale_order的default_code字段赋值 aa = request.env['sale.order'].sudo().search([('name', '=', order_id.name)]) diff --git a/sf_dlm/__manifest__.py b/sf_dlm/__manifest__.py index 20211cde..ed717647 100644 --- a/sf_dlm/__manifest__.py +++ b/sf_dlm/__manifest__.py @@ -11,7 +11,7 @@ 'category': 'sf', 'website': 'https://www.sf.jikimo.com', 'depends': ['mrp', 'base', 'sale', 'sf_manufacturing', 'web_widget_model_viewer', 'mrp_subcontracting', 'purchase_stock', - 'uom'], + 'uom','jikimo_frontend'], 'data': [ 'data/product_data.xml', 'data/uom_data.xml', diff --git a/sf_dlm/views/product_template_view.xml b/sf_dlm/views/product_template_view.xml index 19327a82..dd86fc86 100644 --- a/sf_dlm/views/product_template_view.xml +++ b/sf_dlm/views/product_template_view.xml @@ -336,23 +336,24 @@ - + + widget="custom_many2many_checkboxes"/> - + - + - + diff --git a/sf_maintenance/models/sf_maintenance.py b/sf_maintenance/models/sf_maintenance.py index d66de31e..e71f1bf8 100644 --- a/sf_maintenance/models/sf_maintenance.py +++ b/sf_maintenance/models/sf_maintenance.py @@ -44,11 +44,9 @@ class SfMaintenanceEquipment(models.Model): overhaul_period = fields.Integer(string='预防检修频次') overhaul_duration = fields.Float(string='检修时长') - overhaul_id = fields.Many2one('equipment.maintenance.standards', string='设备检修标准', domain="[('maintenance_type','=','检修')]") - @api.onchange('eq_maintenance_id', 'overhaul_id') def _compute_equipment_maintenance_standards_ids(self): for record in self: @@ -145,7 +143,6 @@ class SfMaintenanceEquipment(models.Model): machine_tool_id = fields.Many2one('sf.machine_tool', '机床') sf_maintenance_logs_ids = fields.One2many('sf.maintenance.logs', 'maintenance_equipment_id', '设备故障日志') - def name_get(self): result = [] for parameter in self: @@ -156,7 +153,6 @@ class SfMaintenanceEquipment(models.Model): result.append((parameter.id, name)) return result - @api.constrains('rotate_speed') def _check_rotate_speed(self): if self.rotate_speed <= 0: @@ -478,14 +474,17 @@ class SfMaintenanceEquipment(models.Model): image_id = fields.Many2many('maintenance.equipment.image', 'equipment_id', string='设备图文') + class MaintenanceStandardImage(models.Model): _name = 'maintenance.equipment.image' - _description = '设备图文展示' - + _description = '能力特征库' active = fields.Boolean('有效', default=True) - name = fields.Char('加工能力') - image = fields.Binary(string='设备图文') + name = fields.Char('名称') + image = fields.Binary(string='图文') + type = fields.Selection( + [('加工能力', '加工能力'), ('刀尖特征', '刀尖特征'), ('柄部类型', '柄部类型'), ('走刀方向', '走刀方向'), ('冷却液', '冷却液')], + string='特征') equipment_id = fields.Many2many('maintenance.equipment', 'image_id', string='设备') @api.model @@ -518,6 +517,3 @@ class MaintenanceStandardImage(models.Model): new_res.append([id, name, data_uri]) # 返回新的结果列表 return new_res - - - diff --git a/sf_maintenance/views/maintenance_views.xml b/sf_maintenance/views/maintenance_views.xml index 5c699af0..e2903d54 100644 --- a/sf_maintenance/views/maintenance_views.xml +++ b/sf_maintenance/views/maintenance_views.xml @@ -381,8 +381,9 @@ maintenance.equipment.image.tree maintenance.equipment.image - + + @@ -394,11 +395,12 @@ maintenance.equipment.image.form maintenance.equipment.image -
+ - - + + + @@ -408,14 +410,14 @@ - 设备图文图文 + 能力特征库 maintenance.equipment.image tree,form [] - - + + + @@ -74,6 +76,7 @@ options="{'format': false}"/> + diff --git a/sf_sale/views/sale_order_view.xml b/sf_sale/views/sale_order_view.xml index 3255a58d..93545342 100644 --- a/sf_sale/views/sale_order_view.xml +++ b/sf_sale/views/sale_order_view.xml @@ -1,17 +1,6 @@ - - sale.order.tree - sale.order - - - - - - - - sale.order.form.inherit.sf @@ -20,6 +9,8 @@ + + sale.order + + 下单日期 + @@ -52,19 +46,28 @@ + + sale.order.quotation.tree.inherit.sf + sale.order + + + + 订单号 + + + 下单时间 + + + - + sale.order.tree sale.order - - primary + - + 订单号 - - - 下单时间 - + diff --git a/web_widget_model_viewer/static/src/js/3d_viewer.xml b/web_widget_model_viewer/static/src/js/3d_viewer.xml index 587c1ac4..73f142c9 100644 --- a/web_widget_model_viewer/static/src/js/3d_viewer.xml +++ b/web_widget_model_viewer/static/src/js/3d_viewer.xml @@ -25,7 +25,7 @@ -
当前制造订单暂无模型
+
暂无模型
From 9e212a2684c85b56c3291b9ed5c3b02d9374feac Mon Sep 17 00:00:00 2001 From: yuxianghui <1608204036@qq.com> Date: Fri, 15 Sep 2023 09:51:53 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=BA=E5=BA=8A?= =?UTF-8?q?=E6=8D=A2=E5=88=80=E7=94=B3=E8=AF=B7=E5=AD=97=E6=AE=B5=E7=8A=B6?= =?UTF-8?q?=E6=80=81=EF=BC=8C=E6=96=B0=E5=A2=9E=E9=80=89=E6=8B=A9=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=8F=90=E7=A4=BA=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_tool_management/models/base.py | 4 ++-- sf_tool_management/views/tool_base_views.xml | 14 +++++++------- sf_tool_management/wizard/wizard_view.xml | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sf_tool_management/models/base.py b/sf_tool_management/models/base.py index 33bc1d4b..9ae2a422 100644 --- a/sf_tool_management/models/base.py +++ b/sf_tool_management/models/base.py @@ -551,7 +551,7 @@ class MachineTableToolChangingApply(models.Model): name = fields.Many2one('maintenance.equipment', string='CNC机床',required=True, readonly=False, group_expand='_read_group_names') - machine_table_type_id = fields.Many2one('sf.machine_tool.category', string='机床类型', readonly=True, + machine_table_type_id = fields.Many2one('maintenance.equipment.category', string='机床类型', readonly=True, compute='_compute_name') machine_tool_code = fields.Char(string='机台号', invisible=True, readonly=True, compute='_compute_name') cutter_spacing_code = fields.Char(string='刀位号', readonly=False) @@ -595,7 +595,7 @@ class MachineTableToolChangingApply(models.Model): def _compute_name(self): for record in self: if record: - record.machine_table_type_id = record.name.machine_tool_category.id + record.machine_table_type_id = record.name.category_id.id record.machine_tool_code = record.name.code @api.depends('functional_tool_name_id') diff --git a/sf_tool_management/views/tool_base_views.xml b/sf_tool_management/views/tool_base_views.xml index 7192c8f0..31b69188 100644 --- a/sf_tool_management/views/tool_base_views.xml +++ b/sf_tool_management/views/tool_base_views.xml @@ -870,7 +870,7 @@

- +

@@ -879,7 +879,7 @@ - + @@ -999,19 +999,19 @@

- +

- + - - + + @@ -1027,7 +1027,7 @@ - + diff --git a/sf_tool_management/wizard/wizard_view.xml b/sf_tool_management/wizard/wizard_view.xml index 4e871807..2c7f1bed 100644 --- a/sf_tool_management/wizard/wizard_view.xml +++ b/sf_tool_management/wizard/wizard_view.xml @@ -23,15 +23,15 @@ - + - + - - + + From 2cc03c21edf115280acc7cdab31ccf6649fb0d21 Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Fri, 15 Sep 2023 10:37:20 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9B=BE=E6=96=87?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/src/scss/custom_style.scss | 14 +++++++++- sf_maintenance/views/maintenance_views.xml | 2 +- .../views/mrp_workcenter_views.xml | 26 ++++++++++++------- sf_plan/views/view.xml | 4 +-- web_gantt/static/src/js/gantt_renderer.js | 2 +- 5 files changed, 34 insertions(+), 14 deletions(-) diff --git a/jikimo_frontend/static/src/scss/custom_style.scss b/jikimo_frontend/static/src/scss/custom_style.scss index a9f2cee8..fdbd674b 100644 --- a/jikimo_frontend/static/src/scss/custom_style.scss +++ b/jikimo_frontend/static/src/scss/custom_style.scss @@ -148,4 +148,16 @@ td.o_required_modifier { justify-content: flex-start; } -//----------------------------------------------------------- \ No newline at end of file +//----------------------------------------------------------- +//图文展示换行及对齐 +.many2many_flex { + flex-wrap: wrap; +} + +.many2many_flex > div { + width: 110px; + margin-right: 15px; + display: flex; + flex-direction: column; + align-items: flex-start; +} \ No newline at end of file diff --git a/sf_maintenance/views/maintenance_views.xml b/sf_maintenance/views/maintenance_views.xml index 5c699af0..cbb063a0 100644 --- a/sf_maintenance/views/maintenance_views.xml +++ b/sf_maintenance/views/maintenance_views.xml @@ -177,7 +177,7 @@ - + diff --git a/sf_manufacturing/views/mrp_workcenter_views.xml b/sf_manufacturing/views/mrp_workcenter_views.xml index 48487bfd..c38613f6 100644 --- a/sf_manufacturing/views/mrp_workcenter_views.xml +++ b/sf_manufacturing/views/mrp_workcenter_views.xml @@ -31,28 +31,36 @@ - - - - - - -
绿色:正常,红色:故障,黄色:下线/暂停
- -
+ + + mrp.workcenter.kanban.inherit + mrp.workcenter + + + +
+
+
+
+
+
+
+
+ diff --git a/sf_plan/views/view.xml b/sf_plan/views/view.xml index 7878fa5f..f7c22624 100644 --- a/sf_plan/views/view.xml +++ b/sf_plan/views/view.xml @@ -35,7 +35,7 @@