0

Odoo Server Error:

Traceback (most recent call last):
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/http.py", line 650, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/http.py", line 692, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/http.py", line 342, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/http.py", line 335, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/flexxoone/odoo11/flex-extras/web_syncer/http.py", line 9, in __call__
    result = self.method(*args, **kw)
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo11/odoo/addons/web/controllers/main.py", line 938, in call_button
    action = self._call_kw(model, method, args, {})
  File "/opt/odoo11/odoo/addons/web/controllers/main.py", line 926, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "<decorator-gen-42>", line 2, in button_immediate_install
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/addons/base/module/module.py", line 71, in check_and_log
    return method(self, *args, **kwargs)
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/addons/base/module/module.py", line 449, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/addons/base/module/module.py", line 542, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/modules/registry.py", line 85, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/modules/loading.py", line 380, in load_modules
    loaded_modules, update_module, models_to_check)
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/modules/loading.py", line 274, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/modules/loading.py", line 137, in load_module_graph
    load_openerp_module(package.name)
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/modules/module.py", line 368, in load_openerp_module
    __import__('odoo.addons.' + module_name)
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/modules/module.py", line 82, in load_module
    exec(open(modfile, 'rb').read(), new_mod.__dict__)
  File "<string>", line 3, in <module>
  File "/home/flexxoone/odoo11/flex-dev/fxo_print_docs_fuci/report/__init__.py", line 1, in <module>
    from . import report_bill_of_sale
  File "/home/flexxoone/odoo11/flex-dev/fxo_print_docs_fuci/report/report_bill_of_sale.py", line 5, in <module>
    from openerp.report import report_sxw
  File "/opt/odoo11/odoo11_git/lib/python3.5/site-packages/odoo-11.0-py3.5.egg/odoo/modules/module.py", line 110, in load_module
    mod = importlib.import_module(canonical)
  File "/opt/odoo11/odoo11_git/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named 'odoo.report'

Por favor, ¿me podrían ayudar con este error?. Me aparece al momento de abrir un modulo de odoo10 en el odoo11. Al inicio me aparecía No module named 'models' y lo modifique a from . import models. Ahora me muestra el error mencionado. Gracias

1 respuesta 1

0

Falta la dependencia de odoo error.En la version de odoo11 esta libreria ya no esta.

importando esta libreria no deberias tener problemas

from odoo.tools import report

te dejo el link de stack en ingles para cualquier duda

https://stackoverflow.com/questions/46883550/getting-error-importerror-no-module-named-odoo-report-in-odoo-11

5
  • Le agrege esta linea from odoo.tools import report como esta en el foro, sin embargo ahora me muestra el siguiente error: ImportError: cannot import name 'report'
    – Pedro Roh
    Commented el 15 oct. 2018 a las 17:28
  • podrias decirme cual es el modulo o editar tu pregunta copiando parte del codigo donde importa Commented el 15 oct. 2018 a las 18:16
  • Si claro, de antemano, gracias por la ayuda.El error que me muestra es : File "/home/flexxoone/odoo11/flex-dev/fxo_print_docs_fuci/report/report_bill_of_sale.py", line 4, in <module> from odoo.report import report ImportError: No module named 'odoo.report' De esta forma estoy importando las librerias. import time from odoo.report import report from odoo.osv import osv class report_bill_of_sale(report_sxw.rml_parse): ........
    – Pedro Roh
    Commented el 15 oct. 2018 a las 18:32
  • odoo.report hace una referencia al estandar de python time podrias sustituir esta linea import time from odoo.report por esta import time verifica si en la version de python tiene el modulo time deberia pero verificalopor si acaso Commented el 15 oct. 2018 a las 19:19
  • Te dejo el link de la documentación oficial del modulo odoo.com/documentation/11.0/reference/reports.html Commented el 15 oct. 2018 a las 19:26

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.