From 54a08802d9f4d649c87c441a9251633dc67f9857 Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Thu, 9 May 2024 10:45:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A3=85=E5=A4=B9?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_workorder.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index 817e6421..4bb54548 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -643,10 +643,13 @@ class ResMrpWorkOrder(models.Model): def _compute_state(self): for workorder in self: if workorder.routing_type == '装夹预调': - if not workorder.cnc_ids: + cnc_workorder = self.search( + [('production_id', '=', workorder.production_id.id), ('routing_type', '=', 'CNC加工')], + limit=1, order='id asc') + if not cnc_workorder: workorder.state = 'waiting' else: - for item in workorder.cnc_ids: + for item in cnc_workorder.cnc_ids: functional_cutting_tool = self.env['sf.functional.cutting.tool.entity'].search( [('tool_name_id.name', '=', item.cutting_tool_name)]) if not functional_cutting_tool: From 1a63f82f4b458d9882b4e5b14d8168ff96bb8b07 Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Thu, 9 May 2024 11:04:59 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BC=98=E5=8C=96agv=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E4=B8=AD=E6=8E=A7=E6=8E=A5=E9=A9=B3=E7=AB=99=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/agv_setting.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sf_manufacturing/models/agv_setting.py b/sf_manufacturing/models/agv_setting.py index d0104bc3..8526627c 100644 --- a/sf_manufacturing/models/agv_setting.py +++ b/sf_manufacturing/models/agv_setting.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import requests import logging +import time from odoo import fields, models @@ -21,10 +22,15 @@ class AgvSetting(models.Model): config = self.env['res.config.settings'].get_values() # token = sf_sync_config['token'Ba F2CF5DCC-1A00-4234-9E95-65603F70CC8A] headers = {'Authorization': config['center_control_Authorization']} - center_control_url = config['center_control_url'] + "/AutoDeviceApi/GetAgvStationState" + center_control_url = config['center_control_url'] + "/AutoDeviceApi/GetAgvStationState?date=" + timestamp = int(time.time()) + center_control_url += str(timestamp) + logging.info('工件配送-请求中控地址:%s' % center_control_url) center_control_r = requests.get(center_control_url, params={}, headers=headers) ret = center_control_r.json() logging.info('工件配送-请求中控站点信息:%s' % ret) + self.env['center_control.interface.log'].sudo().create( + {'content': ret, 'name': 'AutoDeviceApi/GetAgvStationState?date=%s' % str(timestamp)}) if ret['Succeed'] is True: datas = ret['Datas'] for item in self: From f3c98c972774f05af9a9bec8edcaf2fe4c300491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E7=84=B1?= Date: Thu, 9 May 2024 11:18:01 +0800 Subject: [PATCH 3/3] =?UTF-8?q?//=20=E4=BF=AE=E6=94=B9=20=E3=80=90?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=8E=92=E7=A8=8B=E3=80=91=E3=80=90=E9=85=8D?= =?UTF-8?q?=E9=80=81=E3=80=91=20=E6=8C=89=E9=92=AEUI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jikimo_frontend/static/src/scss/custom_style.scss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jikimo_frontend/static/src/scss/custom_style.scss b/jikimo_frontend/static/src/scss/custom_style.scss index 73d5ce96..b70cc749 100644 --- a/jikimo_frontend/static/src/scss/custom_style.scss +++ b/jikimo_frontend/static/src/scss/custom_style.scss @@ -496,4 +496,11 @@ div:has(.o_required_modifier) > label::before { .o_field_widget.o_readonly_modifier.o_required_modifier.o_field_many2one[name=production_id] .o_form_uri { font-weight: bold; font-size: 20px; +} + +// 修改 【批量排程】【配送】 按钮UI +.btn-secondary { + color: #fff; + background-color: #4A4F59; + border-color: #4A4F59; } \ No newline at end of file