Giter VIP home page Giter VIP logo

bank-statement-import's Introduction

Runboat Pre-commit Status Build Status codecov Translation Status

OCA bank statement import modules for Odoo

This repository hosts additionnal parsers and import features for bank statements.

Available addons

addon version maintainers summary
account_statement_import_base 16.0.1.0.0 alexis-via Base module for Bank Statement Import
account_statement_import_camt 16.0.1.0.2 CAMT Format Bank Statements Import
account_statement_import_camt54 16.0.1.0.0 Bank Account Camt54 Import
account_statement_import_file 16.0.1.0.2 alexis-via Import Statement Files
account_statement_import_file_reconcile_oca 16.0.1.0.0 alexis-via Import Statement Files and Go Direct to Reconciliation
account_statement_import_ofx 16.0.1.0.0 alexis-via Import OFX Bank Statement
account_statement_import_online 16.0.1.3.0 alexey-pelykh Online bank statements update
account_statement_import_online_gocardless 16.0.1.2.3 Online Bank Statements: GoCardless
account_statement_import_online_ofx 16.0.1.0.0 Online bank statements for OFX
account_statement_import_online_paypal 16.0.1.0.1 alexey-pelykh Online bank statements for PayPal.com
account_statement_import_online_ponto 16.0.1.1.1 Online Bank Statements: MyPonto.com
account_statement_import_online_qonto 16.0.1.0.0 Online Bank Statements: Qonto
account_statement_import_qif 16.0.1.0.0 Import QIF Bank Statements
account_statement_import_sheet_file 16.0.1.1.2 alexey-pelykh Import TXT/CSV or XLSX files as Bank Statements in Odoo

Licenses

This repository is licensed under AGPL-3.0.

However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA) policy. Consult each module's __manifest__.py file, which contains a license key that explains its license.


OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

bank-statement-import's People

Contributors

adrianojprado avatar alexis-via avatar bosd avatar carolinafernandez-tecnativa avatar etobella avatar francesco-ooops avatar gelo-fl avatar i-vyshnevska avatar ibuioli avatar ivorra78 avatar jasminsforgeflow avatar jordibforgeflow avatar lmignon avatar luc-demeyer avatar mayteglc avatar metingulsoy avatar miquelrforgeflow avatar mymage avatar nl66278 avatar oca-git-bot avatar oca-transbot avatar oca-travis avatar pedrobaeza avatar pere-aquarian avatar peterromao avatar primes2h avatar stefanrijnhart avatar victoralmau avatar weblate avatar yvesldff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bank-statement-import's Issues

Active PRs status

A try to summarize the current situation...

OFX statement import with non IBAN account

When I try to import an OFX statement to a non-IBAN account in v.12, I get the following error:

The IBAN is invalid, it should begin with the country code

How do I import my statements ?

Thanks in advance!

[11] information of tag Ref not copied to reconcile screen

In the bankstatement I'm missing information. It is only visible when you are in the form view account.view_bank_statement_form. But when you do reconciliation, it only shows you the character '/'.

      <Ntry>
        <NtryRef>772</NtryRef>
        <Amt Ccy="EUR">10160.00</Amt>
        <CdtDbtInd>DBIT</CdtDbtInd>
        <Sts>BOOK</Sts>
        <BookgDt>
          <Dt>2019-12-31</Dt>
        </BookgDt>
        <ValDt>
          <Dt>2019-12-31</Dt>
        </ValDt>
        <AcctSvcrRef>O10187110691:CI36DT</AcctSvcrRef>
        <BkTxCd>
          <Domn>
            <Cd>PMNT</Cd>
            <Fmly>
              <Cd>ICDT</Cd>
              <SubFmlyCd>ESCT</SubFmlyCd>
            </Fmly>
          </Domn>
          <Prtry>
            <Cd>544</Cd>
            <Issr>RABOBANK</Issr>
          </Prtry>
        </BkTxCd>
        <NtryDtls>
          <TxDtls>
            <Refs>
              <AcctSvcrRef>O10187110691</AcctSvcrRef>
            </Refs>
            <AmtDtls>
              <TxAmt>
                <Amt Ccy="EUR">10160.00</Amt>
              </TxAmt>
              <PrtryAmt>
                <Tp>IBS</Tp>
                <Amt Ccy="EUR">10160.00</Amt>
              </PrtryAmt>
            </AmtDtls>
            <BkTxCd>
              <Domn>
                <Cd>PMNT</Cd>
                <Fmly>
                  <Cd>ICDT</Cd>
                  <SubFmlyCd>ESCT</SubFmlyCd>
                </Fmly>
              </Domn>
              <Prtry>
                <Cd>544</Cd>
                <Issr>RABOBANK</Issr>
              </Prtry>
            </BkTxCd>
            <RltdPties>
              <Cdtr>
                <Nm>belastingdienst</Nm>
              </Cdtr>
              <CdtrAcct>
                <Id>
                  <IBAN>NL86INGB0001234567</IBAN>
                </Id>
              </CdtrAcct>
            </RltdPties>
            <RltdAgts>
              <CdtrAgt>
                <FinInstnId>
                  <BIC>INGBNL2AXXX</BIC>
                </FinInstnId>
              </CdtrAgt>
            </RltdAgts>
            <RmtInf>
              <Strd>
                <CdtrRefInf>
                  <Tp>
                    <CdOrPrtry>
                      <Cd>SCOR</Cd>
                    </CdOrPrtry>
                    <Issr>CUR</Issr>
                  </Tp>
                  <Ref>5801026586901110</Ref>
                </CdtrRefInf>
              </Strd>
            </RmtInf>
            <RltdDts>
              <IntrBkSttlmDt>2019-12-31</IntrBkSttlmDt>
            </RltdDts>
          </TxDtls>
        </NtryDtls>
      </Ntry>

can we add this info from tag Ref from the file:

            <RmtInf>
              <Strd>
                <CdtrRefInf>
                  <Tp>
                    <CdOrPrtry>
                      <Cd>SCOR</Cd>
                    </CdOrPrtry>
                    <Issr>CUR</Issr>
                  </Tp>
                  <Ref>5801026586901110</Ref>
                </CdtrRefInf>
              </Strd>
            </RmtInf>

