From a77002035d48bba891a6e9de4c65711e90e40254 Mon Sep 17 00:00:00 2001
From: Martin Trigaux <mat@openerp.com>
Date: Mon, 28 Apr 2014 09:53:01 +0200
Subject: [PATCH] [FIX] lunch: allow other people to create lunch orders for
 others

bzr revid: mat@openerp.com-20140428075301-ah6lgb7zzkr6vb3o
---
 addons/lunch/security/lunch_security.xml | 28 ++----------------------
 1 file changed, 2 insertions(+), 26 deletions(-)

diff --git a/addons/lunch/security/lunch_security.xml b/addons/lunch/security/lunch_security.xml
index 4ffb6dd2c3db..abdd0cea0a66 100644
--- a/addons/lunch/security/lunch_security.xml
+++ b/addons/lunch/security/lunch_security.xml
@@ -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>
-- 
GitLab