Browse Source

[10.0][FIX] account_bank_statement_import_camt: switch name and note

pull/178/head
Andrea 6 years ago
parent
commit
6fc47c1834
  1. 1
      account_bank_statement_import_camt/README.rst
  2. 2
      account_bank_statement_import_camt/__manifest__.py
  3. 4
      account_bank_statement_import_camt/models/parser.py
  4. 16
      account_bank_statement_import_camt/test_files/golden-camt053.pydata

1
account_bank_statement_import_camt/README.rst

@ -31,6 +31,7 @@ Contributors
* Holger Brunn <hbrunn@therp.nl>
* Stefan Rijnhart <srijnhart@therp.nl>
* Ronald Portier <rportier@therp.nl>
* Andrea Stirpe <a.stirpe@onestein.nl>
Maintainer
----------

2
account_bank_statement_import_camt/__manifest__.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.3',
'version': '10.0.1.1.4',
'license': 'AGPL-3',
'author': 'Odoo Community Association (OCA), Therp BV',
'website': 'https://github.com/OCA/bank-statement-import',

4
account_bank_statement_import_camt/models/parser.py

@ -60,12 +60,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/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