Skip to content

Commit 385c036

Browse files
Merge pull request #1 from Stores-Discount/M2-2122_image_partner
M2 2122 image partner
2 parents ff6a9d4 + 1ef8cdd commit 385c036

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

openerp/addons/base/res/res_partner.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,7 @@ def _display_name_compute(self, cr, uid, ids, name, args, context=None):
253253

254254
# image: all image fields are base64 encoded and PIL-supported
255255
image = openerp.fields.Binary("Image", attachment=True,
256-
help="This field holds the image used as avatar for this contact, limited to 1024x1024px",
257-
default=lambda self: self._get_default_image(False, True))
256+
help="This field holds the image used as avatar for this contact, limited to 1024x1024px")
258257
image_medium = openerp.fields.Binary("Medium-sized image", attachment=True,
259258
help="Medium-sized image of this contact. It is automatically "\
260259
"resized as a 128x128px image, with aspect ratio preserved. "\
@@ -521,9 +520,6 @@ def write(self, vals):
521520

522521
@api.model
523522
def create(self, vals):
524-
if vals.get('type') in ['delivery', 'invoice'] and not vals.get('image'):
525-
# force no colorize for images with no transparency
526-
vals['image'] = self.with_context(partner_type=vals['type'])._get_default_image(False, False)
527523
if vals.get('website'):
528524
vals['website'] = self._clean_website(vals['website'])
529525
# function field not correctly triggered at create -> remove me when

0 commit comments

Comments
 (0)