新增销售权限
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
""",
|
""",
|
||||||
'category': 'sf',
|
'category': 'sf',
|
||||||
'website': 'https://www.sf.jikimo.com',
|
'website': 'https://www.sf.jikimo.com',
|
||||||
'depends': ['account', 'base', 'mrp_workorder', 'sale', 'purchase'],
|
'depends': ['account', 'base', 'mrp_workorder', 'sale', 'purchase', 'sales_team'],
|
||||||
'data': [
|
'data': [
|
||||||
'security/group_security.xml',
|
'security/group_security.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
|
|||||||
@@ -5,17 +5,16 @@
|
|||||||
<field name="sequence">20</field>
|
<field name="sequence">20</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="sales_team.group_sale_manager" model="res.groups">
|
<record id="group_sale_manager" model="res.groups">
|
||||||
<field name="name">销售经理</field>
|
<field name="name">销售经理</field>
|
||||||
<field name="category_id" ref="base.module_category_sales_sales"/>
|
<field name="category_id" ref="base.module_category_sales_sales"/>
|
||||||
<!-- <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>-->
|
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- <record id="group_sale_director" model="res.groups">-->
|
<record id="group_sale_director" model="res.groups">
|
||||||
<!-- <field name="name">销售总监</field>-->
|
<field name="name">销售总监</field>
|
||||||
<!-- <field name="category_id" ref="base.module_category_sales_sales"/>-->
|
<field name="category_id" ref="base.module_category_sales_sales"/>
|
||||||
<!-- <field name="implied_ids" eval="[(4, ref('sf_base.group_sale_manager'))]"/>-->
|
<field name="implied_ids" eval="[(4, ref('sf_base.group_sale_manager'))]"/>
|
||||||
<!-- </record>-->
|
</record>
|
||||||
|
|
||||||
<record id="group_plan_dispatch" model="res.groups">
|
<record id="group_plan_dispatch" model="res.groups">
|
||||||
<field name="name">计划调度岗</field>
|
<field name="name">计划调度岗</field>
|
||||||
|
|||||||
@@ -6,9 +6,8 @@ import os
|
|||||||
from odoo import models, fields, api, _
|
from odoo import models, fields, api, _
|
||||||
from odoo.exceptions import ValidationError
|
from odoo.exceptions import ValidationError
|
||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
from OCC.Extend.DataExchange import read_step_file
|
# from OCC.Extend.DataExchange import read_step_file
|
||||||
from OCC.Extend.DataExchange import write_stl_file
|
# from OCC.Extend.DataExchange import write_stl_file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import os
|
|||||||
import json
|
import json
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import requests
|
import requests
|
||||||
from OCC.Extend.DataExchange import read_step_file
|
# from OCC.Extend.DataExchange import read_step_file
|
||||||
from OCC.Extend.DataExchange import write_stl_file
|
# from OCC.Extend.DataExchange import write_stl_file
|
||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
from odoo.exceptions import ValidationError, UserError
|
from odoo.exceptions import ValidationError, UserError
|
||||||
@@ -93,9 +93,9 @@ class QuickEasyOrder(models.Model):
|
|||||||
|
|
||||||
# 将attach的datas内容转为glb文件
|
# 将attach的datas内容转为glb文件
|
||||||
def transition_glb_file(self, report_path, model_code):
|
def transition_glb_file(self, report_path, model_code):
|
||||||
shapes = read_step_file(report_path)
|
# shapes = read_step_file(report_path)
|
||||||
output_file = os.path.join('/tmp', str(model_code) + '.stl')
|
output_file = os.path.join('/tmp', str(model_code) + '.stl')
|
||||||
write_stl_file(shapes, output_file, 'binary', 0.03, 0.5)
|
# write_stl_file(shapes, output_file, 'binary', 0.03, 0.5)
|
||||||
# 转化为glb
|
# 转化为glb
|
||||||
output_glb_file = os.path.join('/tmp', str(model_code) + '.glb')
|
output_glb_file = os.path.join('/tmp', str(model_code) + '.glb')
|
||||||
util_path = get_resource_path('sf_base', 'static/util')
|
util_path = get_resource_path('sf_base', 'static/util')
|
||||||
|
|||||||
Reference in New Issue
Block a user