Navigation

    Odoo 中文社区

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Popular
    • Users
    • Groups

    Odoo中文社区可以通过以下两个域名访问:shine-it.net , odoo.net.cn

    由于系统升迁的原因,本论坛部分较早期的内容存在格式和链接损坏失效的问题,并非本论坛系统本身的缺陷,望谅解

    本社区没有维护任何QQ群讨论组,任何与本社区同名的QQ群讨论组的言论与本社区无关!

    开发人员可以登录gitter讨论组: http://gitter.im/odoo-china/Talk, 需要github账号

    如果您登录系统碰到问题,请在微信公众号留言:

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

    Odoo 开发与实施交流
    3
    4
    3035
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      lccyx001 last edited by

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

      &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 Reply Last reply Reply Quote 0
      • 天
        天津-随风 last edited by

        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 Reply Last reply Reply Quote 0
        • wjfonhand
          wjfonhand last edited by

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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post