← Back to team overview

openerp-india team mailing list archive

[Bug 1051470] [NEW] [7.0 trunk] Problem with Settings - Configuration - Accounting

 

Public bug reported:

Probably a long-standing issue...

The module res_cofig.py in account module has a method set_fiscalyear,
which creates a fiscal year for a company if necessary. The method gets
called when the settings config form is edited (even if no setting is
changed).

The problem is that this code may blow up if the financial year and
periods were not created as part of a chart install process, i.e.
created manually after the fact. (i.e. there are residual values in
account_config_settings table which aren't actually consistent with the
year that was created manually)

Consequence is that the method tries to create a financial year (with
potentially different start and end dates) that already exists in the
database, and throws an exception.

I can't see why this method should be called during an update to general
config settings for accounts. It should really only happen at chart
installation time.

Steos to reproduce:
1. Fresh DB
2. Install a chart, but cancel the creation of periods at that point.
3. Go into Accounting/Config/Periods and create a year 2012 (with periods running from Jul 1, 2011 to Jun 30, 2012)
4. Check values in account_config_settings tabe for start and end date, verify they are different from (3).
5. Try and update settings in Settings/Configuration/Accounting... you should get an exception.

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1051470

Title:
  [7.0 trunk] Problem with Settings - Configuration - Accounting

Status in OpenERP Addons (modules):
  New

Bug description:
  Probably a long-standing issue...

  The module res_cofig.py in account module has a method set_fiscalyear,
  which creates a fiscal year for a company if necessary. The method
  gets called when the settings config form is edited (even if no
  setting is changed).

  The problem is that this code may blow up if the financial year and
  periods were not created as part of a chart install process, i.e.
  created manually after the fact. (i.e. there are residual values in
  account_config_settings table which aren't actually consistent with
  the year that was created manually)

  Consequence is that the method tries to create a financial year (with
  potentially different start and end dates) that already exists in the
  database, and throws an exception.

  I can't see why this method should be called during an update to
  general config settings for accounts. It should really only happen at
  chart installation time.

  Steos to reproduce:
  1. Fresh DB
  2. Install a chart, but cancel the creation of periods at that point.
  3. Go into Accounting/Config/Periods and create a year 2012 (with periods running from Jul 1, 2011 to Jun 30, 2012)
  4. Check values in account_config_settings tabe for start and end date, verify they are different from (3).
  5. Try and update settings in Settings/Configuration/Accounting... you should get an exception.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1051470/+subscriptions


Follow ups

References