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
if not self._check_recursion():
            raise ValidationError(_('You cannot create recursive Partner hierarchies.'))
    @api.multi
    def copy(self, default=None):
        self.ensure_one()
        default = dict(default or {}, name=_('%s (copy)') % self.name)
        return super(Partner, self).copy(default)
    @api.onchange('parent_id')
    def onchange_parent_id(self):
        
        if not self.parent_id:
            return
        result = {}
        partner = getattr(self, '_origin', self)
        if partner.parent_id and partner.parent_id != self.parent_id:
            result['warning'] = {
                'title': _('Warning'),
                'message': _('Changing the company of a contact should only be done if it '
                             'was never correctly set. If an existing contact starts working for a new '
                             'company then a new contact should be created under that new '
                             'company. You can use the "Discard" button to abandon this change.')}
        if partner.type == 'contact' or self.type == 'contact':
            
            
            
            address_fields = self._address_fields()
            if any(self.parent_id[key] for key in address_fields):
                def convert(value):