banking-addons-team team mailing list archive
-
banking-addons-team team
-
Mailing list archive
-
Message #01136
lp:~akretion-team/banking-addons/account_statement_base_import_conversion_dict into lp:banking-addons/bank-statement-reconcile-7.0
Florian da Costa has proposed merging lp:~akretion-team/banking-addons/account_statement_base_import_conversion_dict into lp:banking-addons/bank-statement-reconcile-7.0.
Requested reviews:
Nicolas Bessi - Camptocamp (nbessi-c2c)
For more details, see:
https://code.launchpad.net/~akretion-team/banking-addons/account_statement_base_import_conversion_dict/+merge/198235
The conversion dict is displaced from the file_parser to the generic_parser in order to avoid the error of the validate function when creating a new parser which does not contain the 4 basc fields (ref, amount, date, label).
--
https://code.launchpad.net/~akretion-team/banking-addons/account_statement_base_import_conversion_dict/+merge/198235
Your team Banking Addons Core Editors is subscribed to branch lp:banking-addons/bank-statement-reconcile-7.0.
=== modified file 'account_statement_base_import/parser/file_parser.py'
--- account_statement_base_import/parser/file_parser.py 2013-11-06 17:27:53 +0000
+++ account_statement_base_import/parser/file_parser.py 2013-12-09 12:00:53 +0000
@@ -53,14 +53,15 @@
else:
raise except_osv(_('User Error'),
_('Invalid file type %s. Please use csv or xls') % ftype)
- self.conversion_dict = {
- 'ref': unicode,
- 'label': unicode,
- 'date': datetime.datetime,
- 'amount': float_or_zero,
- }
- if extra_fields:
- self.conversion_dict.update(extra_fields)
+ self.conversion_dict = conversion_dict
+# self.conversion_dict = {
+# 'ref': unicode,
+# 'label': unicode,
+# 'date': datetime.datetime,
+# 'amount': float_or_zero,
+# }
+# if extra_fields:
+# self.conversion_dict.update(extra_fields)
self.keys_to_validate = self.conversion_dict.keys()
self.fieldnames = header
self._datemode = 0 # used only for xls documents,
=== modified file 'account_statement_base_import/parser/generic_file_parser.py'
--- account_statement_base_import/parser/generic_file_parser.py 2013-05-03 19:57:26 +0000
+++ account_statement_base_import/parser/generic_file_parser.py 2013-12-09 12:00:53 +0000
@@ -38,7 +38,13 @@
"""
def __init__(self, parse_name, ftype='csv', **kwargs):
- super(GenericFileParser, self).__init__(parse_name, ftype=ftype, **kwargs)
+ conversion_dict = {
+ 'ref': unicode,
+ 'label': unicode,
+ 'date': datetime.datetime,
+ 'amount': float_or_zero,
+ }
+ super(GenericFileParser, self).__init__(parse_name, ftype=ftype,conversion_dict=conversion_dict, **kwargs)
@classmethod
def parser_for(cls, parser_name):
Follow ups
-
Re: [Merge] lp:~akretion-team/banking-addons/account_statement_base_import_conversion_dict into lp:banking-addons/bank-statement-reconcile-70
From: Pedro Manuel Baeza, 2014-07-02
-
Re: [Merge] lp:~akretion-team/banking-addons/account_statement_base_import_conversion_dict into lp:banking-addons/bank-statement-reconcile-7.0
From: Nicolas Bessi - Camptocamp, 2014-06-13
-
Re: [Merge] lp:~akretion-team/banking-addons/account_statement_base_import_conversion_dict into lp:banking-addons/bank-statement-reconcile-7.0
From: Florian da Costa, 2014-04-10
-
Re: [Merge] lp:~akretion-team/banking-addons/account_statement_base_import_conversion_dict into lp:banking-addons/bank-statement-reconcile-7.0
From: Pedro Manuel Baeza, 2014-03-20
-
Re: [Merge] lp:~akretion-team/banking-addons/account_statement_base_import_conversion_dict into lp:banking-addons/bank-statement-reconcile-7.0
From: Florian da Costa, 2014-03-20
-
Re: [Merge] lp:~akretion-team/banking-addons/account_statement_base_import_conversion_dict into lp:banking-addons/bank-statement-reconcile-7.0
From: Florian da Costa, 2014-01-31
-
Re: [Merge] lp:~akretion-team/banking-addons/account_statement_base_import_conversion_dict into lp:banking-addons/bank-statement-reconcile-7.0
From: Guewen Baconnier @ Camptocamp, 2014-01-31
-
Re: lp:~akretion-team/banking-addons/account_statement_base_import_conversion_dict into lp:banking-addons/bank-statement-reconcile-7.0
From: Joël Grand-Guillaume, 2013-12-11
-
Re: lp:~akretion-team/banking-addons/account_statement_base_import_conversion_dict into lp:banking-addons/bank-statement-reconcile-7.0
From: Florian da Costa, 2013-12-09
-
Re: lp:~akretion-team/banking-addons/account_statement_base_import_conversion_dict into lp:banking-addons/bank-statement-reconcile-7.0
From: Sébastien BEAU - http : //www . akretion . com, 2013-12-09
-
Re: lp:~akretion-team/banking-addons/account_statement_base_import_conversion_dict into lp:banking-addons/bank-statement-reconcile-7.0
From: Sébastien BEAU - http : //www . akretion . com, 2013-12-09
-
Re: lp:~akretion-team/banking-addons/account_statement_base_import_conversion_dict into lp:banking-addons/bank-statement-reconcile-7.0
From: Sébastien BEAU - http : //www . akretion . com, 2013-12-09