跳转至内容
  • 版块
  • 标签
  • 热门
  • 用户
  • 群组
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(Flatly)
  • 不使用皮肤
折叠

Odoo 中文社区

  1. 主页
  2. 版块
  3. Odoo 开发与实施交流
  4. Odoo9 分组和分组规则是怎么运行的?

Odoo9 分组和分组规则是怎么运行的?

已定时 已固定 已锁定 已移动 Odoo 开发与实施交流
4 帖子 3 发布者 3.4k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • L 离线
    L 离线
    lccyx001
    写于 最后由 编辑
    #1

    有没有对权限和分组这边有详细一点的讲解介绍的,百度和官网上写的不够详细,看了好几天还是云里雾绕的,我可以成功设置分组,但是写的规则不生效

    &lt;!--新建分组--&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;record id=&quot;chance_sale_manager&quot; model=&quot;res.groups&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;name&quot;&gt;chance_sale_manager&lt;/field&gt;<br />			&lt;field name=&quot;implied_ids&quot; eval=&quot;[(4, ref(&#039;base.group_sale_manager&#039;))]&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/record&gt;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;record id=&quot;chance_sale_salesman&quot; model=&quot;res.groups&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;name&quot;&gt;chance_sale_salesman&lt;/field&gt;<br />			&lt;field name=&quot;implied_ids&quot; eval=&quot;[(4, ref(&#039;base.group_sale_salesman&#039;))]&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/record&gt;<br />&lt;!--定义用户组--&gt;<br /><br />&lt;!--权限规则--&gt;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;record id=&quot;property_rule_attendace_manager&quot; model=&quot;ir.rule&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;name&quot;&gt;Manager Chance Sale&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;model_id&quot; ref=&quot;model_chance_sale_chance_sale&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;domain_force&quot;&gt;[(1,&#039;=&#039;,1)]&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;groups&quot; eval=&quot;[(4, ref(&#039;base.group_sale_salesman&#039;)),(4,ref(&#039;base.group_sale_salesman_all_leads&#039;))]&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;perm_read&quot; eval=&quot;1&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;perm_write&quot; eval=&quot;0&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;perm_create&quot; eval=&quot;1&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;perm_unlink&quot; eval=&quot;1&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/record&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;record id=&quot;property_rule_attendace_manager&quot; model=&quot;ir.rule&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;name&quot;&gt;Manager Chance Sale&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;model_id&quot; ref=&quot;model_chance_sale_chance_sale&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;domain_force&quot;&gt;[(1,&#039;=&#039;,1)]&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;groups&quot; eval=&quot;[(4, ref(&#039;base.group_sale_manager&#039;))]&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;perm_read&quot; eval=&quot;1&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;perm_write&quot; eval=&quot;1&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;perm_create&quot; eval=&quot;1&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;perm_unlink&quot; eval=&quot;1&quot;/&gt;
    


    csv 文件的代码

    id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink<br />access_chance_sale_chance_sale,chance_sale.chance_sale,model_chance_sale_chance_sale,chance_sale_manager,1,1,1,1<br />access_chance_sale_chance_sale,chance_sale.chance_sale,model_chance_sale_chance_sale,chance_sale_salesman,1,0,1,1
    


    想要的效果:chance_sale_salesman组内的没有写的权限

    1 条回复 最后回复
    0
    • 天 离线
      天 离线
      天津-随风
      写于 最后由 编辑
      #2

      access_chance_sale_chance_sale,chance_sale.chance_sale,model_chance_sale_chance_sale,chance_sale_manager,1,1,1,1
      access_chance_sale_chance_sale,chance_sale.chance_sale,model_chance_sale_chance_sale,chance_sale_salesman,1,0,1,1

      你可以尝试一下,,把你这两句前面这个access_chance_sale_chance_sale 和chance_sale.chance_sale 两条记录修改成不一样的,还有,强调一下,你这两句话能限制的只是chance_sale_salesman这个组对chance_sale_chance_sale这个模型没有编辑权限

      1 条回复 最后回复
      0
      • wjfonhandW 离线
        wjfonhandW 离线
        wjfonhand
        写于 最后由 编辑
        #3

        不允许修改,可以删除和新建,这。。。。。有漏洞

        GoodERP -- Odoo China fork

        1 条回复 最后回复
        0

        • 登录

        • 没有帐号? 注册

        • 登录或注册以进行搜索。
        • 第一个帖子
          最后一个帖子
        0
        • 版块
        • 标签
        • 热门
        • 用户
        • 群组