def clean(self, value):
        cartplaces = config_value('SHOP', 'CART_PRECISION')
        roundfactor = config_value('SHOP', 'CART_ROUNDING')

        if not value or value == '':
            value = Decimal(0)

        try:
            value = round_decimal(val=value, places=cartplaces, roundfactor=roundfactor, normalize=True)
        except RoundedDecimalError:
            raise forms.ValidationError(_('%(value)s is not a valid number') % {'value' : value})

        return value
Normalize the field according to cart normalizing rules.
dataset/ETHPy150Open dokterbob/satchmo/satchmo/apps/satchmo_utils/numbers.py/RoundedDecimalField.clean