开发sf制造模块权限角色

This commit is contained in:
qihao.gong@jikimo.com
2023-11-21 17:42:36 +08:00
parent 580f95f338
commit e6bb5db0e1
13 changed files with 162 additions and 52 deletions

View File

@@ -1 +1 @@
from. import common
from . import common

View File

@@ -8,7 +8,7 @@ class Common(models.Model):
_name = 'sf.sync.common'
_description = u'公用类'
def get_headers(self,token, secret_key):
def get_headers(self, token, secret_key):
'''
获取requests中的heardes参数
'''
@@ -19,5 +19,3 @@ class Common(models.Model):
'TIMESTAMP': str(timestamp),
'checkstr': check_sf_str}
return headers

View File

@@ -1,4 +1,37 @@
<odoo>
<data>
<record id="group_sf_mrp_user" model="res.groups">
<field name="name">制造普通用户</field>
<field name="category_id" ref="base.module_category_manufacturing_manufacturing"/>
</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"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
</record>
<record id="group_sf_equipment_user" 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_tool_user" 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_order_user" 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>
<field name="implied_ids" eval="[(4, ref('group_sf_mrp_manager'))]"/>
<field name="category_id" ref="base.module_category_manufacturing_manufacturing"/>
</record>
</data>
</odoo>