修复日计划工单

This commit is contained in:
jinling.yang
2024-02-22 18:00:16 +08:00
parent e6bef9d1ab
commit 90c499f9c7
2 changed files with 2 additions and 4 deletions

View File

@@ -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)

View File

@@ -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)]