Overlapping fiscal years error in initial chart of accounts installation

Bug #710689 reported by Marco Dieckhoff
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Addons Team 3

Bug Description

I just installed 6.0.1 and encountered an error while defining a new database, while configuring the chart of accounts.

I set start date to 04/01/2011 (using the calender widget), end was set automatically to 03/31/2012. Monthly period.

I wanted to confirm, but got a raised error message about overlapping timeframes.

I closed it, re-checked the data (all ok), and confirmed again.

That got me an error as below, again with another confirm.

I deleted the database and started over. The error is reproduceable.

- Database preset language is German.
- Extended Interface.
- Entered company data, uploaded image.
- Choose Modules (re-translated from german names) CRM&SRM, Stock & Logistics, Disposition & Purchases, Quotations & Invoices, Bill of Material and Manufacturing
- Chart of Accounts Deutschland SKR03 und SKR04
- confirmed, got the error: You cannot define overlapping fiscal years
- clicked ok, confirmed again, got the error below.

Environment Information :
System : Windows-Vista-6.1.7600
OS Name : nt
Operating System Release : Vista
Operating System Version : 6.1.7600
Operating System Architecture : 32bit
Operating System Locale : de_DE.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 6.0.1
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/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-server/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 1961, in write
    self.datas[object_id].update(vals2)
KeyError: 1

Related branches

Revision history for this message
Marco Dieckhoff (dieck) wrote :
Revision history for this message
Marco Dieckhoff (dieck) wrote :

additionally, when I dismiss the first "hard" error (KeyError: 1) above, a second error is immediatly followed (reproduceable)

Environment Information :
System : Windows-Vista-6.1.7600
OS Name : nt
Operating System Release : Vista
Operating System Version : 6.1.7600
Operating System Architecture : 32bit
Operating System Locale : de_DE.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 6.0.1
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/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-server/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/base/res/res_config.py", line 167, in action_next
    next = self.execute(cr, uid, ids, context=None)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/account/installer.py", line 571, in execute
    super(account_installer, self).execute(cr, uid, ids, context=context)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/base/res/res_config.py", line 390, in execute
    cr, uid, ids, context=context))
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/account/installer.py", line 735, in modules_to_install
    context=context)[0]['charts']
IndexError: list index out of range

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

Hello,

I am confirming this issue because there is no option available to edit or create new Fiscal Year date with existing duplicate period with demo.The related constraint restrict to edit or create new year with the overlapping period with the same company.

Thanks.

Changed in openobject-addons:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Ashvin Rathod (OpenERP) (ara-tinyerp) wrote :

Hello Marco,

          First thing is here constraint is valid for periods, so if you have periods defined for one company and you try to modify it then it will raise warning to user.

          And for installation of chart for any country or generic chart if you have fiscal year already defined as demo/manual creation and you try to set/modify it start or end date in configuration wizard of that country it will raise an error to you (Here in code we do like: we search for start and end date given in configuration => if the fiscalyear exists we can not create new fiscal year for that company and if the fiscal year not exists we will create it).

        Here the main problem is it raise warning to the user and then user click configure it pop up error ( KeyError: 1 ) second time.

So i request framework team to fix it then we can check for the possibilities fixed for Addons module.

thanks,
ara

Changed in openobject-addons:
assignee: OpenERP R&D Addons Team 3 (openerp-dev-addons3) → OpenERP's Framework R&D (openerp-dev-framework)
affects: openobject-addons → openobject-server
Changed in openobject-server:
status: In Progress → Confirmed
Changed in openobject-server:
status: Confirmed → In Progress
Revision history for this message
Yogesh (SerpentCS) (yogesh-serpentcs) wrote :

Hello,

This bug needs to be fixed from addons. The account.installer memory wizard has overriden execute method this method checks the validation for the fiscal years and raises an exception if the fiscal years are not valid but before raises exception the base class i.e. res.config.installer execute method is called which restart the pool. so to fix the issue called base class execute method at the end when all the validation are done.

Thanks,

Changed in openobject-server:
assignee: OpenERP's Framework R&D (openerp-dev-framework) → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
affects: openobject-server → openobject-addons
Changed in openobject-addons:
status: In Progress → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Graeme Gellatly (gdgellatly) wrote : Re: [Bug 710689] Re: Overlapping fiscal years error in initial chart of accounts installation

https://bugs.launchpad.net/openobject-addons/+bug/686162 is probably a
duplicate. Poster doesn't mention but bet it was done with demo data.

On Mon, May 23, 2011 at 8:46 PM, Ashvin Rathod (OpenERP) <
<email address hidden>> wrote:

> ** Changed in: openobject-addons
> Status: Confirmed => In Progress
>
> --
> You received this bug notification because you are subscribed to OpenERP
> Addons.
> https://bugs.launchpad.net/bugs/710689
>
> Title:
> Overlapping fiscal years error in initial chart of accounts
> installation
>
> Status in OpenERP Modules (addons):
> In Progress
>
> Bug description:
> I just installed 6.0.1 and encountered an error while defining a new
> database, while configuring the chart of accounts.
>
> I set start date to 04/01/2011 (using the calender widget), end was
> set automatically to 03/31/2012. Monthly period.
>
> I wanted to confirm, but got a raised error message about overlapping
> timeframes.
>
> I closed it, re-checked the data (all ok), and confirmed again.
>
> That got me an error as below, again with another confirm.
>
>
> I deleted the database and started over. The error is reproduceable.
>
> - Database preset language is German.
> - Extended Interface.
> - Entered company data, uploaded image.
> - Choose Modules (re-translated from german names) CRM&SRM, Stock &
> Logistics, Disposition & Purchases, Quotations & Invoices, Bill of Material
> and Manufacturing
> - Chart of Accounts Deutschland SKR03 und SKR04
> - confirmed, got the error: You cannot define overlapping fiscal years
> - clicked ok, confirmed again, got the error below.
>
>
>
> Environment Information :
> System : Windows-Vista-6.1.7600
> OS Name : nt
> Operating System Release : Vista
> Operating System Version : 6.1.7600
> Operating System Architecture : 32bit
> Operating System Locale : de_DE.cp1252
> Python Version : 2.5.2
> OpenERP-Client Version : 6.0.1
> Last revision No. & ID :Bazaar Package not Found !Traceback (most recent
> call last):
> File "/usr/local/lib/python2.6/dist-packages/openerp-server/netsvc.py",
> line 489, in dispatch
> result = ExportService.getService(service_name).dispatch(method, auth,
> params)
> File
> "/usr/local/lib/python2.6/dist-packages/openerp-server/service/web_services.py",
> line 599, in dispatch
> res = fn(db, uid, *params)
> File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py",
> line 122, in wrapper
> return f(self, dbname, *args, **kwargs)
> File "/usr/local/lib/python2.6/dist-packages/openerp-server/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-server/osv/osv.py",
> line 167, in execute_cr
> return getattr(object, method)(cr, uid, *args, **kw)
> File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py",
> line 1961, in write
> self.datas[object_id].update(vals2)
> KeyError: 1
>

Revision history for this message
Ashvin Rathod (OpenERP) (ara-tinyerp) wrote :

Hello Marco,

Its fixed in lp:~openerp-dev/openobject-addons/trunk-bug-710689-ara branch. It will be merge soon with trunk addons.

Revision ID: <email address hidden>
Revision No: 4724

Thanks,
ara

Changed in openobject-addons:
status: In Progress → Fix Committed
Changed in openobject-addons:
milestone: none → 6.1
qdp (OpenERP) (qdp)
Changed in openobject-addons:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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