Impacted versions:11

Steps to reproduce:Add new address type "Other" and save, while saving partner it will give error

Current behavior:

Expected behavior:

Video/Screenshot link (optional):Error:
Odoo Server Error

Traceback (most recent call last):
  File "/home/p5q-pro/PycharmProjects/odoo11/odoo/http.py", line 646, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/p5q-pro/PycharmProjects/odoo11/odoo/http.py", line 307, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/home/p5q-pro/PycharmProjects/odoo11/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/home/p5q-pro/PycharmProjects/odoo11/odoo/http.py", line 683, in dispatch
    result = self._call_function(**self.params)
  File "/home/p5q-pro/PycharmProjects/odoo11/odoo/http.py", line 339, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/p5q-pro/PycharmProjects/odoo11/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/p5q-pro/PycharmProjects/odoo11/odoo/http.py", line 332, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/p5q-pro/PycharmProjects/odoo11/odoo/http.py", line 927, in __call__
    return self.method(*args, **kw)
  File "/home/p5q-pro/PycharmProjects/odoo11/odoo/http.py", line 512, in response_wrap
    response = f(*args, **kw)
  File "/home/p5q-pro/PycharmProjects/odoo11/addons/web/controllers/main.py", line 924, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/p5q-pro/PycharmProjects/odoo11/addons/web/controllers/main.py", line 916, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/p5q-pro/PycharmProjects/odoo11/odoo/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/home/p5q-pro/PycharmProjects/odoo11/odoo/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/home/p5q-pro/PycharmProjects/odoo11/odoo/addons/base/res/res_partner.py", line 514, in write
    result = result and super(Partner, self).write(vals)
  File "/home/p5q-pro/PycharmProjects/odoo11/addons/mail/models/mail_thread.py", line 277, in write
    result = super(MailThread, self).write(values)
  File "/home/p5q-pro/PycharmProjects/odoo11/odoo/models.py", line 3011, in write
    self._write(old_vals)
  File "/home/p5q-pro/PycharmProjects/odoo11/odoo/models.py", line 3136, in _write
    field.write(self.with_context(rel_context), vals[name])
  File "/home/p5q-pro/PycharmProjects/odoo11/odoo/fields.py", line 2253, in write
    comodel.create(act[2])
  File "/home/p5q-pro/PycharmProjects/odoo11/odoo/addons/base/res/res_partner.py", line 530, in create
    vals['image'] = self._get_default_image(vals.get('type'), vals.get('is_company'), vals.get('parent_id'))
  File "/home/p5q-pro/PycharmProjects/odoo11/custom/tms/models/res_partner.py", line 46, in _get_default_image
    image = parent_image and parent_image.decode('base64') or None
LookupError: 'base64' is not a text encoding; use codecs.decode() to handle arbitrary codecs


odoo/addons/base/res/res_partner.py
partner_share = fields.Boolean(
        'Share Partner', compute='_compute_partner_share', store=True,
        help="Either customer (no user), either shared user. Indicated the current partner is a customer without "
             "access or with a limited access created for sharing data.")
    contact_address = fields.Char(compute='_compute_contact_address', string='Complete Address')
    
    commercial_partner_id = fields.Many2one('res.partner', compute='_compute_commercial_partner',
                                             string='Commercial Entity', store=True, index=True)
    commercial_partner_country_id = fields.Many2one('res.country', related='commercial_partner_id.country_id', store=True)
    commercial_company_name = fields.Char('Company Name Entity', compute='_compute_commercial_company_name',
                                          store=True)
    company_name = fields.Char('Company Name')
    
    image = fields.Binary("Image", attachment=True,
        help="This field holds the image used as avatar for this contact, limited to 1024x1024px",)
    image_medium = 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. "\
             "Use this field in form views or some kanban views.")
    image_small = fields.Binary("Small-sized image", attachment=True,
        help="Small-sized image of this contact. It is automatically "\
             "resized as a 64x64px image, with aspect ratio preserved. "\
             "Use this field anywhere a small image is required.")
    
    self = fields.Many2one(comodel_name=_name, compute='_compute_get_ids')
    _sql_constraints = [
        ('check_name', "CHECK( (type='contact' AND name IS NOT NULL) or (type!='contact') )", 'Contacts require a name.'),
    ]
    @api.depends('is_company', 'name', 'parent_id.name', 'type', 'company_name')
    def _compute_display_name(self):