[FIX] res_partner: default image is back
Back from user. And the future. Or not.
This commit is contained in:
@@ -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 "\
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user