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

原论坛用户的基本信息和发帖这里都予以保留,请注意:原论坛用户无需重新注册新用户,但是您的密码需要重置

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

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

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



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

    &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组内的没有写的权限



  • 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这个模型没有编辑权限



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