Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7.0 Conversion_dict is now created in the generic parser #23

Merged
merged 9 commits into from
Sep 26, 2014

Conversation

florian-dacosta
Copy link
Contributor

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)

The old launchpad link :
https://code.launchpad.net/~akretion-team/banking-addons/account_statement_base_import_conversion_dict/+merge/198235

super(GenericFileParser, self).__init__(parse_name, ftype=ftype, **kwargs)
conversion_dict = {
'ref': unicode,
'label': unicode,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to use ustr from openerp.tools

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems better now?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to import

from openerp.tools import ustr

It may be the same function, but openerp.tools seems safer and makes more sense

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thank you for the information

@arthru
Copy link

arthru commented Sep 17, 2014

LGTM 👍

'date': datetime.datetime,
'amount': float_or_zero,
}
super(GenericFileParser, self).__init__(parse_name, ftype=ftype, extra_fields=conversion_dict, **kwargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP8 80 cols please

@bwrsandman
Copy link

Needs to be rebased in order to merge

@florian-dacosta
Copy link
Contributor Author

rebased!

@pedrobaeza
Copy link
Member

Unrelated Travis error, so 👍

pedrobaeza added a commit that referenced this pull request Sep 26, 2014
[IMP] account_statement_base_import: 7.0 Conversion_dict is now created in the generic parser
@pedrobaeza pedrobaeza merged commit edbcd9b into OCA:7.0 Sep 26, 2014
tschanzt pushed a commit to tschanzt/account-reconcile that referenced this pull request May 10, 2019
Fix tax account on chart 1170 -> 2200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants