From 78a9c59cde971695cb57d4eab226656acb2fa378 Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Tue, 14 Jan 2025 16:03:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E4=BD=BF=E7=94=A8recordset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_mrs_connect/controllers/controllers.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sf_mrs_connect/controllers/controllers.py b/sf_mrs_connect/controllers/controllers.py index a0cf39ca..dbf485a1 100644 --- a/sf_mrs_connect/controllers/controllers.py +++ b/sf_mrs_connect/controllers/controllers.py @@ -162,7 +162,7 @@ class Sf_Mrs_Connect(http.Controller, MultiInheritController): logging.info('已创建重置状态的编程记录:%s' % production.name) elif ret['manufacturing_type'] == 'rework': logging.info('返工') - rework_id = production.programming_record_ids.create({ + rework_record_ids_obj = production.programming_record_ids.create({ 'number': len(production.programming_record_ids) + 1, 'production_id': production.id, 'reason': '返工', @@ -173,7 +173,6 @@ class Sf_Mrs_Connect(http.Controller, MultiInheritController): 'send_time': ret['send_time'], }) logging.info('已创建返工的编程记录:%s' % production.name) - rework_record_ids_obj = request.env['sf.programming.record'].sudo().browse(rework_id) logging.info('rework_record_ids_obj====:%s' % rework_record_ids_obj) rework_production_id = production.id logging.info('rework_production_id====:%s' % rework_production_id)