Returns the total amount of discounts for this line with a specific
        number of decimals.
        @param precision:int number of decimal places
        @return: Decimal

def compute_discounts(self, precision=None):
        '''
        Returns the total amount of discounts for this line with a specific
        number of decimals.
        @param precision:int number of decimal places
        @return: Decimal
        '''
        gross = self.compute_gross(precision)
        return min(gross,
                   sum([d.compute(gross, precision) for d in self.__discounts]))