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
def _fields_sync(self, values):
        """ Sync commercial fields and address fields from company and to children after create/update,
        just as if those were all modeled as fields.related to the parent """
        
        if values.get('parent_id') or values.get('type', 'contact'):
            
            if values.get('parent_id'):
                self._commercial_sync_from_company()
             
            if self.parent_id and self.type == 'contact':
                onchange_vals = self.onchange_parent_id().get('value', {})
                self.update_address(onchange_vals)
        
        if self.child_ids:
            
            if self.commercial_partner_id == self:
                commercial_fields = self._commercial_fields()
                if any(field in values for field in commercial_fields):
                    self._commercial_sync_to_children()
            for child in self.child_ids.filtered(lambda c: not c.is_company):
                if child.commercial_partner_id != self.commercial_partner_id :
                    self._commercial_sync_to_children()
                    break
            
            address_fields = self._address_fields()
            if any(field in values for field in address_fields):
                contacts = self.child_ids.filtered(lambda c: c.type == 'contact')
                contacts.update_address(values)
    @api.multi
    def _handle_first_contact_creation(self):