安装模块时发生Odoo错误-XMLSyntaxError:无

时间:2018-08-31 13:38:22

标签: python odoo

你好,我正在尝试在由我创建的odoo中安装新模块,当我将其从manifest.py文件中删除时,它不允许我安装它。带有xml的数据键可以让我正确安装它。错误如下:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 642, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 684, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 334, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/odoo/service/model.py", line 101, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 327, in checked_call
    result = self.endpoint(*a, **kw)
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 942, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 507, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python2.7/site-packages/odoo/addons/web/controllers/main.py", line 899, in call_button
    action = self._call_kw(model, method, args, {})
  File "/usr/lib/python2.7/site-packages/odoo/addons/web/controllers/main.py", line 887, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/usr/lib/python2.7/site-packages/odoo/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/usr/lib/python2.7/site-packages/odoo/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/odoo/addons/base/module/module.py", line 412, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/usr/lib/python2.7/site-packages/odoo/addons/base/module/module.py", line 486, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/usr/lib/python2.7/site-packages/odoo/modules/registry.py", line 83, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/usr/lib/python2.7/site-packages/odoo/modules/loading.py", line 377, in load_modules
    loaded_modules, update_module, models_to_check)
  File "/usr/lib/python2.7/site-packages/odoo/modules/loading.py", line 270, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/usr/lib/python2.7/site-packages/odoo/modules/loading.py", line 182, in load_module_graph
    _load_data(cr, module_name, idref, mode, kind='data')
  File "/usr/lib/python2.7/site-packages/odoo/modules/loading.py", line 96, in _load_data
    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
  File "/usr/lib/python2.7/site-packages/odoo/tools/convert.py", line 845, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/usr/lib/python2.7/site-packages/odoo/tools/convert.py", line 900, in convert_xml_import
    etree.parse(os.path.join(config['root_path'],'import_xml.rng' )))
  File "lxml.etree.pyx", line 3197, in lxml.etree.parse (src/lxml/lxml.etree.c:64816)
  File "parser.pxi", line 1571, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:92729)
  File "parser.pxi", line 1600, in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:93013)
  File "parser.pxi", line 1500, in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:92076)
  File "parser.pxi", line 1047, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:88976)
  File "parser.pxi", line 577, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:84385)
  File "parser.pxi", line 676, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:85488)
  File "parser.pxi", line 627, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:84981)
XMLSyntaxError: None

1 个答案:

答案 0 :(得分:1)

检查您的xml语法,如果不起作用,只需将其放入在线xml检查器中,只需注释掉不同的xml文件,然后查看错误的出处即可。并与我们分享。