odoo 权限分配

创建角色组分类

维保单位 10

理解base.group_user 是内部用户,是所有内部用户基础,base.group_system 也是继承它

创建角色组

基础用户 维保单位-基础 维保单位-管理员 维保单位-普通人员

创建模型

class Lift(models.Model):
_name = 'tw.base.lift'
_description = "电梯台账"
_order = 'id desc'

uuid = fields.Char(string=u"多方唯一电梯识别")
code = fields.Char(string=u"救援编号", size=100, index=True)
en_code = fields.Char(string=u"加密编号", index=True)
device_code = fields.Char(string=u"设备代码", size=100, index=True)
factory_number = fields.Char(string=u'出厂编号', size=50)
lift_img = fields.Char(u"电梯照片")
use_address = fields.Char(string=u'电梯地址', size=100)

设计模型界面


tw.base.lift.form
tw.base.lift

















tw.base.lift.tree
tw.base.lift









tw.base.lift.search
tw.base.lift









电梯台账
tw.base.lift
tree,form


给内部用户设置表权限

access_tw_lift_all,tw_base.tw_lift_all,model_tw_base_lift,base.group_system,1,1,1,1

给管理员的菜单

# 界面太丑,等待优化

posted @ 2024-05-17 15:41  长鼻子匹诺曹  阅读(70)  评论(0)    收藏  举报