diff --git a/sf_base/security/group_security.xml b/sf_base/security/group_security.xml index 60daf15e..d727278a 100644 --- a/sf_base/security/group_security.xml +++ b/sf_base/security/group_security.xml @@ -3,11 +3,12 @@ 制造普通用户 + - + diff --git a/sf_base/security/ir.model.access.csv b/sf_base/security/ir.model.access.csv index 37daa2b3..1a550d41 100644 --- a/sf_base/security/ir.model.access.csv +++ b/sf_base/security/ir.model.access.csv @@ -40,3 +40,5 @@ access_maintenance_equipment_image,maintenance_equipment_image,model_maintenance + + diff --git a/sf_maintenance/models/sf_maintenance.py b/sf_maintenance/models/sf_maintenance.py index a46f7f69..d4aa6ba4 100644 --- a/sf_maintenance/models/sf_maintenance.py +++ b/sf_maintenance/models/sf_maintenance.py @@ -158,10 +158,8 @@ class SfMaintenanceEquipment(models.Model): def create(self, vals): # 在创建设备之前执行一些自定义逻辑 - vals.name = vals.MTcode + '#' + vals.type_id.name - - equipment = super(SfMaintenanceEquipment, self).create(vals) + equipment.name = equipment.MTcode + '#' + equipment.category_id.name # 在创建设备之后执行一些自定义逻辑 # ... diff --git a/sf_manufacturing/models/product_template.py b/sf_manufacturing/models/product_template.py index ea0841ad..73d3d4aa 100644 --- a/sf_manufacturing/models/product_template.py +++ b/sf_manufacturing/models/product_template.py @@ -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 diff --git a/sf_sale/models/auto_quatotion_common.py b/sf_sale/models/auto_quatotion_common.py index 1b29c6d2..09ea3f0f 100644 --- a/sf_sale/models/auto_quatotion_common.py +++ b/sf_sale/models/auto_quatotion_common.py @@ -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__) diff --git a/sf_sale/models/quick_easy_order.py b/sf_sale/models/quick_easy_order.py index 310bbc7a..e9f152a8 100644 --- a/sf_sale/models/quick_easy_order.py +++ b/sf_sale/models/quick_easy_order.py @@ -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