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

Bug #699809 reported by Jordi Esteve (www.zikzakmedia.com)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 3

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

Related branches

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-addons:
milestone: none → 6.0
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Purnendu Singh (OpenERP) (purnendu-singh) wrote :

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: <email address hidden>

Thanks,
PSI

Changed in openobject-addons:
status: In Progress → Fix Committed
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.

Other bug subscribers

Remote bug watches

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