[FIX] res_partner: default image is back

Back from user. And the future. Or not.
This commit is contained in:
Thibault Delavallée
2015-09-30 11:31:20 +02:00
parent 314dab85df
commit be75ee12a0
2 changed files with 2 additions and 5 deletions
+2 -1
View File
@@ -269,7 +269,8 @@ class res_partner(osv.Model, format_address):
# image: all image fields are base64 encoded and PIL-supported
image = openerp.fields.Binary("Image", attachment=True,
help="This field holds the image used as avatar for this contact, limited to 1024x1024px")
help="This field holds the image used as avatar for this contact, limited to 1024x1024px",
default=lambda self: self._get_default_image(False, True))
image_medium = openerp.fields.Binary("Medium-sized image",
compute='_compute_images', inverse='_inverse_image_medium', store=True, attachment=True,
help="Medium-sized image of this contact. It is automatically "\
-4
View File
@@ -268,9 +268,6 @@ class res_users(osv.osv):
pass
return result
def _get_default_image(self, cr, uid, context=None):
return self.pool['res.partner']._get_default_image(cr, uid, False, colorize=True, context=context)
_defaults = {
'password': '',
'active': True,
@@ -278,7 +275,6 @@ class res_users(osv.osv):
'company_id': _get_company,
'company_ids': _get_companies,
'groups_id': _get_group,
'image': _get_default_image,
}
# User can write on a few of his own fields (but not his groups for example)