← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 699809] Re: [6.0 and 5.0] Installing account_analytic_analysis you have a maximu of 2147 analytic accounts

 

Hello Jordi Esteve,

Thanks for your contribution, We have improve the code as per your
suggestion in lp:~openerp-commiter/openobject-addons/trunk-dev-
addons3-psi2

Revision No: 4617
Revision ID: psi@xxxxxxxxxxxxx-20110117085902-olq2k7950948uetd

Thanks,
PSI

** Changed in: openobject-addons
       Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/699809

Title:
  [6.0 and 5.0] Installing account_analytic_analysis you have a maximu
  of 2147 analytic accounts

Status in OpenObject Addons Modules:
  Fix Committed

Bug description:
  If you install account_analytic_analysis module, you can no have more
  than 2147 analytic accounts because you get a postgres error: Integer
  is outside of range.

  In account_analytic_analysis/account_analytic_analysis.py file,
  account_analytic_analysis_summary_month postgres view is created as
  (line 630 in 6.0, line 634 in 5.0):

  '(TO_NUMBER(TO_CHAR(d.month, \'YYYYMM\'), \'999999\') + (d.account_id
  * 1000000))::integer AS id, ' \

  if account_id is bigger than 2147, then 2148 * 1000000 is bigger than
  +2147483647, the integer maximum value.

  IMHO, it usual that a company have more that 2147 analytic account, so
  I suggest to change the above line to:

  '(TO_NUMBER(TO_CHAR(d.month, \'YYYYMM\'), \'999999\') + (d.account_id
  * 1000000::bigint))::bigint AS id, ' \





References