Accept Merge Request #1060: (hotfix/修复工件上下产线 -> develop)
Merge Request: 修复工件上下产线 Created By: @杨金灵 Reviewed By: @马广威 Approved By: @马广威 Accepted By: @杨金灵 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1060
This commit is contained in:
@@ -470,7 +470,7 @@ class Manufacturing_Connect(http.Controller):
|
|||||||
'制造订单产线状态:%s' % order.production_id.production_line_state)
|
'制造订单产线状态:%s' % order.production_id.production_line_state)
|
||||||
order.production_id.write({'production_line_state': '已上产线'})
|
order.production_id.write({'production_line_state': '已上产线'})
|
||||||
workpiece_delivery = request.env['sf.workpiece.delivery'].sudo().search([
|
workpiece_delivery = request.env['sf.workpiece.delivery'].sudo().search([
|
||||||
('rfid_code', '=', rfid_code),
|
('rfid_code', '=', rfid_code), ('type', '=', '上产线'),
|
||||||
('production_id', '=', order.production_id.id)])
|
('production_id', '=', order.production_id.id)])
|
||||||
if workpiece_delivery.status == '待下发':
|
if workpiece_delivery.status == '待下发':
|
||||||
workpiece_delivery.write({'is_manual_work': True})
|
workpiece_delivery.write({'is_manual_work': True})
|
||||||
@@ -525,7 +525,7 @@ class Manufacturing_Connect(http.Controller):
|
|||||||
'制造订单产线状态:%s' % order.production_id.production_line_state)
|
'制造订单产线状态:%s' % order.production_id.production_line_state)
|
||||||
order.production_id.write({'production_line_state': '已下产线'})
|
order.production_id.write({'production_line_state': '已下产线'})
|
||||||
workpiece_delivery = request.env['sf.workpiece.delivery'].sudo().search([
|
workpiece_delivery = request.env['sf.workpiece.delivery'].sudo().search([
|
||||||
('rfid_code', '=', rfid_code),
|
('rfid_code', '=', rfid_code), ('type', '=', '下产线'),
|
||||||
('production_id', '=', order.production_id.id)])
|
('production_id', '=', order.production_id.id)])
|
||||||
delivery_Arr.append(workpiece_delivery.id)
|
delivery_Arr.append(workpiece_delivery.id)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class AgvSetting(models.Model):
|
|||||||
center_control_url += str(timestamp)
|
center_control_url += str(timestamp)
|
||||||
logging.info('工件配送-请求中控地址:%s' % center_control_url)
|
logging.info('工件配送-请求中控地址:%s' % center_control_url)
|
||||||
try:
|
try:
|
||||||
center_control_r = requests.get(center_control_url, headers=headers, timeout=60) # 设置超时为60秒
|
center_control_r = requests.get(center_control_url, headers=headers, timeout=10) # 设置超时为60秒
|
||||||
ret = center_control_r.json()
|
ret = center_control_r.json()
|
||||||
logging.info('工件配送-请求中控站点信息:%s' % ret)
|
logging.info('工件配送-请求中控站点信息:%s' % ret)
|
||||||
self.env['center_control.interface.log'].sudo().create(
|
self.env['center_control.interface.log'].sudo().create(
|
||||||
|
|||||||
@@ -492,7 +492,7 @@ class StockPicking(models.Model):
|
|||||||
|
|
||||||
# 设置外协出入单的名称
|
# 设置外协出入单的名称
|
||||||
def _get_name_Res(self, rescode):
|
def _get_name_Res(self, rescode):
|
||||||
last_picking = self.sudo().search([('name', 'like', rescode)], order='create_date DESC', limit=1)
|
last_picking = self.sudo().search([('name', 'like', rescode)], order='create_date desc,id desc', limit=1)
|
||||||
if not last_picking:
|
if not last_picking:
|
||||||
num = "%04d" % 1
|
num = "%04d" % 1
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user