[IMP] Removed calculated photo. res.users do not have to be aware it will be inherite...
authorThibault Delavallée <tde@openerp.com>
Tue, 21 Feb 2012 15:15:42 +0000 (16:15 +0100)
committerThibault Delavallée <tde@openerp.com>
Tue, 21 Feb 2012 15:15:42 +0000 (16:15 +0100)
bzr revid: tde@openerp.com-20120221151542-u2ic748f0wtnvrsr

openerp/addons/base/res/res_users.py

index 4e52771..6ec8b6f 100644 (file)
@@ -218,18 +218,6 @@ class users(osv.osv):
             result[obj.id] = img_stream.getvalue().encode('base64')
         return result
 
-    def _get_photo_calc(self, cr, uid, ids, name, args, context=None):
-        result = {}
-        for user in self.browse(cr, uid, ids, context=context):
-            result[user.id] = user.photo
-        return result
-
-    def _get_photo_calc_mini(self, cr, uid, ids, name, args, context=None):
-        result = {}
-        for user in self.browse(cr, uid, ids, context=context):
-            result[user.id] = user.photo_mini
-        return result
-
     def _get_interface_type(self, cr, uid, ids, name, args, context=None):
         """Implementation of 'view' function field getter, returns the type of interface of the users.
         @param field_name: Name of the field
@@ -275,8 +263,6 @@ class users(osv.osv):
             store = {
                 'res.users': (lambda self, cr, uid, ids, c={}: ids, ['photo'], 10),
             }),
-        'photo_calc': fields.function(_get_photo_calc, string='Photo', type="binary", readonly=True),
-        'photo_calc_mini': fields.function(_get_photo_calc_mini, string='Photo Mini', type="binary", readonly=True),
         '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."),