新增采购权限组
This commit is contained in:
@@ -65,5 +65,15 @@
|
|||||||
<field name="category_id" ref="module_category_plan"/>
|
<field name="category_id" ref="module_category_plan"/>
|
||||||
<field name="implied_ids" eval="[(4, ref('sf_base.group_plan_dispatch'))]"/>
|
<field name="implied_ids" eval="[(4, ref('sf_base.group_plan_dispatch'))]"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="group_purchase" model="res.groups">
|
||||||
|
<field name="name">采购岗</field>
|
||||||
|
<field name="category_id" ref="base.module_category_inventory_purchase"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="group_purchase_director" model="res.groups">
|
||||||
|
<field name="name">采购总监</field>
|
||||||
|
<field name="category_id" ref="base.module_category_inventory_purchase"/>
|
||||||
|
</record>
|
||||||
</data>
|
</data>
|
||||||
</odoo>
|
</odoo>
|
||||||
@@ -6,8 +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
|
||||||
|
|
||||||
|
|
||||||
class ResProductMo(models.Model):
|
class ResProductMo(models.Model):
|
||||||
@@ -94,7 +94,7 @@ class ResProductMo(models.Model):
|
|||||||
domain=[('type', '=', '加工能力')])
|
domain=[('type', '=', '加工能力')])
|
||||||
blade_tip_characteristics_id = fields.Many2one('maintenance.equipment.image', '刀尖特征',
|
blade_tip_characteristics_id = fields.Many2one('maintenance.equipment.image', '刀尖特征',
|
||||||
domain=[('type', '=', '刀尖特征')])
|
domain=[('type', '=', '刀尖特征')])
|
||||||
handle_type_id = fields.Many2one('maintenance.equipment.image', '柄部类型',domain=[('type', '=', '柄部类型')])
|
handle_type_id = fields.Many2one('maintenance.equipment.image', '柄部类型', domain=[('type', '=', '柄部类型')])
|
||||||
cutting_direction_ids = fields.Many2many('maintenance.equipment.image', 'rel_cutting_product_template',
|
cutting_direction_ids = fields.Many2many('maintenance.equipment.image', 'rel_cutting_product_template',
|
||||||
'走刀方向', domain=[('type', '=', '走刀方向')])
|
'走刀方向', domain=[('type', '=', '走刀方向')])
|
||||||
suitable_coolant_ids = fields.Many2many('maintenance.equipment.image', 'rel_coolant_product_template',
|
suitable_coolant_ids = fields.Many2many('maintenance.equipment.image', 'rel_coolant_product_template',
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user