修改coding代码扫描警告
This commit is contained in:
@@ -3,9 +3,7 @@ import os
|
|||||||
import time
|
import time
|
||||||
import json
|
import json
|
||||||
import base64
|
import base64
|
||||||
import shutil
|
|
||||||
import logging
|
import logging
|
||||||
import hashlib
|
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from zipfile import ZipFile
|
from zipfile import ZipFile
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
@@ -13,8 +11,6 @@ import requests
|
|||||||
from odoo.http import request
|
from odoo.http import request
|
||||||
from odoo import fields, models, api, _
|
from odoo import fields, models, api, _
|
||||||
from odoo.exceptions import UserError
|
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
|
from odoo.addons.sf_machine_connect.models import py2opcua, ftp_operate
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
from ftplib import FTP
|
from ftplib import FTP
|
||||||
|
|
||||||
@@ -20,7 +19,6 @@ class FTP_P(FTP):
|
|||||||
cmd = 'LIST'
|
cmd = 'LIST'
|
||||||
templist = []
|
templist = []
|
||||||
tempdic = {}
|
tempdic = {}
|
||||||
func = None
|
|
||||||
if args[-1:] and type(args[-1]) != type(''):
|
if args[-1:] and type(args[-1]) != type(''):
|
||||||
args, func = args[:-1], args[-1]
|
args, func = args[:-1], args[-1]
|
||||||
for arg in args:
|
for arg in args:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*-coding:utf-8-*-
|
# -*-coding:utf-8-*-
|
||||||
from odoo import api, fields, models, SUPERUSER_ID, _
|
from odoo import api, fields, models
|
||||||
from odoo.exceptions import UserError
|
|
||||||
|
|
||||||
|
|
||||||
class SfEquipmentSaintenanceStandards(models.Model):
|
class SfEquipmentSaintenanceStandards(models.Model):
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import json
|
import json
|
||||||
import base64
|
import base64
|
||||||
from datetime import date, datetime, timedelta
|
from datetime import timedelta
|
||||||
import requests
|
import requests
|
||||||
from odoo.addons.sf_base.commons.common import Common
|
from odoo.addons.sf_base.commons.common import Common
|
||||||
from odoo import api, fields, models, SUPERUSER_ID, _
|
from odoo import api, fields, models, _
|
||||||
from odoo.exceptions import UserError
|
from odoo.exceptions import UserError
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import base64
|
import base64
|
||||||
|
|
||||||
from odoo import api, fields, models, SUPERUSER_ID, _
|
from odoo import api, fields, models, _
|
||||||
from odoo.exceptions import UserError
|
from odoo.exceptions import UserError
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -41,14 +41,6 @@
|
|||||||
],
|
],
|
||||||
'qweb': [
|
'qweb': [
|
||||||
],
|
],
|
||||||
'assets': {
|
|
||||||
'web.assets_backend': [
|
|
||||||
'sf_manufacturing/static/src/js/kanban_change.js',
|
|
||||||
'sf_manufacturing/static/src/scss/kanban_change.scss',
|
|
||||||
'sf_manufacturing/static/src/xml/kanban_change.xml',
|
|
||||||
],
|
|
||||||
|
|
||||||
},
|
|
||||||
'license': 'LGPL-3',
|
'license': 'LGPL-3',
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'application': False,
|
'application': False,
|
||||||
|
|||||||
@@ -616,7 +616,7 @@ class CNCprocessing(models.Model):
|
|||||||
logging.info('folder_name:%s' % folder_name)
|
logging.info('folder_name:%s' % folder_name)
|
||||||
serverdir = os.path.join('/tmp', folder_name, 'return', processing_panel)
|
serverdir = os.path.join('/tmp', folder_name, 'return', processing_panel)
|
||||||
logging.info('serverdir:%s' % serverdir)
|
logging.info('serverdir:%s' % serverdir)
|
||||||
for root, dirs, files in os.walk(serverdir):
|
for root, files in os.walk(serverdir):
|
||||||
for f in files:
|
for f in files:
|
||||||
logging.info('f:%s' % f)
|
logging.info('f:%s' % f)
|
||||||
if os.path.splitext(f)[1] == ".pdf":
|
if os.path.splitext(f)[1] == ".pdf":
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import logging
|
import logging
|
||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
from odoo import fields, models, api
|
from odoo import fields, models, api
|
||||||
# from quatotion import readSql, feature_recognize, auto_quatotion
|
from quatotion import readSql, feature_recognize, auto_quatotion
|
||||||
|
|
||||||
__author__ = 'jinling.yang'
|
__author__ = 'jinling.yang'
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
@@ -24,14 +24,14 @@ class AutoQuatotion(models.Model):
|
|||||||
def get_process_time_db_path(self):
|
def get_process_time_db_path(self):
|
||||||
return get_resource_path('sf_sale', 'models', 'process_time.db')
|
return get_resource_path('sf_sale', 'models', 'process_time.db')
|
||||||
|
|
||||||
# def get_auto_quatotion(self, stp_url, feature_full_path, process_time_db_path, model_code):
|
def get_auto_quatotion(self, stp_url, feature_full_path, process_time_db_path, model_code):
|
||||||
# '''
|
'''
|
||||||
# 通过打包好的.so库,
|
通过打包好的.so库,
|
||||||
# 以调用autoQuatotion库中Quatotion类,
|
以调用autoQuatotion库中Quatotion类,
|
||||||
# 初始化后调用类的analyseShape方法对模型文件进行价格预测
|
初始化后调用类的analyseShape方法对模型文件进行价格预测
|
||||||
# '''
|
'''
|
||||||
# # 初始化自动报价类(输入特征数据库和加工时间数据库)
|
# 初始化自动报价类(输入特征数据库和加工时间数据库)
|
||||||
# reader = auto_quatotion.Quatotion(feature_full_path, process_time_db_path)
|
reader = auto_quatotion.Quatotion(feature_full_path, process_time_db_path)
|
||||||
# # 获取价格、加工时间、尺寸、XYZ、翻面次数
|
# 获取价格、加工时间、尺寸、XYZ、翻面次数
|
||||||
# feature_info = reader.analyseShape(stp_url, InfoJson={})
|
feature_info = reader.analyseShape(stp_url, InfoJson={})
|
||||||
# return feature_info
|
return feature_info
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
'website': 'https://www.sf.jikimo.com',
|
'website': 'https://www.sf.jikimo.com',
|
||||||
'depends': ['sf_base', 'sf_manufacturing'],
|
'depends': ['sf_base', 'sf_manufacturing'],
|
||||||
'data': [
|
'data': [
|
||||||
# 'security/group_security.xml',
|
'security/group_security.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
# 'views/tool_base_views.xml',
|
# 'views/tool_base_views.xml',
|
||||||
# # 'views/menu_view.xml',
|
# # 'views/menu_view.xml',
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import logging
|
from odoo import api, fields, models
|
||||||
from odoo import SUPERUSER_ID, _, api, fields, models
|
|
||||||
from odoo.osv import expression
|
from odoo.osv import expression
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ try:
|
|||||||
import httpagentparser
|
import httpagentparser
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
from time import gmtime, strftime
|
|
||||||
from odoo.addons.web.controllers import home
|
from odoo.addons.web.controllers import home
|
||||||
from odoo.http import request
|
from odoo.http import request
|
||||||
from odoo.exceptions import Warning
|
from odoo.exceptions import Warning
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from odoo import models, fields, api, _
|
from odoo import models, fields
|
||||||
|
|
||||||
|
|
||||||
class LoginImage(models.Model):
|
class LoginImage(models.Model):
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from odoo import api, fields, models, modules
|
from odoo import api, fields, models
|
||||||
|
|
||||||
|
|
||||||
class ResConfigSettings(models.TransientModel):
|
class ResConfigSettings(models.TransientModel):
|
||||||
|
|||||||
@@ -8,11 +8,9 @@ import werkzeug.exceptions
|
|||||||
import werkzeug.utils
|
import werkzeug.utils
|
||||||
import werkzeug.wrappers
|
import werkzeug.wrappers
|
||||||
import werkzeug.wsgi
|
import werkzeug.wsgi
|
||||||
from werkzeug.urls import url_parse
|
|
||||||
|
|
||||||
from odoo import http
|
from odoo import http
|
||||||
from odoo.http import content_disposition, request
|
from odoo.http import request
|
||||||
from odoo.tools.safe_eval import safe_eval, time
|
|
||||||
from odoo.addons.web.controllers.report import ReportController
|
from odoo.addons.web.controllers.report import ReportController
|
||||||
from ..models.common import Common
|
from ..models.common import Common
|
||||||
|
|
||||||
|
|||||||
@@ -18,4 +18,4 @@ class Common(models.Model):
|
|||||||
tsclibrary.printlabelW("0", "1");
|
tsclibrary.printlabelW("0", "1");
|
||||||
tsclibrary.closeport();
|
tsclibrary.closeport();
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise UserWarning("错误警告")
|
raise UserWarning("错误警告:%s" % e)
|
||||||
|
|||||||
Reference in New Issue
Block a user