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

Missing FITID in generated OFX #11

Open
ntf1974 opened this issue Mar 6, 2021 · 0 comments
Open

Missing FITID in generated OFX #11

ntf1974 opened this issue Mar 6, 2021 · 0 comments

Comments

@ntf1974
Copy link

ntf1974 commented Mar 6, 2021

Trying to further process OFX generated from ISO20022-camt052 (also applies to camt053 Source) with Tryton ERP (which relies - by my knowledge - on python ofxparse) gives me an Error "ofxparse.ofxparse.OfxParserException: Missing FIT id (a required field)"

May it be an idea to add generation of FITID to the plugin like the MT940 Plugin does? Or am I missing some knowledge to correctly further process the OFX files?

I've tried to add the generation of FITID by myself based on the implementation in MT940 Plugin.
The subsequently converted files can be successfully processed by ofxparse.

Changes i've made to the iso20022-Plugin:

6a7

from typing import Set, Iterator, Any, IO
11a13
from ofxstatement.statement import generate_unique_transaction_id
38a41
unique_id_set: Set[str]
42a46
self.unique_id_set = set()
154a159,163

            sline.id = generate_unique_transaction_id(sline, self.unique_id_set)
            m = re.match(r'([0-9a-f]+)(-\d+)?$', sline.id)
            assert m, "Id should match hexadecimal digits, optionally followed by a minus and a counter: '{}'".format(sline.id)

Regards
Chris

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

No branches or pull requests

1 participant