I can be done easily by adding
'./ns:RmtInf/ns:Strd/ns:CdtrRefInf/ns:Ref',
to the end of this piece of code in parser.py

    def parse_transaction_details(self, ns, node, transaction):
        """Parse TxDtls node."""
        # message
        if transaction['name'] == '/':
            self.add_value_from_node(
                ns, node, [
                    './ns:RmtInf/ns:Ustrd|./ns:RtrInf/ns:AddtlInf',
                    './ns:AddtlNtryInf',
                    './ns:Refs/ns:InstrId',

Wrong statement date in CAMT odoo v10

When i download on the 20th of December a CAMT file for a two month time period (Oct thru Nov),
i get 44 statements, all with the date of 20th Dec.

Proposition is to have 'date' filled with CLBD date (closing balance date) instead of the download date.

OFX importer doesn't assemble statement reference

The following OFX file imports correctly, but doesn't show a statement reference.
Obviously, this is confusing when importing multiple statements.

ofx

OFXHEADER:100
DATA:OFXSGML
VERSION:102
SECURITY:NONE
ENCODING:UNICODE
CHARSET:1200
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:NONE

<OFX>
<SIGNONMSGSRSV1>
<SONRS>
<STATUS>
<CODE>0
<SEVERITY>INFO
</STATUS>
<DTSERVER>20150622094052.991[-7:MST]
<LANGUAGE>ENG
<DTACCTUP>20150622094052.991[-7:MST]
</SONRS>
</SIGNONMSGSRSV1>
<CREDITCARDMSGSRSV1>
<CCSTMTTRNRS>
<TRNUID>0
<STATUS>
<CODE>0
<SEVERITY>INFO
</STATUS>
<CCSTMTRS>
<CURDEF>EUR
<CCACCTFROM>
<ACCTID>XXXXXXXXXXXX3165
</CCACCTFROM>
<BANKTRANLIST>
<DTSTART>20150104120000
<DTEND>20150105120000
<STMTTRN>
<TRNTYPE>DEBIT
<DTPOSTED>20150105120000
<DTUSER>20150104120000
<TRNAMT>-0.26
<FITID>201551811111111111111111111111111111040
<NAME>GOOGLE *SVCS61011111111
</STMTTRN>
</BANKTRANLIST>
<LEDGERBAL>
<BALAMT>-0.26
<DTASOF>20150622094052
</LEDGERBAL>
</CCSTMTRS>
</CCSTMTTRNRS>
</CREDITCARDMSGSRSV1>
</OFX>

[10.0][11.0] account_bank_statement_import_camt_oca: Please add tag AddtlInf to the name field

Impacted versions: [10.0][11.0]
Module: account_bank_statement_import_camt_oca

When the SDD is not successful (because not enough balance) the bank will send some information in the XML tag AddtlInf when you import the XML CAMT file. In the module this information is not written anywhere. It would be nice to add the information in the name field of Odoo when you import the bankstatement.

<NtryDtls>
<TxDtls>
<Refs>
<EndToEndId>DLDLASF-SDD-75114</EndToEndId>
<MndtId>PC.CBA.4897</MndtId>
</Refs>
<BkTxCd>
<Prtry>
<Cd>108</Cd>
</Prtry>
</BkTxCd>
<RltdPties>
<Dbtr>
<Nm>COMPANY BV</Nm>
<PstlAdr>
<AdrTp>ADDR</AdrTp>
<Ctry>NL</Ctry>
<AdrLine>STRAAT 2-6</AdrLine>
<AdrLine>3500 AA UTRECHT</AdrLine>
</PstlAdr>
</Dbtr>
<DbtrAcct>
<Id>
<IBAN>NL78ABNA0123456789</IBAN>
</Id>
</DbtrAcct>
</RltdPties>
<RltdAgts>
<DbtrAgt>
<FinInstnId>
<BIC>ABNANL2A</BIC>
</FinInstnId>
</DbtrAgt>
</RltdAgts>
<RmtInf>
<Ustrd>
Information for the customer
</Ustrd>
</RmtInf>
<RtrInf>
<Rsn>
<Cd>AM04</Cd>
</Rsn>
<AddtlInf>Not enough balance</AddtlInf>
</RtrInf>
<AddtlTxInf>/CSID/NL90ZZZ012345678912</AddtlTxInf>
</TxDtls>
</NtryDtls>

The easiest way would change the parser.py and change the line from
'./ns:RmtInf/ns:Ustrd'
to
'./ns:RmtInf/ns:Ustrd|./ns:RtrInf/ns:AddtlInf',
The information will be written after the Ustrd. Can you have a look if there is a better solution?

CAMT parser: Remittance information hidden in note field

Hi,

This is a question of CAMT users.

In this code:

# message
self.add_value_from_node(
ns, node, [
'./ns:RmtInf/ns:Ustrd',
'./ns:AddtlNtryInf',
'./ns:Refs/ns:InstrId',
], transaction, 'note', join_str='\n')
# name
self.add_value_from_node(
ns, node, [
'./ns:AddtlTxInf',
], transaction, 'name', join_str='\n')

we see that the Remittance information is put in the note field, while the Additional Tx Information is put in the name field.

In reconciliation and visualisation of the bank statement in Odoo, the note field is visible only by hovering over the i icon. However the most relevant information for the user is the remittance information (which incidentally is also the communication field as used by OCA/bank-payment).

What do people think about this?

8.0 Wrong start balance when lines already imported are skipped

In account_bank_statement_import/models/account_bank_statement_import.py line 374, the statement lines already imported (detected via the unique_import_id) are not created in the bank statement. But the start/end balance are not updated accordingly ! So, when the user tries to close the bank statement, he has an error message : "The statement balance is incorrect !
The expected balance (5195.42) is different than the computed one. (4850.11)"

Migration to version 12.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-12.0

Modules to migrate

Migration to version 9.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-9.0

Modules to migrate

  • account_bank_statement_import - Removed as already included in v9
  • account_bank_statement_import_mt940_nl_ing
  • account_bank_statement_import_save_file
  • account_bank_statement_import_qif - By @pedrobaeza - #81
  • account_bank_statement_import_mt940_nl_rabo
  • account_bank_statement_import_mt940_base
  • account_bank_statement_import_ofx - #44
  • account_bank_statement_import_camt - By @hbrunn - #79
  • base_bank_account_number_unique

[10.0] batch payments wrong amounts

When I import CAMT statement 053.001.02 the system will split the lines in a batch entry. But the amount it takes is from the total of that entry, not from the txdtls lines.

You will see 2 lines with 429,56 when you import the file, but it should be 329,56 and 100
selection_001

See anonymized statement

<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.02">
  <BkToCstmrStmt>
    <GrpHdr>
      <MsgId>0554789741.2018-05-16</MsgId>
      <CreDtTm>2018-05-22T10:20:21.41+02:00</CreDtTm>
      <MsgPgntn>
        <PgNb>1</PgNb>
        <LastPgInd>true</LastPgInd>
      </MsgPgntn>
    </GrpHdr>
    <Stmt>
      <Id>0554789741.2018-05-16</Id>
      <ElctrncSeqNb>000000000000000097</ElctrncSeqNb>
      <CreDtTm>2018-05-22T10:20:21.41+02:00</CreDtTm>
      <Acct>
        <Id>
          <IBAN>NL38ABNA0554789741</IBAN>
        </Id>
        <Ccy>EUR</Ccy>
        <Svcr>
          <FinInstnId>
            <BIC>ABNANL2A</BIC>
          </FinInstnId>
        </Svcr>
      </Acct>
      <Bal>
        <Tp>
          <CdOrPrtry>
            <Cd>PRCD</Cd>
          </CdOrPrtry>
        </Tp>
        <Amt Ccy="EUR">000000000000149.87</Amt>
        <CdtDbtInd>CRDT</CdtDbtInd>
        <Dt>
          <Dt>2018-05-15</Dt>
        </Dt>
      </Bal>
      <Bal>
        <Tp>
          <CdOrPrtry>
            <Cd>CLBD</Cd>
          </CdOrPrtry>
        </Tp>
        <Amt Ccy="EUR">000000000000120.39</Amt>
        <CdtDbtInd>CRDT</CdtDbtInd>
        <Dt>
          <Dt>2018-05-16</Dt>
        </Dt>
      </Bal>
      <Ntry>
        <Amt Ccy="EUR">000000000000429.56</Amt>
        <CdtDbtInd>DBIT</CdtDbtInd>
        <Sts>BOOK</Sts>
        <BookgDt>
          <Dt>2018-05-16</Dt>
        </BookgDt>
        <ValDt>
          <Dt>2018-05-16</Dt>
        </ValDt>
        <AcctSvcrRef>GB036000116738340FS</AcctSvcrRef>
        <BkTxCd>
          <Domn>
            <Cd>PMNT</Cd>
            <Fmly>
              <Cd>ICDT</Cd>
              <SubFmlyCd>ESCT</SubFmlyCd>
            </Fmly>
          </Domn>
          <Prtry>
            <Cd>N655</Cd>
            <Issr>ABNAMRO</Issr>
          </Prtry>
        </BkTxCd>
        <NtryDtls>
          <Btch>
            <MsgId>GB036000116738340FS</MsgId>
            <PmtInfId>PAY0002-20180516-NORM-NOinstr</PmtInfId>
            <NbOfTxs>000000000000002</NbOfTxs>
            <TtlAmt Ccy="EUR">00000000000000429.56</TtlAmt>
            <CdtDbtInd>DBIT</CdtDbtInd>
          </Btch>
          <TxDtls>
            <Refs>
              <AcctSvcrRef>GT036005753064130FS</AcctSvcrRef>
              <PmtInfId>PAY0002-20180516-NORM-NOinstr</PmtInfId>
              <EndToEndId>L00001</EndToEndId>
            </Refs>
            <AmtDtls>
              <TxAmt>
                <Amt Ccy="EUR">000000000000329.56</Amt>
              </TxAmt>
            </AmtDtls>
            <RltdPties>
              <Cdtr>
                <Nm>COMPANY 1</Nm>
                <PstlAdr>
                  <Ctry>NL</Ctry>
                  <AdrLine>POSTBUS 10000</AdrLine>
                  <AdrLine>1000 AA  AMSTERDAM</AdrLine>
                </PstlAdr>
              </Cdtr>
              <CdtrAcct>
                <Id>
                  <IBAN>NL37ABNA0677897947</IBAN>
                </Id>
              </CdtrAcct>
            </RltdPties>
            <RltdAgts>
              <DbtrAgt>
                <FinInstnId>
                  <BIC>ABNANL2A</BIC>
                </FinInstnId>
              </DbtrAgt>
              <CdtrAgt>
                <FinInstnId>
                  <BIC>ABNANL2A</BIC>
                </FinInstnId>
              </CdtrAgt>
            </RltdAgts>
            <RmtInf>
              <Ustrd>REGEL 1</Ustrd>
            </RmtInf>
          </TxDtls>
          <TxDtls>
            <Refs>
              <AcctSvcrRef>GT036005753064140FS</AcctSvcrRef>
              <PmtInfId>PAY0002-20180516-NORM-NOinstr</PmtInfId>
              <EndToEndId>L00002</EndToEndId>
            </Refs>
            <AmtDtls>
              <TxAmt>
                <Amt Ccy="EUR">000000000000100.00</Amt>
              </TxAmt>
            </AmtDtls>
            <RltdPties>
              <Cdtr>
                <Nm>COMPANY 2</Nm>
                <PstlAdr>
                  <Ctry>NL</Ctry>
                  <AdrLine>MARKT 1</AdrLine>
                  <AdrLine>4811 AA  BREDA</AdrLine>
                </PstlAdr>
              </Cdtr>
              <CdtrAcct>
                <Id>
                  <IBAN>NL43ABNA0677898711</IBAN>
                </Id>
              </CdtrAcct>
            </RltdPties>
            <RltdAgts>
              <DbtrAgt>
                <FinInstnId>
                  <BIC>ABNANL2A</BIC>
                </FinInstnId>
              </DbtrAgt>
              <CdtrAgt>
                <FinInstnId>
                  <BIC>ABNANL2A</BIC>
                </FinInstnId>
              </CdtrAgt>
            </RltdAgts>
            <RmtInf>
              <Ustrd>REGEL 2</Ustrd>
            </RmtInf>
          </TxDtls>
        </NtryDtls>
        <AddtlNtryInf>/TRTP/SEPA Batch/PREF/PAY0002-20180516-NORM-NOinstr/NRTX/0000002</AddtlNtryInf>
      </Ntry>
      <Ntry>
        <Amt Ccy="EUR">000000000000099.92</Amt>
        <CdtDbtInd>DBIT</CdtDbtInd>
        <Sts>BOOK</Sts>
        <BookgDt>
          <Dt>2018-05-16</Dt>
        </BookgDt>
        <ValDt>
          <Dt>2018-05-16</Dt>
        </ValDt>
        <AcctSvcrRef>8136K0819903468S0AI</AcctSvcrRef>
        <BkTxCd>
          <Domn>
            <Cd>PMNT</Cd>
            <Fmly>
              <Cd>ICDT</Cd>
              <SubFmlyCd>ESCT</SubFmlyCd>
            </Fmly>
          </Domn>
          <Prtry>
            <Cd>N658</Cd>
            <Issr>ABNAMRO</Issr>
          </Prtry>
        </BkTxCd>
        <NtryDtls>
          <TxDtls>
            <Refs>
              <MsgId>ISCT180516000122001</MsgId>
              <AcctSvcrRef>8136K0819903468S0AI</AcctSvcrRef>
              <EndToEndId>NOTPROVIDED</EndToEndId>
            </Refs>
            <AmtDtls>
              <TxAmt>
                <Amt Ccy="EUR">000000000000099.92</Amt>
              </TxAmt>
            </AmtDtls>
            <RltdPties>
              <Cdtr>
                <Nm>COMPANY 3</Nm>
              </Cdtr>
              <CdtrAcct>
                <Id>
                  <IBAN>NL86HSBC0987651548</IBAN>
                </Id>
              </CdtrAcct>
            </RltdPties>
            <RltdAgts>
              <DbtrAgt>
                <FinInstnId>
                  <BIC>ABNANL2A</BIC>
                </FinInstnId>
              </DbtrAgt>
              <CdtrAgt>
                <FinInstnId>
                  <BIC>HSBCNL2A</BIC>
                </FinInstnId>
              </CdtrAgt>
            </RltdAgts>
            <RmtInf>
              <Ustrd>REGEL 3</Ustrd>
            </RmtInf>
          </TxDtls>
        </NtryDtls>
        <AddtlNtryInf>/TRTP/SEPA OVERBOEKING/IBAN/NL86HSBC0987651548/BIC/HSBCNL2A/NAME/COMPANY 3/REMI/REGEL 3/EREF/NOTPROVIDED</AddtlNtryInf>
      </Ntry>
      <Ntry>
        <Amt Ccy="EUR">000000000000500.00</Amt>
        <CdtDbtInd>CRDT</CdtDbtInd>
        <Sts>BOOK</Sts>
        <BookgDt>
          <Dt>2018-05-16</Dt>
        </BookgDt>
        <ValDt>
          <Dt>2018-05-16</Dt>
        </ValDt>
        <AcctSvcrRef>8136K0002824992S0AI</AcctSvcrRef>
        <BkTxCd>
          <Domn>
            <Cd>PMNT</Cd>
            <Fmly>
              <Cd>RCDT</Cd>
              <SubFmlyCd>ESCT</SubFmlyCd>
            </Fmly>
          </Domn>
          <Prtry>
            <Cd>N658</Cd>
            <Issr>ABNAMRO</Issr>
          </Prtry>
        </BkTxCd>
        <NtryDtls>
          <TxDtls>
            <Refs>
              <AcctSvcrRef>8136K0002824992S0AI</AcctSvcrRef>
              <EndToEndId>NOTPROVIDED</EndToEndId>
            </Refs>
            <AmtDtls>
              <TxAmt>
                <Amt Ccy="EUR">000000000000500.00</Amt>
              </TxAmt>
            </AmtDtls>
            <RltdPties>
              <Dbtr>
                <Nm>COMPANY 4</Nm>
                <PstlAdr>
                  <AdrLine>STRAAT 33</AdrLine>
                  <AdrLine>4904 AA  OOSTERHOUT NB</AdrLine>
                </PstlAdr>
              </Dbtr>
              <DbtrAcct>
                <Id>
                  <IBAN>NL50ABNA0867498795</IBAN>
                </Id>
              </DbtrAcct>
            </RltdPties>
            <RltdAgts>
              <DbtrAgt>
                <FinInstnId>
                  <BIC>ABNANL2A</BIC>
                </FinInstnId>
              </DbtrAgt>
              <CdtrAgt>
                <FinInstnId>
                  <BIC>ABNANL2A</BIC>
                </FinInstnId>
              </CdtrAgt>
            </RltdAgts>
            <RmtInf>
              <Ustrd>overboeking</Ustrd>
            </RmtInf>
          </TxDtls>
        </NtryDtls>
        <AddtlNtryInf>/TRTP/SEPA OVERBOEKING/IBAN/NL50ABNA0867498795/BIC/ABNANL2A/NAME/COMPANY 4/REMI/overboeking/EREF/NOTPROVIDED</AddtlNtryInf>
      </Ntry>
    </Stmt>
  </BkToCstmrStmt>
</Document>

[8.0] Constraint unique over 'sanitazed_acc_number'

We've just update a customer with last changes, including PR : #19
And we've have this issue.

Our customer has two partners with the same acc_number. I understand that this use case is not common (or maybe a mistake by user) in B2B. But in B2C it could happend. For example, my wife and me have the same acc_number (we are co-titulars), and want to make different registration in the same Odoo e-commerce. Both partners will have the same acc_number.

I suggest to create a new contraint (partner_id, sanitazed_acc_number), but maybe this is not the point of this restriction.

What do you think?

[RFC] account_bank_statement_import_paypal

@pedrobaeza Tecnativa worked on this module, and I'm thinking that it could use some improvement, but it seems that it will be significant. Whom to talk with about that? I want to:

  • Enhance fields mapping
  • Stop merging currency exchange lines (that is just not correct for accounting!)
  • Import only matching currency
  • Issue unique ID for commission lines as well
  • Support both statements and activity reports import

BUT! So far it looks like a complete module revamp would be faster and easier for me. And I want to talk to someone about that

Order of mutations

This is more of a feature request than an issue.

After importing a statement, Odoo lets you reconcile the entries. This happens in the order in which the entries appear in the statement. If the statements are exported (like my bank does) in reverse order, then the most recent entry is presented first for reconciliation.

This is inconvenient because Odoo will present the oldest invoices first for reconciliation.

It would be nice if the importer orders the statement entries by date, oldest first.

acc_number vs. sanitized_acc_number

I'm a bit bothered by the data duplication that sanitized_acc_number introduces and the hoops we've got to jump through in https://github.com/OCA/bank-statement-import/blob/8.0/account_bank_statement_import/res_partner_bank.py#L49 to make it work as users would expect.

What is the rationale behind this?

If it's only for reliably finding the right account number, I'd suggest the following:

  • sanitize existing account numbers in an init hook
  • sanitize input during create and write
  • provide a form/tree widget for pretty formatting of IBANs (that is made is a way to be easily overridden in localization modules)
  • provide a search widget that sanitizes IBANs for searching

What do you think?

Will Camt be supported?

Hi,
I'm trying to import bank statements from the dutch bank Triodos but I'm not having success at the moment.

I tried the import camt module by NL66278 but it either doesn't import all the statements (from a an xml with 2 months worth of statements) or when I do them 1 by 1 it takes the first file but with the second it says it was already imported. Can't raise an issue at NL66278's github page.

So I was wondering if it will get merged into this import module or if someone has another way of getting Triodos statements in to Odoo.

Migration to version 13.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-13.0

Modules to migrate

Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list

[11.0] strptime() argument 1 must be str, not datetime.date

Hello,
I'm trying to use your modules for importing paypal monthly statements as well as bank statements (camt.053) via this which use your as dependancy.

For both statements (paypal and postfinance), I get the same python error, which is:
TypeError: strptime() argument 1 must be str, not datetime.date

Stacktrace:

Erreur:
Odoo Server Error

Traceback (most recent call last):
  File "/srv/odoo/odoo11-itopie/odoo/http.py", line 651, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/srv/odoo/odoo11-itopie/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/srv/odoo/odoo11-itopie/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/srv/odoo/odoo11-itopie/odoo/http.py", line 693, in dispatch
    result = self._call_function(**self.params)
  File "/srv/odoo/odoo11-itopie/odoo/http.py", line 342, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/srv/odoo/odoo11-itopie/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/srv/odoo/odoo11-itopie/odoo/http.py", line 335, in checked_call
    result = self.endpoint(*a, **kw)
  File "/srv/odoo/odoo11-itopie/odoo/http.py", line 937, in __call__
    return self.method(*args, **kw)
  File "/srv/odoo/odoo11-itopie/odoo/http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "/srv/odoo/odoo11-itopie/addons/web/controllers/main.py", line 938, in call_button
    action = self._call_kw(model, method, args, {})
  File "/srv/odoo/odoo11-itopie/addons/web/controllers/main.py", line 926, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/srv/odoo/odoo11-itopie/odoo/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/srv/odoo/odoo11-itopie/odoo/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/srv/odoo/odoo11-itopie/addons/account_bank_statement_import/account_bank_statement_import.py", line 49, in import_file
    stmts_vals = self._complete_stmts_vals(stmts_vals, journal, account_number)
  File "/srv/odoo/odoo11-itopie/addons-oca-enabled/account_bank_statement_import_split/models/account_bank_statement_import.py", line 77, in _complete_stmts_vals
    statement_date_until,
  File "/srv/odoo/odoo11-itopie/addons-oca-enabled/account_bank_statement_import_split/models/account_bank_statement_import.py", line 152, in _get_statement_name
    ir_sequence_date=self._get_statement_date(date_since, date_until)
  File "/srv/odoo/odoo11-itopie/odoo/addons/base/ir/ir_sequence.py", line 263, in next_by_id
    return self._next()
  File "/srv/odoo/odoo11-itopie/odoo/addons/base/ir/ir_sequence.py", line 257, in _next
    return seq_date.with_context(ir_sequence_date_range=seq_date.date_from)._next()
  File "/srv/odoo/odoo11-itopie/odoo/addons/base/ir/ir_sequence.py", line 352, in _next
    return self.sequence_id.get_next_char(number_next)
  File "/srv/odoo/odoo11-itopie/odoo/addons/base/ir/ir_sequence.py", line 224, in get_next_char
    interpolated_prefix, interpolated_suffix = self._get_prefix_suffix()
  File "/srv/odoo/odoo11-itopie/odoo/addons/base/ir/ir_sequence.py", line 215, in _get_prefix_suffix
    d = _interpolation_dict()
  File "/srv/odoo/odoo11-itopie/odoo/addons/base/ir/ir_sequence.py", line 199, in _interpolation_dict
    effective_date = datetime.strptime(self._context.get('ir_sequence_date'), '%Y-%m-%d')
TypeError: strptime() argument 1 must be str, not datetime.date

Odoo Version: 11.0
Python version: 3.5.3
OS: Debian Stretch (9.6)

Could you help me ?

Thanks in advance

[8.0] base_bank_account_number_unique: Not valid for multi-company

If you install the module base_bank_account_number_unique and you have multi-company, you can find that you have a customer in two companies that needs to define 2 res.partner.bank records, one for each company, and this module prevents it.

I think the unique condition should be done for both the sanitized account bank number and the company_id.

Wrong start and end balance

The OFX importer doesn't calculate the start and end balance correctly. Logically, the balance on a statement is the balance at the statement date. All mutations on the statement must have preceded the statement date (you can't see the future). Hence, the balance at the statement date is the end balance.

The code calculates start and end balance:

            'balance_start': ofx.account.statement.balance,
            'balance_end_real':
                float(ofx.account.statement.balance) + total_amt,

But it should rather do:

            'balance_end_real': ofx.account.statement.balance,
            'balance_start':
                float(ofx.account.statement.balance) - total_amt,

Module can't be installed in Odoo 8

I'm running the nightly 8.0 stable odoo and when I try to import this module it gives an error. I have downloaded the 8.0 branch zip file and tried installing it several different ways. There is some missing field that shows up in the server log file that says:
Error details:
Field module_base_bank_account_number_unique does not exist

import qif for odoo 11?

I managed to install successfully but am getting this error when uploading.

"Could not make sense of the given file.
Did you install the module to support this type of file ?"

Console error as follow:
web.assets_common.js:3832 Server application error {"message":"Odoo Server Error","data":{"name":"odoo.exceptions.UserError","message":"Could not make sense of the given file.\nDid you install the module to support this type of file ?\n","exception_type":"user_error","arguments":["Could not make sense of the given file.\nDid you install the module to support this type of file ?",""],"debug":"Traceback (most recent call last):\n File "/opt/odoo/odoo/odoo/http.py", line 650, in _handle_exception\n return super(JsonRequest, self)._handle_exception(exception)\n File "/opt/odoo/odoo/odoo/http.py", line 310, in _handle_exception\n raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])\n File "/opt/odoo/odoo/odoo/tools/pycompat.py", line 87, in reraise\n raise value\n File "/opt/odoo/odoo/odoo/http.py", line 692, in dispatch\n result = self._call_function(**self.params)\n File "/opt/odoo/odoo/odoo/http.py", line 342, in _call_function\n return checked_call(self.db, *args, **kwargs)\n File "/opt/odoo/odoo/odoo/service/model.py", line 97, in wrapper\n return f(dbname, *args, **kwargs)\n File "/opt/odoo/odoo/odoo/http.py", line 335, in checked_call\n result = self.endpoint(*a, **kw)\n File "/opt/odoo/odoo/odoo/http.py", line 936, in call\n return self.method(*args, **kw)\n File "/opt/odoo/odoo/odoo/http.py", line 515, in response_wrap\n response = f(*args, **kw)\n File "/opt/odoo/odoo/addons/web/controllers/main.py", line 935, in call_button\n action = self._call_kw(model, method, args, {})\n File "/opt/odoo/odoo/addons/web/controllers/main.py", line 923, in _call_kw\n return call_kw(request.env[model], method, args, kwargs)\n File "/opt/odoo/odoo/odoo/api.py", line 689, in call_kw\n return call_kw_multi(method, model, args, kwargs)\n File "/opt/odoo/odoo/odoo/api.py", line 680, in call_kw_multi\n result = method(recs, *args, **kwargs)\n File "/opt/odoo/odoo/addons/muk_account_bank_statement_import_sheet/wizards/account_bank_statement_import.py", line 72, in import_file\n return super(AccountBankStatementImport, self).import_file()\n File "/opt/odoo/odoo/addons/account_bank_statement_import/account_bank_statement_import.py", line 37, in import_file\n currency_code, account_number, stmts_vals = self.with_context(active_id=self.ids[0])._parse_file(base64.b64decode(self.data_file))\n File "/opt/odoo/odoo/addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py", line 24, in _parse_file\n data_file)\n File "/opt/odoo/odoo/addons/account_bank_statement_import/account_bank_statement_import.py", line 108, in parse_file\n raise UserError(('Could not make sense of the given file.\nDid you install the module to support this type of file ?'))\nodoo.exceptions.UserError: ('Could not make sense of the given file.\nDid you install the module to support this type of file ?', '')\n"},"code":200}

CAMT statement without transactions fail to import

Importing a camt.053 without any transactions fail to import.
e.g. a statement with only an opening and closing balance.

this is due to the following check:
account_bank_statement_import_camt/camt.py in def parse

        for node in root[0][1:]:
            statement = self.parse_statement(ns, node)
            **if len(statement['transactions']):**
                if 'currency' in statement:
                    currency = statement.pop('currency')
                if 'account_number' in statement:
                    account_number = statement.pop('account_number')
                statements.append(statement)
        return currency, account_number, statements

I will create a PR to remove this check. Or is there a specific reason for this check?

wrong reference to account_bank_statement_import in the README

Hello, the repo README states:

This repository hosts:

-  a 10.0 backport of the account_bank_statement_import modules from the master branch

But this was true until the 8.0 branch. In the 9.0 and 10.0 branches this is not true anymore as the account_bank_statement_import is now part of the Odoo SA core modules. So I think we should remove this statements from the README in the 9.0 and 10.0 branches to clarify.

[RFC] account_bank_statement_import_advanced

@pedrobaeza I want to create another module that would allow importing one large statement splitting it by days, weeks, or months. And few other improvements like partner resolution using extra fields (move that out of paypal). But I don't want to rush with naming of module before you say ok to avoid changing the name afterwards.

[IMPROVEMENT] SNS Bank MT940 Support

Hi,

SNS Bank also allows you to download MT940 file format (both personal & business account).

We can create a new module, called: account_bank_statement_import_mt940_nl_sns.

I attached example from a MT940 export file (by default zipped in a zip file). And a specification file of SNS itself.
See both attachments below.

SNS Informatiewijzer
6_0016_35_1511_Informatiewijzer_MT940_rapportage.pdf

MT940 Export file example
tr-info_15785279_20180104123832.zip

I hope we can make a new SNS module to support importing MT940 files to Odoo!

Regards,
Melroy van den Berg

8.0 crash when migrating

Here is a crash when migrating to 8.0:

2015-12-15 17:33:28,437 11044 INFO o7_uni1 openerp.modules.migration: module account_bank_statement_import: Running migration [8.0.1.0>] post-migrate
2015-12-15 17:33:28,438 11044 INFO o7_uni1 openerp.modules.migration: module account_bank_statement_import: Running migration [8.0.1.0>] post-migrate
2015-12-15 17:33:28,439 11044 ERROR o7_uni1 openerp.sql_db: Programming error: column "trans" does not exist
LINE 4: ...         first_value(id) over (partition by trans) id, trans
                                                                  ^
, in query update account_bank_statement_line l set unique_import_id=l1.trans
        from (
            select distinct
            first_value(id) over (partition by trans) id, trans
            from account_bank_statement_line
        ) l1
        where l.id=l1.id
2015-12-15 17:33:28,439 11044 ERROR o7_uni1 openerp.modules.loading: Error executing post migration script for module account_bank_statement_import
`-> account_statement_completion_label_simple
: column "trans" does not exist
LINE 4: ...         first_value(id) over (partition by trans) id, trans
                                                                  ^

It is caused by this code, by @hbrunn : https://github.com/OCA/bank-statement-import/blob/8.0/account_bank_statement_import/migrations/8.0.1.0/post-migrate.py#L27

The comment above says "if we end up here, we migrate from 7.0's account_banking set transaction ids, taking care to enforce uniqueness". In my case, I didn't have account_banking on v7. This code should be "protected" to make sure that it is executed only when "trans" exists on account_bank_statement_line.

Field 'ref' is empty when debit card payments are reconciled by our bank

Odoo v10:

In a restaurant, customers can pay with debit card.
The total amount paid is reconciled the next day by a payment from our bank.
This leads to the following CAMT record:

<Ntry>
    <Amt Ccy="EUR">3690.55</Amt>
    <CdtDbtInd>CRDT</CdtDbtInd>
    <RvslInd>false</RvslInd>
    <Sts>BOOK</Sts>
    <BookgDt>
        <Dt>2017-10-02</Dt>
    </BookgDt>
    <ValDt>
        <Dt>2017-09-30</Dt>
    </ValDt>
    <BkTxCd>
        <Prtry>
            <Cd>216</Cd>
        </Prtry>
    </BkTxCd>
    <NtryDtls>
        <TxDtls>
            <BkTxCd>
                <Prtry>
                    <Cd>216</Cd>
                </Prtry>
            </BkTxCd>
            <RmtInf>
                <Ustrd>AFREK. BETAALAUTOMAAT Maestro      REFNR. 897401                      DAT. 20170929 AANT. 41</Ustrd>
            </RmtInf>
        </TxDtls>
    </NtryDtls>
</Ntry>

As you can see, the field 'ref' will not be filled, because the indicators are missing
'./ns:RmtInf/ns:Strd/ns:CdtrRefInf/ns:Ref',
'./ns:Refs/ns:EndToEndId',
Whereas the field 'note' will be filled, because the indicators are there
'./ns:RmtInf/ns:Ustrd',
'./ns:AddtlNtryInf',
'./ns:Refs/ns:InstrId',

Suggestion is to have the field 'note' overwrite the field 'ref' whenever the latter is empty.

Thx Ron

A bank account transactions can be imported only once

I reinstalled odoo several times in I have this error, ever time the first import I got this message...

Server application error {"code":200,"message":"Odoo Server Error","data":{"name":"odoo.exceptions.ValidationError","debug":"Traceback (most recent call last):\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/service/model.py", line 97, in wrapper\n return f(dbname, *args, **kwargs)\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/http.py", line 335, in checked_call\n result = self.endpoint(*a, **kw)\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/http.py", line 937, in call\n return self.method(*args, **kw)\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/http.py", line 515, in response_wrap\n response = f(*args, **kw)\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/addons/web/controllers/main.py", line 938, in call_button\n action = self._call_kw(model, method, args, {})\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/addons/web/controllers/main.py", line 926, in _call_kw\n return call_kw(request.env[model], method, args, kwargs)\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/api.py", line 689, in call_kw\n return call_kw_multi(method, model, args, kwargs)\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/api.py", line 680, in call_kw_multi\n result = method(recs, *args, **kwargs)\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/addons/account_bank_statement_import/account_bank_statement_import.py", line 51, in import_file\n statement_ids, notifications = self._create_bank_statements(stmts_vals)\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/addons/account_bank_statement_import/account_bank_statement_import.py", line 238, in _create_bank_statements\n statement_ids.append(BankStatement.create(st_vals).id)\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/addons/mail/models/mail_thread.py", line 238, in create\n thread = super(MailThread, self).create(values)\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/models.py", line 3373, in create\n record = self.browse(self._create(old_vals))\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/models.py", line 3520, in _create\n field.write(self.with_context(rel_context), vals[name], create=True)\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/fields.py", line 2275, in write\n comodel.create(act[2])\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/addons/account/models/account_bank_statement.py", line 393, in create\n line = super(AccountBankStatementLine, self).create(vals)\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/models.py", line 3373, in create\n record = self.browse(self._create(old_vals))\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/models.py", line 3466, in _create\n cr.execute(query, tuple(u[2] for u in updates if len(u) > 2))\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/sql_db.py", line 155, in wrapper\n return f(self, *args, **kwargs)\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/sql_db.py", line 232, in execute\n res = self._obj.execute(query, params)\npsycopg2.IntegrityError: duplicate key value violates unique constraint "account_bank_statement_line_unique_import_id"\nDETAIL: Key (unique_import_id)=(56D4B152A58E40E9B9EF6B6976F56C50-7-26/12/2017077) already exists.\n\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/http.py", line 651, in _handle_exception\n return super(JsonRequest, self)._handle_exception(exception)\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/http.py", line 310, in _handle_exception\n raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/tools/pycompat.py", line 87, in reraise\n raise value\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/http.py", line 693, in dispatch\n result = self._call_function(**self.params)\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/http.py", line 342, in _call_function\n return checked_call(self.db, *args, **kwargs)\n File "/opt/odoo-server/apps/odoo/lib/odoo-11.0.post20181218-py3.7.egg/odoo/service/model.py", line 119, in wrapper\n raise ValidationError(tr(registry._sql_error[key], 'sql_constraint') or inst.pgerror)\nodoo.exceptions.ValidationError: ('A bank account transactions can be imported only once !', None)\n","message":"A bank account transactions can be imported only once !\nNone","arguments":["A bank account transactions can be imported only once !",null],"exception_type":"validation_error"}}

Zipped CAMT not possible

When choosing 'import statement' from accounting it is not possible to use a zipped CAMT file.

Warning given: 'Could not make sense of the given file. Did you install the module to support this type of file ?'

A single CAMT file import works fine.

Tested on Windows 10 with odoo 9 and 10.

Dave

ERROR while Import odoo8

Hello
Ive Installed the odoo8 on a synology DS. i have installed the Module and if i press the Import button i get this response:
Field account.bank.statement.import.hide_journal_field is accessed before being computed.

The Logfile is:

2018-02-28 21:09:18,744 11680 ERROR Zoggeli openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 499, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 516, in dispatch
    result = self._call_function(**self.params)
  File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 282, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 279, in checked_call
    return self.endpoint(*a, **kw)
  File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 732, in __call__
    return self.method(*args, **kw)
  File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 375, in response_wrap
    response = f(*args, **kw)
  File "/var/packages/Odoo8/target/addons/web/controllers/main.py", line 944, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/var/packages/Odoo8/target/addons/web/controllers/main.py", line 936, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/openerp/models.py", line 1331, in default_get
    value = record[name]
  File "/usr/local/lib/python2.7/site-packages/openerp/models.py", line 5441, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/usr/local/lib/python2.7/site-packages/openerp/fields.py", line 717, in __get__
    return record._cache[self]
  File "/usr/local/lib/python2.7/site-packages/openerp/models.py", line 5775, in __getitem__
    return value.get() if isinstance(value, SpecialValue) else value
  File "/usr/local/lib/python2.7/site-packages/openerp/fields.py", line 55, in get
    raise self.exception
Warning: Field account.bank.statement.import.hide_journal_field is accessed before being computed.

so what can i do? did i forget somthing?

kind regards
bambid

test of ofx imports fails, resulting in all bank import buildouts to turn red

test of ofx imports fails, resulting in all bank import buildouts to turn red

The problem seems to be that the version of ofx used in buildout no longer recognizes an balance attribute on ofx.statement.

2016-10-20 10:14:09,554 7004 INFO openerp_test openerp.modules.module: module account_bank_statement_import_ofx: creating or updating database tables

2016-10-20 10:14:09,568 7004 INFO openerp_test openerp.modules.loading: loading account_bank_statement_import_ofx/demo/demo_data.xml

2016-10-20 10:14:09,626 7004 INFO openerp_test openerp.modules.module: openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement running tests.

2016-10-20 10:14:09,627 7004 INFO openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: test_ofx_file_import (openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement.TestOfxFile)

2016-10-20 10:14:09,658 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ERROR

2016-10-20 10:14:09,658 7004 INFO openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ======================================================================

2016-10-20 10:14:09,658 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ERROR: test_ofx_file_import (openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement.TestOfxFile)

2016-10-20 10:14:09,659 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: Traceback (most recent call last):

2016-10-20 10:14:09,659 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` File "/home/travis/build/NL66278/bank-statement-import/account_bank_statement_import_ofx/tests/test_import_bank_statement.py", line 23, in test_ofx_file_import

2016-10-20 10:14:09,659 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` bank_statement.import_file()

2016-10-20 10:14:09,659 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` File "/home/travis/odoo-8.0/openerp/api.py", line 266, in wrapper

2016-10-20 10:14:09,659 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` return new_api(self, _args, *_kwargs)

2016-10-20 10:14:09,659 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` File "/home/travis/build/NL66278/bank-statement-import/account_bank_statement_import/models/account_bank_statement_import.py", line 68, in import_file

2016-10-20 10:14:09,659 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` )._import_file(data_file)

2016-10-20 10:14:09,660 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` File "/home/travis/odoo-8.0/openerp/api.py", line 266, in wrapper

2016-10-20 10:14:09,660 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` return new_api(self, _args, *_kwargs)

2016-10-20 10:14:09,660 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` File "/home/travis/build/NL66278/bank-statement-import/account_bank_statement_import/models/account_bank_statement_import.py", line 122, in _import_file

2016-10-20 10:14:09,660 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` statements = self._parse_all_files(data_file)

2016-10-20 10:14:09,660 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` File "/home/travis/odoo-8.0/openerp/api.py", line 266, in wrapper

2016-10-20 10:14:09,660 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` return new_api(self, _args, *_kwargs)

2016-10-20 10:14:09,660 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` File "/home/travis/build/NL66278/bank-statement-import/account_bank_statement_import/models/account_bank_statement_import.py", line 104, in _parse_all_files

2016-10-20 10:14:09,661 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` parse_result = self._parse_file(import_file)

2016-10-20 10:14:09,661 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` File "/home/travis/odoo-8.0/openerp/api.py", line 266, in wrapper

2016-10-20 10:14:09,661 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` return new_api(self, _args, *_kwargs)

2016-10-20 10:14:09,661 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` File "/home/travis/build/NL66278/bank-statement-import/account_bank_statement_import_ofx/account_bank_statement_import_ofx.py", line 89, in _parse_file

2016-10-20 10:14:09,661 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` 'balance_start': ofx.account.statement.balance,

2016-10-20 10:14:09,661 7004 ERROR openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: ` AttributeError: 'Statement' object has no attribute 'balance'

2016-10-20 10:14:09,661 7004 INFO openerp_test openerp.addons.account_bank_statement_import_ofx.tests.test_import_bank_statement: Ran 1 test in 0.034s

wrong import for CAMT files containing statements for multiple accounts

When a CAMT file contains multiple Stmt elements for different accounts, Odoo creates all statements for the last account found in the file.

Odoo apparently does not support this, since _parse_file returns only one account number.

Until this is supported upstream, the CAMT parser should raise an error in this situation instead of creating incorrect statements.

Migration to version 11.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-11.0

Modules to migrate

  • account_bank_statement_import_camt_oca - By @astirpe - #134 By @MaxyMoos - #158
  • account_bank_statement_import_move_line - By @gittusr - #167
  • account_bank_statement_import_mt940_base - By @feketemihai - #137
  • account_bank_statement_import_mt940_nl_ing
  • account_bank_statement_import_mt940_nl_rabo
  • account_bank_statement_import_ofx - By @njeudy - #142
  • account_bank_statement_import_qif - By @pedrobaeza - #129
  • account_bank_statement_import_save_file
  • base_bank_account_number_unique

Manual creation of temporary file

I'm just looking at the code of account_bank_statement_import_ofx/account_bank_statement_import_ofx.py line 33, and I see:

        try:
            tempfile = open("temp.ofx", "w+")
            tempfile.write(base64.decodestring(data_file))
            tempfile.read()
            pathname = os.path.dirname('temp.ofx')
            path = os.path.join(os.path.abspath(pathname), 'temp.ofx')

the code creates a temporary file "temp.ofx", without using the proper library to create a temporary file. I am not an experienced developper, but isn't it a very very bad thing ? I have always been tought that when we create a temporary file we should always use the appropriate library to manage it, so avoid security issues and other problems.

Migration to version 10.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-10.0

Modules to migrate

  • account_bank_statement_import_base - Removed as already included in v9
  • account_bank_statement_import_camt - By @StefanRijnhart - #84
  • account_bank_statement_import_mt940_base - By @astirpe - #125
  • account_bank_statement_import_mt940_nl_ing
  • account_bank_statement_import_mt940_nl_rabo
  • account_bank_statement_import_ofx - By @alexis-via - #80
  • account_bank_statement_import_qif - By @seb4itik - #92
  • account_bank_statement_import_save_file
  • base_bank_account_number_unique

import ofx should not have auto_install set to True

I do not think we should automatically install this module by defaut when we install bank statement import addons.

It has an external Python dependency that may prevent other localisation parser to be installed simply because the installation of the ofx parser failed.

8.0 [BUG] Bank statement import in Multi-company environment could assign inaccessible partner_id to statement lines

The search for a matching partner to a statement line occurs on bank account number, but this model is not multi-company-aware (there is a company_id field, but this is only meant to be filled when the bank account belongs to one of your own companies and not for partner records).

Therefore, it is possible that when person X belonging to company A imports a bank statement, that bank accounts belonging to partners of company B are found, which later on during reconcilation leads to a res.partner access error.

Import Dutch ING credit card transactions

Dutch ING business credit card transactions can be downloaded from https://www.ingbanknetservice.nl
Several formats are available: OFX, QBO, IIF, CSV, TSV, Excel.
Since an OFX importer already existed in this repository, I tried it out. However, it didn't accept the OFX I obtained from the above website. In case anyone is interested, here's copy of a transaction batch that contained just one transaction. I've replaced any personal information with Y's:

OFXHEADER:100
DATA:OFXSGML
VERSION:102
SECURITY:NONE
ENCODING:UNICODE
CHARSET:1200
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:NONE

<OFX>
<SIGNONMSGSRSV1>
<SONRS>
<STATUS>
<CODE>0
<SEVERITY>INFO
</STATUS>
<DTSERVER>20150421095114.955[-7:MST]
<LANGUAGE>ENG
<DTACCTUP>20150421095114.955[-7:MST]
</SONRS>
</SIGNONMSGSRSV1>
<CREDITCARDMSGSRSV1>
<CCSTMTTRNRS>
<TRNUID>0
<STATUS>
<CODE>0
<SEVERITY>INFO
</STATUS>
<CCSTMTRS>
<CURDEF>EUR
<CCACCTFROM>
<ACCTID>XXXXXXXXXXXX3165
</CCACCTFROM>
<BANKTRANLIST>
<DTSTART>20150104120000
<DTEND>20150105120000
<STMTTRN>
<TRNTYPE>DEBIT
<DTPOSTED>20150105120000
<DTUSER>20150104120000
<TRNAMT>-0,26
<FITID>20155183745855432865004000YYYYYYYYYY
<NAME>GOOGLE *SVCS610YYYYYYYY
</STMTTRN>
</BANKTRANLIST>
<LEDGERBAL>
<BALAMT>-0,26
<DTASOF>20150421095114
</LEDGERBAL>
</CCSTMTRS>
</CCSTMTTRNRS>
</CREDITCARDMSGSRSV1>
</OFX>

I created a bank account in Odoo that equals the creditcard number.
Not sure how the importer is supposed to map the creditcard number with the X's to the account number in Odoo.

Alternatively, there's the CSV export that contained a bit more information:

Geboekt,Plaatsgevonden,Naam leverancier,Plaats leverancier,Staat leverancier,Postcode leverancier,MCC/SIC-code,MCC-beschrijving,Oorspronkelijk bedrag,Valutabeschr,Wisselkoers,Gefactureerd bedrag,Memo?,Debet/credit,Referentienr,Datum overzicht,Naam op kaart,Kaart / account nummer
2015-01-05,2015-01-04,GOOGLE *SVCS610YYYYYYYY,[email protected],CA,94043,7311,YYYYYYYYYY SERVICES,0,31,Amerikaanse dollar (840),1,192307,0,26,False,Debit,55432865004000YYYYYYYYYY,2015-01-09,YYYYYYY BROEK,5YYYYY******3165

In case anyone wants to implement this, go right ahead. I might implement the CSV importer myself someday.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.