nl_abnamro skips 1-1-2012 record

Bug #1017470 reported by David Lee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Account Banking Framework
Invalid
Undecided
Unassigned
Banking Addons
Fix Released
Undecided
Unassigned

Bug Description

Hi,

I am completely new to the opererp and your account_banking framework. I find this excellent though.
I think I found an issue.

I tried to import a statement using account_banking_nl_ambamro module for jan 2012. My fist transaction is on 1.1.2012. That's the beginning of accounting period. I get error saying:

Multiple overlapping periods for date 2012-01-01 00:00:00 and company XXX

Rest of the records load.

For reproducibility. Using 6.1.1 version of openerp from simprocity.
add on downloaded from http://apps.openerp.com/addon/get_module_as_zip/7386/account_banking_nl_abnamro.zip
created a new company with year starting on 1.1.2012. Imported a statement from abn.

Feel free to let me provide more info if necessary.

Related branches

Revision history for this message
Pieter J. Kersten (EduSense BV) (pieterj) wrote :

Hi David,

The message suggests you have two valid periods on date 1/1/2012. On every date there can be only one period active. Are you sure there are no other periods active which include that date?

Revision history for this message
Bogdan Stanciu (bstanciu) wrote : Re: [Bug 1017470] Re: nl_abnamro skips 1-1-2012 record

On 25. 06. 12 15:17, Pieter J. Kersten (EduSense BV) wrote:
> Hi David,
>
> The message suggests you have two valid periods on date 1/1/2012. On
> every date there can be only one period active. Are you sure there are
> no other periods active which include that date?
>
Pieter,

what about opening/closing periods?
does the module discriminate (and exclude the o/c periods)?
everyone (I think) has e.g. Op 1.1.2012-1.1.2012 and similar closing..

regards,
Bogdan

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi David,

