Browse Source

Merge pull request #179 from onesteinbv/11_fix_account_bank_statement_import_camt_oca

[11.0][FIX] account_bank_statement_import_camt: switch name and note
pull/184/head
Pedro M. Baeza 6 years ago
committed by GitHub
parent
commit
5d9f3f7afe
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      account_bank_statement_import_camt_oca/__manifest__.py
  2. 4
      account_bank_statement_import_camt_oca/models/parser.py
  3. 16
      account_bank_statement_import_camt_oca/test_files/golden-camt053.pydata

2
account_bank_statement_import_camt_oca/__manifest__.py

@ -2,7 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'CAMT Format Bank Statements Import',
'version': '11.0.1.0.2',
'version': '11.0.1.0.3',
'license': 'AGPL-3',
'author': 'Odoo Community Association (OCA), Therp BV',
'website': 'https://github.com/OCA/bank-statement-import',

4
account_bank_statement_import_camt_oca/models/parser.py

@ -59,12 +59,12 @@ class CamtParser(models.AbstractModel):
'./ns:RmtInf/ns:Ustrd',
'./ns:AddtlNtryInf',
'./ns:Refs/ns:InstrId',
], transaction, 'note', join_str='\n')
], transaction, 'name', join_str='\n')
# name
self.add_value_from_node(
ns, node, [
'./ns:AddtlTxInf',
], transaction, 'name', join_str='\n')
], transaction, 'note', join_str='\n')
# eref
self.add_value_from_node(
ns, node, [

16
account_bank_statement_import_camt_oca/test_files/golden-camt053.pydata

@ -7,28 +7,28 @@
'transactions': [{'account_number': 'NL46ABNA0499998748',
'amount': -754.25,
'date': '2014-01-05',
'name': 'MKB Insurance 859239PERIOD 01.01.2014 - 31.12.2014',
'note': 'Insurance policy 857239PERIOD 01.01.2014 - 31.12.2014',
'name': 'Insurance policy 857239PERIOD 01.01.2014 - 31.12.2014',
'note': 'MKB Insurance 859239PERIOD 01.01.2014 - 31.12.2014',
'partner_name': 'INSURANCE COMPANY TESTX',
'ref': '435005714488-ABNO33052620'},
{'account_number': 'NL46ABNA0499998748',
'amount': -564.05,
'date': '2014-01-05',
'name': 'Direct debit S14 0410 AC07 Rek.nummer blokkade TESTBANK/NL/20141229/01206408',
'note': 'Direct Debit S14 0410',
'name': 'Direct Debit S14 0410',
'note': 'Direct debit S14 0410 AC07 Rek.nummer blokkade TESTBANK/NL/20141229/01206408',
'partner_name': 'Test Customer',
'ref': 'TESTBANK/NL/20141229/01206408'},
{'account_number': 'NL46ABNA0499998748',
'amount': -100.0,
'date': '2014-01-05',
'name': 'Direct debit S14 0410 AC07 Rek.nummer blokkade TESTBANK/NL/20141229/01206408',
'note': 'Direct Debit S14 0410',
'name': 'Direct Debit S14 0410',
'note': 'Direct debit S14 0410 AC07 Rek.nummer blokkade TESTBANK/NL/20141229/01206408',
'partner_name': 'Test Customer',
'ref': 'TESTBANK/NL/20141229/01206407'},
{'account_number': 'NL69ABNA0522123643',
'amount': 1405.31,
'date': '2014-01-05',
'name': '#RD PARTY MEDIA CUSNO 90782 4210773',
'note': 'INNDNL2U20140105000217200000708',
'name': 'INNDNL2U20140105000217200000708',
'note': '#RD PARTY MEDIA CUSNO 90782 4210773',
'partner_name': '3rd party Media',
'ref': '115'}]}])
Loading…
Cancel
Save