修改设备生成名称规则,修改制造模块权限组定义
This commit is contained in:
@@ -3,11 +3,12 @@
|
||||
<record id="group_sf_mrp_user" model="res.groups">
|
||||
<field name="name">制造普通用户</field>
|
||||
<field name="category_id" ref="base.module_category_manufacturing_manufacturing"/>
|
||||
<field name="implied_ids" eval="[(4, ref('mrp.group_mrp_user'))]"/>
|
||||
</record>
|
||||
<!-- <record id="group_sf_mrp_manager" model="res.groups">-->
|
||||
<!-- <field name="name">制造管理用户</field>-->
|
||||
<!-- <field name="implied_ids" eval="[(4, ref('group_sf_mrp_user'))]"/>-->
|
||||
<!-- <field name="category_id" ref="base.module_category_manufacturing_manufacturing"/>-->
|
||||
|
||||
<!-- </record>-->
|
||||
<!-- <record id="group_sf_mrp_manager" model="res.groups">-->
|
||||
<!-- <field name="name">制造管理用户</field>-->
|
||||
|
||||
@@ -40,3 +40,5 @@ access_maintenance_equipment_image,maintenance_equipment_image,model_maintenance
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -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
|
||||
|
||||
# 在创建设备之后执行一些自定义逻辑
|
||||
# ...
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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__)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user