[IMP] remove menu_id from user model
authorRandhir Mayatra (OpenERP) <rajmyt@gmail.com>
Tue, 4 Mar 2014 08:54:47 +0000 (14:24 +0530)
committerRandhir Mayatra (OpenERP) <rajmyt@gmail.com>
Tue, 4 Mar 2014 08:54:47 +0000 (14:24 +0530)
bzr revid: rajmyt@gmail.com-20140304085447-zknvpkfe4i3d8uku

openerp/addons/base/base_data.xml
openerp/addons/base/res/res_users.py
openerp/addons/base/res/res_users_view.xml

index b6c12e1..96e1377 100644 (file)
@@ -75,7 +75,6 @@
             <field name="partner_id" ref="base.partner_root"/>
             <field name="company_id" ref="main_company"/>
             <field name="company_ids" eval="[(4, ref('main_company'))]"/>
-            <field name="menu_id" ref="action_menu_admin"/>
             <field name="signature">--
 Administrator</field>
         </record>
index b2aba69..fad3691 100644 (file)
@@ -154,8 +154,6 @@ class res_users(osv.osv):
                  "a change of password, the user has to login again."),
         'signature': fields.text('Signature'),
         'active': fields.boolean('Active'),
-        'action_id': fields.many2one('ir.actions.actions', 'Home Action', help="If specified, this action will be opened at logon for this user, in addition to the standard menu."),
-        'menu_id': fields.many2one('ir.actions.actions', 'Menu Action', help="If specified, the action will replace the standard menu for this user."),
         'groups_id': fields.many2many('res.groups', 'res_groups_users_rel', 'uid', 'gid', 'Groups'),
         # Special behavior for this field: res.company.search() will only return the companies
         # available to the current user (should be the user's companies?), when the user_preference
@@ -216,16 +214,6 @@ class res_users(osv.osv):
             return [c]
         return False
 
-    def _get_menu(self,cr, uid, context=None):
-        dataobj = self.pool.get('ir.model.data')
-        try:
-            model, res_id = dataobj.get_object_reference(cr, uid, 'base', 'action_menu_admin')
-            if model != 'ir.actions.act_window':
-                return False
-            return res_id
-        except ValueError:
-            return False
-
     def _get_group(self,cr, uid, context=None):
         dataobj = self.pool.get('ir.model.data')
         result = []
@@ -243,7 +231,6 @@ class res_users(osv.osv):
         'password': '',
         'active': True,
         'customer': False,
-        'menu_id': _get_menu,
         'company_id': _get_company,
         'company_ids': _get_companies,
         'groups_id': _get_group,
@@ -251,7 +238,7 @@ class res_users(osv.osv):
     }
 
     # User can write on a few of his own fields (but not his groups for example)
-    SELF_WRITEABLE_FIELDS = ['password', 'signature', 'action_id', 'company_id', 'email', 'name', 'image', 'image_medium', 'image_small', 'lang', 'tz']
+    SELF_WRITEABLE_FIELDS = ['password', 'signature', 'company_id', 'email', 'name', 'image', 'image_medium', 'image_small', 'lang', 'tz']
     # User can read a few of his own fields
     SELF_READABLE_FIELDS = ['signature', 'company_id', 'login', 'email', 'name', 'image', 'image_medium', 'image_small', 'lang', 'tz', 'tz_offset', 'groups_id', 'partner_id', '__last_update']
 
index ba603c7..bb47f02 100644 (file)
                                         <field name="lang"/>
                                         <field name="tz"/>
                                     </group>
-                                    <group string="Menus Customization" groups="base.group_no_one">
-                                        <field name="action_id"/>
-                                        <field domain="[('usage','=','menu')]" name="menu_id" required="True"/>
-                                    </group>
                                 </group>
                                 <group string="Messaging and Social" name="messaging">
                                     <field name="signature"/>