odoo 权限分配
创建角色组分类
理解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)
设计模型界面
给内部用户设置表权限
access_tw_lift_all,tw_base.tw_lift_all,model_tw_base_lift,base.group_system,1,1,1,1

浙公网安备 33010602011771号