From 90c499f9c7933cbd13e3c56f231d0897a6ea3227 Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Thu, 22 Feb 2024 18:00:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A5=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E5=B7=A5=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/controllers/controllers.py | 4 +--- sf_manufacturing/models/mrp_workorder.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sf_manufacturing/controllers/controllers.py b/sf_manufacturing/controllers/controllers.py index 95d3cea9..65d116e4 100644 --- a/sf_manufacturing/controllers/controllers.py +++ b/sf_manufacturing/controllers/controllers.py @@ -281,7 +281,6 @@ class Manufacturing_Connect(http.Controller): logging.info('NCProgDolod error:%s' % e) return json.JSONEncoder().encode(res) - @http.route('/AutoDeviceApi/LocationChange', type='json', auth='sf_token', methods=['GET', 'POST'], csrf=False, cors="*") def LocationChange(self, **kw): @@ -344,7 +343,7 @@ class Manufacturing_Connect(http.Controller): """ logging.info('AGVDownProduct:%s' % kw) try: - res = {'Succeed': True, 'Datas': []} + res = {'Succeed': True} datas = request.httprequest.data ret = json.loads(datas) if 'DeviceId' in ret: @@ -361,4 +360,3 @@ class Manufacturing_Connect(http.Controller): res = {'Succeed': False, 'ErrorCode': 202, 'Error': e} logging.info('AGVDownProduct error:%s' % e) return json.JSONEncoder().encode(res) - diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index 056ef240..fa9a438e 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -149,7 +149,7 @@ class ResMrpWorkOrder(models.Model): params = [tomorrow, tomorrow, tomorrow, tomorrow] if production_line: sql += "AND production_line_id = %s" - params.append(production_line) + params.append(production_line) self.env.cr.execute(sql, params) ids = [t[0] for t in self.env.cr.fetchall()] return [('id', 'in', ids)]