测试优化代码后的代码扫描效果,优化部分代码审查问题
This commit is contained in:
@@ -1,22 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import base64
|
||||
import logging
|
||||
import os
|
||||
import json
|
||||
import hashlib
|
||||
import time
|
||||
import requests
|
||||
from datetime import datetime, timedelta
|
||||
from odoo.http import request
|
||||
from odoo import fields, models, api, _
|
||||
from odoo.exceptions import ValidationError
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.addons.sf_machine_connect.models import py2opcua, ftp_operate
|
||||
|
||||
import json
|
||||
import base64
|
||||
import shutil
|
||||
import logging
|
||||
import hashlib
|
||||
from io import BytesIO
|
||||
from zipfile import ZipFile
|
||||
from datetime import datetime, timedelta
|
||||
import requests
|
||||
from odoo.http import request
|
||||
from odoo import fields, models, api, _
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.exceptions import MissingError
|
||||
from odoo.exceptions import ValidationError
|
||||
from odoo.addons.sf_machine_connect.models import py2opcua, ftp_operate
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -514,7 +513,6 @@ class WorkCenterBarcode(models.Model):
|
||||
print('111111111111111111111')
|
||||
workorder_obj_target = self.env['mrp.workorder'].sudo().search([('tray_code', '=', barcode)])
|
||||
workorder_obj_current = self.env['mrp.workorder'].sudo().search([('id', '=', kwargs['current_id'])])
|
||||
# workorder_cnc = self.env['mrp.workorder'].sudo().search(['&', ('production_id', '=', workorder_obj.production_id.id), ('name', '=', 'CNC加工')])
|
||||
workorder_cnc = self.env['mrp.workorder'].sudo().search(
|
||||
['&', ('production_id', '=', workorder_obj_target.production_id.id),
|
||||
('name', '=', workorder_obj_current.name)])
|
||||
|
||||
Reference in New Issue
Block a user