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
child_ids = fields.One2many('res.partner', 'parent_id', string='Contacts', domain=[('active', '=', True)])  
    ref = fields.Char(string='Internal Reference', index=True)
    lang = fields.Selection(_lang_get, string='Language', default=lambda self: self.env.lang,
                            help="If the selected language is loaded in the system, all documents related to "
                                 "this contact will be printed in this language. If not, it will be English.")
    tz = fields.Selection(_tz_get, string='Timezone', default=lambda self: self._context.get('tz'),
                          help="The partner's timezone, used to output proper date and time values "
                               "inside printed reports. It is important to set a value for this field. "
                               "You should use the same timezone that is otherwise used to pick and "
                               "render date and time values: your computer's timezone.")
    tz_offset = fields.Char(compute='_compute_tz_offset', string='Timezone offset', invisible=True)
    user_id = fields.Many2one('res.users', string='Salesperson',
      help='The internal user that is in charge of communicating with this contact if any.')
    vat = fields.Char(string='TIN', help="Tax Identification Number. "
                                         "Fill it if the company is subjected to taxes. "
                                         "Used by the some of the legal statements.")
    bank_ids = fields.One2many('res.partner.bank', 'partner_id', string='Banks')
    website = fields.Char(help="Website of Partner or Company")
    comment = fields.Text(string='Notes')
    category_id = fields.Many2many('res.partner.category', column1='partner_id',
                                    column2='category_id', string='Tags', default=_default_category)
    credit_limit = fields.Float(string='Credit Limit')
    barcode = fields.Char(oldname='ean13')
    active = fields.Boolean(default=True)
    customer = fields.Boolean(string='Is a Customer', default=True,
                               help="Check this box if this contact is a customer.")
    supplier = fields.Boolean(string='Is a Vendor',
                               help="Check this box if this contact is a vendor. "
                               "If it's not checked, purchase people will not see it when encoding a purchase order.")
    employee = fields.Boolean(help="Check this box if this contact is an Employee.")