From 64c66f12720ca2911d5ca16964b96e3390346644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=A7?= Date: Fri, 27 Sep 2024 15:18:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_message/controllers/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sf_message/controllers/main.py b/sf_message/controllers/main.py index 01c5785c..ab97816b 100644 --- a/sf_message/controllers/main.py +++ b/sf_message/controllers/main.py @@ -8,15 +8,16 @@ from odoo.addons.sf_base.commons.common import Common _logger = logging.getLogger(__name__) -class Message_Sf_Mrs_Connect(Sf_Mrs_Connect): +class MessageSfMrsConnect(Sf_Mrs_Connect): @http.route('/api/cnc_processing/create', type='json', auth='sf_token', methods=['GET', 'POST'], csrf=False, cors="*") def get_cnc_processing_create(self, **kw): - res = super(Message_Sf_Mrs_Connect, self).get_cnc_processing_create(**kw) + res = super(MessageSfMrsConnect, self).get_cnc_processing_create(**kw) res = json.loads(res) if res.get('production_ids'): try: + _logger.info('已编程的制造订单:%s' % res.get('production_ids')) productions = request.env['mrp.production'].sudo().search([('id', 'in', res.get('production_ids'))]) # 过滤programming_state为已编程,tool_state为2的制造订单 tool_state_valid_productions = productions.filtered(lambda x: x.programming_state == '已编程' and x.tool_state == '2')