Skip to content

Commit

Permalink
[ADD] 添加 access_control_goods 模块,创建创建商品组,组成员可以对商品进行增删改查,普通用户只能查看
Browse files Browse the repository at this point in the history
  • Loading branch information
USI-SHRD committed Jun 28, 2018
1 parent 95f8221 commit 9c8744b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions access_control_goods/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# -*- coding: utf-8 -*-
19 changes: 19 additions & 0 deletions access_control_goods/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
{
'name': "GoodERP Access Control Goods 模块",
'author': "开阖软件",
'website': "http://www.osbzr.com",
'category': 'gooderp',
'summary': 'GoodERP 商品 读写建删权限控制',
"description":
'''
该模块添加了 创建商品组,该组成员可以对商品进行增删改查,普通用户只能查看。
''',
'version': '11.11',
'application': True,
'depends': ['core'],
'data': [
'security/groups.xml',
'security/ir.model.access.csv',
],
}
11 changes: 11 additions & 0 deletions access_control_goods/security/groups.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!--添加创建创建商品组-->
<record id="group_operate_goods_main_data" model="res.groups">
<field name='name'>创建商品</field>
<field name='category_id' ref="core.Gooderp"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
</data>
</openerp>
3 changes: 3 additions & 0 deletions access_control_goods/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
core.access_goods,access_goods_user,core.model_goods,base.group_user,1,0,0,0
access_goods_operator,access_goods_operator,core.model_goods,access_control_goods.group_operate_goods_main_data,1,1,1,1

0 comments on commit 9c8744b

Please sign in to comment.