|
- <?xml version="1.0" encoding="utf-8"?>
- <openerp>
- <data>
- <record id="group_sell_own_order_rule" model="ir.rule">
- <field name='name'>销售只能看自己的订单</field>
- <field name='model_id' ref="sell.model_sell_order"/>
- <field name='domain_force'>['|',('user_id','=',user.id),'|',('partner_id.responsible_id','=',user.id),('partner_id.share_id','=',user.id)]</field>
- <field name='groups' eval="[(4,ref('sell.own_data_groups'))]"/>
- <field name='perm_read' eval='True'/>
- <field name='perm_write' eval='True'/>
- <field name='perm_create' eval='True'/>
- <field name='perm_unlink' eval='True'/>
- </record>
- <record id="group_sell_own_delivery_rule" model="ir.rule">
- <field name='name'>销售只能看自己的发货</field>
- <field name='model_id' ref="sell.model_sell_delivery"/>
- <field name='domain_force'>['|',('user_id','=',user.id),'|',('partner_id.responsible_id','=',user.id),('partner_id.share_id','=',user.id)]</field>
- <field name='groups' eval="[(4,ref('sell.own_data_groups'))]"/>
- <field name='perm_read' eval='True'/>
- <field name='perm_write' eval='True'/>
- <field name='perm_create' eval='True'/>
- <field name='perm_unlink' eval='True'/>
- </record>
-
- <record id="group_see_own_partner_rule" model="ir.rule">
- <field name='name'>销售只能看自己的客户</field>
- <field name='model_id' ref="core.model_partner"/>
- <field name='domain_force'>['|', ('responsible_id','=',user.id), '|', ('responsible_id','=',False), ('share_id','=',user.id)]</field>
- <field name='groups' eval="[(4,ref('sell.own_data_groups'))]"/>
- </record>
- </data>
- </openerp>
|