def round(self, amount, rounding=ROUND_HALF_EVEN): 'Round the amount depending of the currency' return (amount / self.rounding).quantize(Decimal('1.'), rounding=rounding) * self.rounding