From fc1f3b34246fa7d23a2583130d6eecb6d807fa0c Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 14 Oct 2015 16:36:05 +0200 Subject: [PATCH] [FIX] account_analytic_analysis: integer out of range When reading the view `account_analytic_analysis_summary_user`, through the function fields using `_analysis_all`, it could lead to an `integer out of range` if you have a bunch of `res.users` and or `account.account`. Casting the multiplication of the integers to a double solves the issue. opw-652152 --- addons/account_analytic_analysis/account_analytic_analysis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index 76d2b68a957..53f8b8169f0 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -841,7 +841,7 @@ class account_analytic_account_summary_user(osv.osv): WHERE (j.type = 'general' ) and (j.id=l.journal_id) GROUP BY l.account_id, l.user_id ) - select (lu.account_id * mu.max_user) + lu.user_id as id, + select (lu.account_id::bigint * mu.max_user) + lu.user_id as id, lu.account_id as account_id, lu.user_id as "user", unit_amount