Skip to content

Commit

Permalink
Merge branch 'merged' into M2-2122_image_partner
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Aug 11, 2020
2 parents 458d742 + db2aba7 commit 1ef8cdd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions openerp/addons/base/res/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,7 @@ def _display_name_compute(self, cr, uid, ids, name, args, context=None):

# 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",
default=lambda self: self._get_default_image(False, True))
help="This field holds the image used as avatar for this contact, limited to 1024x1024px")
image_medium = openerp.fields.Binary("Medium-sized image", attachment=True,
help="Medium-sized image of this contact. It is automatically "\
"resized as a 128x128px image, with aspect ratio preserved. "\
Expand Down Expand Up @@ -521,9 +520,6 @@ def write(self, vals):

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

0 comments on commit 1ef8cdd

Please sign in to comment.