Impacted versions:11.0

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):
in res_partner.py
        
286:        if partner_type in ['other'] and parent_id:
287:            parent_image = self.browse(parent_id).image
288:            image = parent_image and parent_image.decode('base64') or None

change to:

286:        if partner_type in ['other'] and parent_id:
287:            parent_image = self.browse(parent_id).image
288:            image = parent_image and base64.b64decode(parent_image) or None


odoo/addons/base/res/res_partner.py
""" Supported syntax:
            - 'Raoul <raoul@grosbedon.fr>': will find name and email address
            - otherwise: default, everything is set as the name """
        emails = tools.email_split(text.replace(' ', ','))
        if emails:
            email = emails[0]
            name = text[:text.index(email)].replace('"', '').replace('<', '').strip()
        else:
            name, email = text, ''
        return name, email
    @api.model
    def name_create(self, name):
        """ Override of orm's name_create method for partners. The purpose is
            to handle some basic formats to create partners using the
            name_create.
            If only an email address is received and that the regex cannot find
            a name, the name will have the email value.
            If 'force_email' key in context: must find the email address. """
        name, email = self._parse_partner_name(name)
        if self._context.get('force_email') and not email:
            raise UserError(_("Couldn't create contact without email address!"))
        if not name and email:
            name = email
        partner = self.create({self._rec_name: name or email, 'email': email or self.env.context.get('default_email', False)})
        return partner.name_get()[0]
    @api.model
    def _search(self, args, offset=0, limit=None, order=None, count=False, access_rights_uid=None):