← Back to team overview

c2c-oerpscenario team mailing list archive

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

 

Public bug reported:

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, ' \

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

-- 
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:
  New

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, ' \





Follow ups

References