[FIX] lunch: allow other people to create lunch orders for others

bzr revid: mat@openerp.com-20140428075301-ah6lgb7zzkr6vb3o
This commit is contained in:
Martin Trigaux 2014-04-28 09:53:01 +02:00
parent 7f236edcdd
commit a77002035d
1 changed files with 2 additions and 26 deletions

View File

@ -17,38 +17,14 @@
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
<record id="lunch_mind_your_own_food" model="ir.rule">
<field name="name">lunch.order: do not see and create other people's order</field>
<field name="model_id" ref="model_lunch_order"/>
<field name="groups" eval="[(4, ref('group_lunch_user'))]"/>
<field name="domain_force">[('user_id', '=', user.id)]</field>
</record>
<record id="lunch_mind_other_food" model="ir.rule">
<field name="name">lunch.order: do not see and create other people's order</field>
<field name="model_id" ref="model_lunch_order"/>
<field name="groups" eval="[(4, ref('group_lunch_manager'))]"/>
<field name="domain_force">[(1, '=', 1)]</field>
</record>
<record id="lunch_mind_your_own_food_line" model="ir.rule">
<field name="name">lunch.order.line: do not see and create other people's order line</field>
<field name="model_id" ref="model_lunch_order_line"/>
<field name="groups" eval="[(4, ref('group_lunch_user'))]"/>
<field name="domain_force">[('order_id.user_id', '=', user.id)]</field>
</record>
<record id="lunch_mind_other_food_line" model="ir.rule">
<field name="name">lunch.order.line: do not see and create other people's order line</field>
<field name="model_id" ref="model_lunch_order_line"/>
<field name="groups" eval="[(4, ref('group_lunch_manager'))]"/>
<field name="domain_force">[(1, '=', 1)]</field>
</record>
<record id="lunch_mind_your_own_food_money" model="ir.rule">
<field name="name">lunch.cashmove: do not see and create other people's cashmove</field>
<field name="name">lunch.cashmove: do not see other people's cashmove</field>
<field name="model_id" ref="model_lunch_cashmove"/>
<field name="groups" eval="[(4, ref('group_lunch_user'))]"/>
<field name="domain_force">[('user_id', '=', user.id)]</field>
</record>
<record id="lunch_mind_other_food_money" model="ir.rule">
<field name="name">lunch.cashmove: do not see and create other people's cashmove</field>
<field name="name">lunch.cashmove: do see other people's cashmove</field>
<field name="model_id" ref="model_lunch_cashmove"/>
<field name="groups" eval="[(4, ref('group_lunch_manager'))]"/>
<field name="domain_force">[(1, '=', 1)]</field>