Export translation in OpenErp 6.1.1 hangs in report_aeroo\translate.py

Bug #954111 reported by Diogo Duarte on 2012-03-13
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Aeroo Reports
sraps (Alistek)

Bug Description

Ubuntu 10.10 - Openerp 6.1.1

When i got to Settings » Translations » Import/Export Translation

i get the error:

AttributeError: 'Registry' object has no attribute 'obj_pool'
report_aeroo/translate.py", line 44, in extend_trans_generate
    l = pool.obj_pool.items()

Server Traceback (most recent call last):
  File "/home/diogo/Workspace61/openerp611/openerp/addons/web/common/http.py", line 592, in send
    result = openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/home/diogo/Workspace61/openerp611/openerp/netsvc.py", line 360, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/diogo/Workspace61/openerp611/openerp/service/web_services.py", line 572, in dispatch
    res = fn(db, uid, *params)
  File "/home/diogo/Workspace61/openerp611/openerp/osv/osv.py", line 167, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/home/diogo/Workspace61/openerp611/openerp/osv/osv.py", line 121, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/diogo/Workspace61/openerp611/openerp/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/diogo/Workspace61/openerp611/openerp/osv/osv.py", line 164, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/diogo/Workspace61/openerp611/openerp/addons/base/module/wizard/base_export_language.py", line 50, in act_getfile
    tools.trans_export(this.lang, mods, buf, this.format, cr)
  File "/home/diogo/Workspace61/openerp611/openerp/tools/translate.py", line 468, in trans_export
    trans = trans_generate(lang, modules, cr)
  File "/home/diogo/Workspace61/openerp611/openerp/addons/report_aeroo/translate.py", line 44, in extend_trans_generate
    l = pool.obj_pool.items()
AttributeError: 'Registry' object has no attribute 'obj_pool'

Revision history for this message
Diogo Duarte (diogoduarte) wrote :

I found the solution buta i dont know how to post in the source:

in translate.py line 44

def extend_trans_generate(lang, modules, cr):
    logger = logging.getLogger('i18n')
    dbname = cr.dbname
    pool = pooler.get_pool(dbname)
    trans_obj = pool.get('ir.translation')
    model_data_obj = pool.get('ir.model.data')
    uid = 1
    #l = pool.obj_pool.items() »»»»»»»»»»»»»»»»»» replace for:
    l = pool.obj_list() »»»»»»»»»»»»»»»»»» this

Revision history for this message
barge (ohbargain-work) wrote :

also "pool.models.items()" seem to work(or bypass the problem) although they return different stuff.

Revision history for this message
sraps (Alistek) (erpsraps) wrote :

seems to be better solution

Changed in aeroo:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → sraps (Alistek) (erpsraps)
Revision history for this message
Damián Soriano (damiansoriano) wrote :

If the solution is that easy, why it is still there in the launchpad code?

Can anyone propose a merge to solve this issue?

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi Damián,

unfortunately, contributions are not valued in this project. In my experience, you can propose a merge request for the Aeroo project but they are seemingly neglected by the project maintainer. Actually, the code seems to be maintained by Alistek in an internal repository. Updates are pushed every couple of months and they usually contain the fixes for bugs like these.

This delay means that people who cannot fix the code themselves are left with partly disfunctional modules for no good reason, and the bug tracker is littered with duplicates and 'me too' postings.

So IMHO Aeroo reports is great software and 100% open source but I deeply regret that it is not more of a community project.


Changed in aeroo:
status: Confirmed → Fix Released
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