Analytic Chart of Accounts not displaying

Bug #592005 reported by Mark Guthart on 2010-06-10
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Fix Released
Dhara Shah (OpenERP)

Bug Description

In version 5.0.11, was creating new Analytic Accounts with no problems. As long as there were no 'child' analytic accounts, the Analytic Chart of Accounts displayed things fine. Once I added a 'child' analytic account, the Analytic Chart of Accounts no longer displayed the Account Code, Account Name, Date End, or Currency information. (There are no entries against these accounts - am just in the process of setting them up).

No messsages appear on the client side, but the following appears on the server side (running both the client and server through a terminal to catch any messages). Also note that I am running the regular, GTK client, and not the web client (I don't even have the web client installed in this environment):

sh: bzr: not found
No LSB modules are available.
[2010-06-09 21:51:44,734] ERROR:web-services:[01]:
[2010-06-09 21:51:44,734] ERROR:web-services:[02]: Environment Information :
[2010-06-09 21:51:44,734] ERROR:web-services:[03]: System : Linux-2.6.32-22-server-x86_64-with-Ubuntu-10.04-lucid
[2010-06-09 21:51:44,735] ERROR:web-services:[04]: OS Name : posix
[2010-06-09 21:51:44,735] ERROR:web-services:[05]: Distributor ID: Ubuntu
[2010-06-09 21:51:44,735] ERROR:web-services:[06]: Description: Ubuntu 10.04 LTS
[2010-06-09 21:51:44,735] ERROR:web-services:[07]: Release: 10.04
[2010-06-09 21:51:44,735] ERROR:web-services:[08]: Codename: lucid
[2010-06-09 21:51:44,735] ERROR:web-services:[09]: Operating System Release : 2.6.32-22-server
[2010-06-09 21:51:44,735] ERROR:web-services:[10]: Operating System Version : #36-Ubuntu SMP Thu Jun 3 20:38:33 UTC 2010
[2010-06-09 21:51:44,735] ERROR:web-services:[11]: Operating System Architecture : 64bit
[2010-06-09 21:51:44,735] ERROR:web-services:[12]: Operating System Locale : en_US.UTF8
[2010-06-09 21:51:44,735] ERROR:web-services:[13]: Python Version : 2.6.5
[2010-06-09 21:51:44,735] ERROR:web-services:[14]: OpenERP-Server Version : 5.0.11
[2010-06-09 21:51:44,735] ERROR:web-services:[15]: Last revision No. & ID :
[2010-06-09 21:51:44,736] ERROR:web-services:[16]: Traceback (most recent call last):
[2010-06-09 21:51:44,736] ERROR:web-services:[17]: File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/", line 58, in wrapper
[2010-06-09 21:51:44,736] ERROR:web-services:[18]: return f(self, dbname, *args, **kwargs)
[2010-06-09 21:51:44,736] ERROR:web-services:[19]: File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/", line 119, in execute
[2010-06-09 21:51:44,736] ERROR:web-services:[20]: res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
[2010-06-09 21:51:44,736] ERROR:web-services:[21]: File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/", line 111, in execute_cr
[2010-06-09 21:51:44,736] ERROR:web-services:[22]: return getattr(object, method)(cr, uid, *args, **kw)
[2010-06-09 21:51:44,736] ERROR:web-services:[23]: File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/", line 2228, in read
[2010-06-09 21:51:44,736] ERROR:web-services:[24]: result = self._read_flat(cr, user, select, fields, context, load)
[2010-06-09 21:51:44,736] ERROR:web-services:[25]: File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/", line 2360, in _read_flat
[2010-06-09 21:51:44,736] ERROR:web-services:[26]: res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
[2010-06-09 21:51:44,736] ERROR:web-services:[27]: File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/", line 659, in get
[2010-06-09 21:51:44,736] ERROR:web-services:[28]: res = self._fnct(obj, cr, user, ids, name, self._arg, context)
[2010-06-09 21:51:44,737] ERROR:web-services:[29]: File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/account/project/", line 133, in _balance_calc
[2010-06-09 21:51:44,737] ERROR:web-services:[30]: if currency[child]<>currency[id]:
[2010-06-09 21:51:44,737] ERROR:web-services:[31]: KeyError: 10


We have the same problem.

My guess is that in the file: /usr/lib/python2.5/site-packages/openerp-server/addons/account/project/, @ line 117-120, one can read:
        cr.execute("SELECT, r.currency_id "
                   "FROM account_analytic_account a "
                   "INNER JOIN res_company r ON (a.company_id = "
                   "WHERE in %s", (tuple(ids),))

My proposition is that the query should use "tuple(ids2)" instead of "tuple(ids)", because "ids2" contains the children of "ids"

affects: openobject-server → openobject-addons
Changed in openobject-addons:
assignee: nobody → dsh (Open ERP) (dsh-openerp)
status: New → Fix Released
milestone: none → 5.0.12
marcosambo (marco-sambo) wrote :

I have the same problem.
But I don't understand what can I do to resolve this problem.
Can you help me Jay?

Hello Marco,

You need to update the code from Launchpad :

Else, apply the patch from here :

Hope this helps.


marcosambo (marco-sambo) wrote :

Thank you Jay,
To update the code from launchpad, I have to update all single module that I have installed into my installation?
And to apply patch, I have to substitute account/project/ in my installed module with the patched ones?

Thank you again

Hi Marco,

You may simply replace the whole file from

Else, Look at the link; you can change the 2 lines and you will get it working.


marcosambo (marco-sambo) wrote :

Ok, thank you very much. It works!!!

hsm flxCore (hannes-smit) wrote :

Thanks Jay fo the fast response yesterday. I copied the code into my own code. Yesterday everything worked fine.
But today, after restarting I guess, I get an error, telling me the project task does not exist.
I tried my old databases and created a new one, both are not working. The error:

Environment Information :
System : Linux-2.6.32-22-generic-x86_64-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-22-generic
Operating System Version : #36-Ubuntu SMP Thu Jun 3 19:31:57 UTC 2010
Operating System Architecture : 64bit
Operating System Locale : en_US.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 5.0.11
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/home/openerp/OpenERP/5.0/server/bin/", line 247, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/home/openerp/OpenERP/5.0/server/bin/", line 76, in __call__
    return getattr(self, method)(*params)
  File "/home/openerp/OpenERP/5.0/server/bin/service/", line 633, in execute
    return self._execute(db, uid, wiz_id, datas, action, context)
  File "/home/openerp/OpenERP/5.0/server/bin/service/", line 613, in _execute
    return wiz.execute(db, uid, self.wiz_datas[wiz_id], action, context)
  File "/home/openerp/OpenERP/5.0/server/bin/wizard/", line 178, in execute
    res = self.execute_cr(cr, uid, data, state, context)
  File "/home/openerp/OpenERP/5.0/server/bin/wizard/", line 73, in execute_cr
    action_res = action(self, cr, uid, data, context)
  File "/home/openerp/OpenERP/5.0/server/bin/addons/base_setup/wizard/", line 208, in _update
    (db, pool)=pooler.restart_pool(cr.dbname, update_module=True)
  File "/home/openerp/OpenERP/5.0/server/bin/", line 62, in restart_pool
    return get_db_and_pool(db_name, force_demo, status, update_module=update_module)
  File "/home/openerp/OpenERP/5.0/server/bin/", line 40, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/home/openerp/OpenERP/5.0/server/bin/addons/", line 741, in load_modules
    r = load_module_graph(cr, graph, status, report=report)
  File "/home/openerp/OpenERP/5.0/server/bin/addons/", line 584, in load_module_graph
    init_module_objects(cr,, modules)
  File "/home/openerp/OpenERP/5.0/server/bin/addons/", line 373, in init_module_objects
  File "/home/openerp/OpenERP/5.0/server/bin/addons/report_task/", line 59, in init
  File "/home/openerp/OpenERP/5.0/server/bin/", line 77, in wrapper
    return f(self, *args, **kwargs)
  File "/home/openerp/OpenERP/5.0/server/bin/", line 122, in execute
    res = self._obj.execute(query, params)
ProgrammingError: relation "project_task" does not exist
LINE 14: project_task t on ( = t.user_id)


Hi Hannes,

I fear that you copied a wrong file.
Please follow comment #5 on this thread.

The file is account/project/ , not project/


hsm flxCore (hannes-smit) wrote :

Ah.. Thanks Jay!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers