[FIX] typo convertion/conversion in file_parser derived classes

This commit is contained in:
unknown
2013-02-26 09:19:44 +01:00
parent c292adb42a
commit 22e49ae4b6
2 changed files with 6 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ except:
raise Exception(_('Please install python lib xlrd'))
def float_or_zero(val):
""" Convertion function used to manage
""" Conversion function used to manage
empty string into float usecase"""
return val and float(val) or 0.0
@@ -43,7 +43,7 @@ class GenericFileParser(FileParser):
"""
def __init__(self, parse_name, ftype='csv'):
convertion_dict = {
conversion_dict = {
'ref': unicode,
'label': unicode,
'date': datetime.datetime,
@@ -52,7 +52,7 @@ class GenericFileParser(FileParser):
}
# Order of cols does not matter but first row of the file has to be header
keys_to_validate = ['ref', 'label', 'date', 'amount', 'commission_amount']
super(GenericFileParser, self).__init__(parse_name, keys_to_validate=keys_to_validate, ftype=ftype, convertion_dict=convertion_dict)
super(GenericFileParser, self).__init__(parse_name, keys_to_validate=keys_to_validate, ftype=ftype, conversion_dict=conversion_dict)
@classmethod
def parser_for(cls, parser_name):