you are actually using the Banking Addons version of these modules, which is a port of the Account Banking Framework to OpenERP 6.0 and 6.1. (https://launchpad.net/banking-addons).

The code does indeed not exclude opening periods when performing this check. If you can confirm that you have an additional opening period on this date, then the solution will be forthcoming.

Regards,
Stefan.

Revision history for this message
David Lee (david-lee-646) wrote :

I am sorry for the late response. I see you guys are really on top of this. I am not sure what you mean exactly by:
"additional opening period on this date". I will try to reproduce with new database and provide more information.

Revision history for this message
David Lee (david-lee-646) wrote :

I can reconstruct it like this:

Setup new database without test data.
Use generic chart of accounts.
1.1.2012 till 31.12.12 with monthly period
further defaults to get to configure modules.
Installed the abn amro module.
Created an account. (0123456789 where 'your company' is the owner)
created a default journal
pressed import and got the error.

Example data I try to import:
123456789 EUR 20120101 23220,49 21220,49 20120101 -2000,00 GIRO 4444555 M T T Testen From x to y Internal
123456789 EUR 20120102 21220,49 81220,49 20120102 60000,00 66.11.66.111 P Ronald DAMSTRAAT 13-HS 1000 AA AMSTERDAM internal

Error produced

Total number of statements: 1
Total number of transactions: 2
Number of errors found: 0
Number of statements skipped due to errors: 0
Number of transactions skipped due to errors: 1
Number of statements loaded: 1
Number of transactions loaded: 1
Number of transactions matched: 0
Number of bank costs invoices created: 0

Error report:

Multiple overlapping periods for date 2012-01-01 00:00:00 and company Your Company

Revision history for this message
Pieter J. Kersten (EduSense BV) (pieterj) wrote :

Did you check the periods? There should be exactly one single 'draft' period for date 1.1.2012.
The message can only occur if there is more than one period in 'draft' state for a single date, in this case 1.1.2012.

Revision history for this message
David Lee (david-lee-646) wrote :

I have exported the periods generated by default: (It took me some time to find)

Looks like there is in deed some overlap in account_period_1, account_period_2.

What is this Opening period 00/2012. I guess I do not need it. It looks like it's different behavior in 6.0 and 6.1.

Probably this issue can be closed then.

"id","code","date_start","date_stop","fiscalyear_id/id","special","name"
"__export__.account_period_1","00/2012","2012-01-01","2012-01-01","__export__.account_period_1_1","True","Opening Period 2012"
"__export__.account_period_2","01/2012","2012-01-01","2012-01-31","__export__.account_period_1_2","False","01/2012"
"__export__.account_period_3","02/2012","2012-02-01","2012-02-29","__export__.account_period_1_3","False","02/2012"
"__export__.account_period_4","03/2012","2012-03-01","2012-03-31","__export__.account_period_1_4","False","03/2012"
"__export__.account_period_5","04/2012","2012-04-01","2012-04-30","__export__.account_period_1_5","False","04/2012"
"__export__.account_period_6","05/2012","2012-05-01","2012-05-31","__export__.account_period_1_6","False","05/2012"
"__export__.account_period_7","06/2012","2012-06-01","2012-06-30","__export__.account_period_1_7","False","06/2012"
"__export__.account_period_8","07/2012","2012-07-01","2012-07-31","__export__.account_period_1_8","False","07/2012"
"__export__.account_period_9","08/2012","2012-08-01","2012-08-31","__export__.account_period_1_9","False","08/2012"
"__export__.account_period_10","09/2012","2012-09-01","2012-09-30","__export__.account_period_1_10","False","09/2012"
"__export__.account_period_11","10/2012","2012-10-01","2012-10-31","__export__.account_period_1_11","False","10/2012"
"__export__.account_period_12","11/2012","2012-11-01","2012-11-30","__export__.account_period_1_12","False","11/2012"
"__export__.account_period_13","12/2012","2012-12-01","2012-12-31","__export__.account_period_1_13","False","12/2012"

Revision history for this message
Bogdan Stanciu (bstanciu) wrote :

On 26. 06. 12 10:32, Pieter J. Kersten (EduSense BV) wrote:
> Did you check the periods? There should be exactly one single 'draft' period for date 1.1.2012.
> The message can only occur if there is more than one period in 'draft' state for a single date, in this case 1.1.2012.
>
Hello,

By that it means go to accounting>configuration>financial
acc.>periods>periods and see the list of periods. sort by date start and
see if there are overlaps.

regards,
bogdan

Revision history for this message
Pieter J. Kersten (EduSense BV) (pieterj) wrote :

My guess is it's a period meant for setting things up. You don't need it. You can safely delete it and mark your first created period as opening/closing instead. That should solve your problem. Let me know if it worked.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi David,

thank you for working with us on this! Indeed 6.1 creates the opening/closing period automatically when configuring the fiscal year and periods.

The code did not take these special periods into account which by necessity allowed to overlap with regular periods. I adapted the code accordingly in the branch linked to this issue. After a short period the fix will be merged with the main branch and the module on Apps will be updated several days afterwards. Are you able to verify the fix by installing from the branch linked to this issue? Otherwise contact me on Launchpad and I'll send you the zip.

Thanks again,
Stefan.

Changed in banking-addons:
status: New → Confirmed
status: Confirmed → Fix Committed
Revision history for this message
David Lee (david-lee-646) wrote :
Download full text (4.4 KiB)

I copied only account_banking part of the branch into my add ons dir.
I get this now: I am confused. seems like unrelated to the problem. I will get back later on and try again.
Or do I have to take all the add ons from the branch?

Your version of OpenERP is unsupported. Support & maintenance services are available here: OpenERP Entreprise.

OpenERP Server Error

Client Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/addons/web/common/http.py", line 180, in dispatch
    response["result"] = method(controller, self, **self.params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/addons/web/controllers/main.py", line 1004, in call_button
    action = self.call_common(req, model, method, args, domain_id, context_id)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/addons/web/controllers/main.py", line 948, in call_common
    return self._call_kw(req, model, method, args, {})
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/addons/web/controllers/main.py", line 962, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/addons/web/common/openerplib/main.py", line 250, in proxy
    args, kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/addons/web/common/openerplib/main.py", line 117, in proxy
    result = self.connector.send(self.service_name, method, *args)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/addons/web/common/http.py", line 611, in send
    raise fault

Server Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/addons/web/common/http.py", line 592, in send
    result = openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/netsvc.py", line 360, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/service/web_services.py", line 572, in dispatch
    res = fn(db, uid, *params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/osv.py", line 167, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/osv.py", line 121, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/osv.py", line 164, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/addons/account_banking/wizard/bank_import.py", line 305, in import_statements_file
  File "/usr/local/lib/python2.6/dist-packages/...

Read more...

Changed in account-banking:
status: New → Invalid
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi David,

yes only the account_banking module was updated. Hope that you got revision 138 as there was still a bug in revision 137 which I originally submitted.

The trace you now have shows that the account lookup implemented for NL account numbers breaks due to a network problem. It is not related to this bug or the solution proposed. You could try at a later time indeed.

Regards,
Stefan.

Revision history for this message
David Lee (david-lee-646) wrote :

Hi guys,
I have tried and verified that it works fine out of the box as well. (I mean with default opening period created by 6.1 version)
Thank you.
Pavel

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi Pavel,

thank you for testing and confirming the proposed solution!

Regards,
Stefan.

Changed in banking-addons:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.