放开依赖

This commit is contained in:
qihao.gong@jikimo.com
2023-11-20 15:39:07 +08:00
parent 1da7a0195d
commit 499261f62e
3 changed files with 16 additions and 16 deletions

View File

@@ -3,8 +3,8 @@ from odoo import models, fields, api, _
from odoo.exceptions import ValidationError
from odoo.modules import get_resource_path
from odoo.addons.sf_base.commons.common import Common
#from OCC.Extend.DataExchange import read_step_file
#from OCC.Extend.DataExchange import write_stl_file
from OCC.Extend.DataExchange import read_step_file
from OCC.Extend.DataExchange import write_stl_file
import logging
import base64
import hashlib

View File

@@ -2,7 +2,7 @@
import logging
from odoo.modules import get_resource_path
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'
_logger = logging.getLogger(__name__)
@@ -24,14 +24,14 @@ class AutoQuatotion(models.Model):
def get_process_time_db_path(self):
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):
# '''
# 通过打包好的.so库
# 以调用autoQuatotion库中Quatotion类
# 初始化后调用类的analyseShape方法对模型文件进行价格预测
# '''
# # 初始化自动报价类(输入特征数据库和加工时间数据库)
# reader = auto_quatotion.Quatotion(feature_full_path, process_time_db_path)
# # 获取价格、加工时间、尺寸、XYZ、翻面次数
# feature_info = reader.analyseShape(stp_url, InfoJson={})
# return feature_info
def get_auto_quatotion(self, stp_url, feature_full_path, process_time_db_path, model_code):
'''
通过打包好的.so库
以调用autoQuatotion库中Quatotion类
初始化后调用类的analyseShape方法对模型文件进行价格预测
'''
# 初始化自动报价类(输入特征数据库和加工时间数据库)
reader = auto_quatotion.Quatotion(feature_full_path, process_time_db_path)
# 获取价格、加工时间、尺寸、XYZ、翻面次数
feature_info = reader.analyseShape(stp_url, InfoJson={})
return feature_info

View File

@@ -1,7 +1,7 @@
from odoo import models, fields, api
from odoo.modules import get_resource_path
#from OCC.Extend.DataExchange import read_step_file
#from OCC.Extend.DataExchange import write_stl_file
from OCC.Extend.DataExchange import read_step_file
from OCC.Extend.DataExchange import write_stl_file
from odoo.exceptions import ValidationError, UserError
from odoo.addons.sf_base.commons.common import Common
from datetime import datetime