Browse Source
Merge pull request #155 from CompassionCH/10.0-parse-inheritance
[10.0][IMP] Allow inheritance for CAMT parser to add transaction nodes
pull/149/head
Pedro M. Baeza
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
3 deletions
-
account_bank_statement_import_camt/__manifest__.py
-
account_bank_statement_import_camt/models/parser.py
|
|
@ -3,7 +3,7 @@ |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
{ |
|
|
|
'name': 'CAMT Format Bank Statements Import', |
|
|
|
'version': '10.0.1.1.1', |
|
|
|
'version': '10.0.1.1.2', |
|
|
|
'license': 'AGPL-3', |
|
|
|
'author': 'Odoo Community Association (OCA), Therp BV', |
|
|
|
'website': 'https://github.com/OCA/bank-statement-import', |
|
|
|
|
|
@ -99,8 +99,9 @@ class CamtParser(models.AbstractModel): |
|
|
|
'account_number' |
|
|
|
) |
|
|
|
|
|
|
|
def parse_entry(self, ns, node): |
|
|
|
def parse_entry(self, ns, node, transaction=None): |
|
|
|
"""Parse an Ntry node and yield transactions""" |
|
|
|
if transaction is None: |
|
|
|
transaction = {'name': '/', 'amount': 0} # fallback defaults |
|
|
|
self.add_value_from_node( |
|
|
|
ns, node, './ns:BookgDt/ns:Dt', transaction, 'date') |
|
|
|