Adds the centre for this loan to a 'assignedCentre' field.

        Also adds an 'assignedCentreName' field with the name of the centre.

        Centre is a MambuCentre object.

        Returns the number of requests done to Mambu.

def setCentre(self, *args, **kwargs):
        """Adds the centre for this loan to a 'assignedCentre' field.

        Also adds an 'assignedCentreName' field with the name of the centre.

        Centre is a MambuCentre object.

        Returns the number of requests done to Mambu.
        """

        try:
            centre = self.mambucentreclass(entid=self['assignedCentreKey'], *args, **kwargs)
        except AttributeError as ae:
            from .mambucentre import MambuCentre
            self.mambucentreclass = MambuCentre
            centre = self.mambucentreclass(entid=self['assignedCentreKey'], *args, **kwargs)

        self['assignedCentreName'] = centre['name']
        self['assignedCentre'] = centre

        return 1