Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A field with translate=True in an abstract class gives error during translation exportation. #6213

Closed
NicolasWebDev opened this issue Apr 8, 2015 · 3 comments
Labels
Localization about adapting the content to a specify country (usually chart of accounts)

Comments

@NicolasWebDev
Copy link

NicolasWebDev commented Apr 8, 2015

If you have at least one abstract model in a module, the synchronization of terms to translate fails.

Impacted versions:

  • 8.0

Steps to reproduce:

  • you'll need to declare an abstract model :
class an_abstract_model(models.AbstractModel):
    _name = 'an.abstract.model'

    translated_field = fields.Char(translate=True)
  • launch the synchronization of translated terms.

Current behavior:

  • An exception is raised:
Traceback (most recent call last):
  File "/home/german/odoo/openerp/http.py", line 518, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/german/odoo/openerp/http.py", line 539, in dispatch
    result = self._call_function(**self.params)
  File "/home/german/odoo/openerp/http.py", line 295, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/german/odoo/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/german/odoo/openerp/http.py", line 292, in checked_call
    return self.endpoint(*a, **kw)
  File "/home/german/odoo/openerp/http.py", line 755, in __call__
    return self.method(*args, **kw)
  File "/home/german/odoo/openerp/http.py", line 388, in response_wrap
    response = f(*args, **kw)
  File "/home/german/odoo/addons/web/controllers/main.py", line 953, in call_button
    action = self._call_kw(model, method, args, {})
  File "/home/german/odoo/addons/web/controllers/main.py", line 941, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/home/german/odoo/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/german/odoo/openerp/addons/base/module/wizard/base_export_language.py", line 65, in act_getfile
    tools.trans_export(lang, mods, buf, this.format, cr)
  File "/home/german/odoo/openerp/tools/translate.py", line 511, in trans_export
    translations = trans_generate(lang, modules, cr)
  File "/home/german/odoo/olympo_extras8/addons/report_aeroo/translate.py", line 176, in extend_trans_generate
    ids = objmodel.search(cr, uid, [])
  File "/home/german/odoo/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/german/odoo/openerp/models.py", line 1647, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/home/german/odoo/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/german/odoo/openerp/models.py", line 4579, in _search
    cr.execute(query_str, where_clause_params)
  File "/home/german/odoo/openerp/sql_db.py", line 158, in wrapper
    return f(self, *args, **kwargs)
  File "/home/german/odoo/openerp/sql_db.py", line 234, in execute
    res = self._obj.execute(query, params)
ProgrammingError: relation "an_abstract_model" does not exist
LINE 1: SELECT "an_abstract_model".id FROM "an_abstract_model" ORDER B...

Additional Information:

  • Actually I have found an issue in the launchpad, which seems to refer to exactly the same error.
    The bug is marked as "Fix Committed", but I still have the error. The bug is located here.
@JonathanNEMRY
Copy link
Contributor

Any news about this issue?

@NicolasWebDev
Copy link
Author

I don't have any news myself.

@Yenthe666 Yenthe666 added the Localization about adapting the content to a specify country (usually chart of accounts) label Dec 12, 2017
@Yenthe666
Copy link
Collaborator

Hi @NicolasWebDev,

Thank you for your bug report and our apoligies that we haven't had the time to look at this bug report. We do our best to handle all of them, but we sometimes miss some.
At this point Odoo 8 is no longer supported as Odoo only supports three versions (9.0, 10.0, 11.0 at the moment).
If you can still reproduce this issue on Odoo 9, Odoo 10 or Odoo 11 we encourage you to create a new bug report.

Regards,
Yenthe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Localization about adapting the content to a specify country (usually chart of accounts)
Projects
None yet
Development

No branches or pull requests

3 participants