Odoo / OpenERP - 导入模块时出现“未找到模型”错误

时间:2017-11-07 13:24:17

标签: python xml import openerp odoo-8

我一直在寻找几个小时,但我找不到解决方案。在Odoo中,我正在尝试导入我从官方Odoo应用页面(https://www.odoo.com/apps/modules/8.0/document_page/)获取的document_page模块。

导入将停止,并显示以下错误消息

2017-11-07 12:39:42,359 32052 ERROR plietsch openerp.addons.base.ir.ir_ui_view: Model not found: document.page.create.menu

Error context:
View `Create Menu`
[view_id: 1587, xml_id: n/a, model: document.page.create.menu, parent_id: n/a]
2017-11-07 12:39:42,359 32052 ERROR plietsch openerp.addons.base_import_module.models.ir_module: Error while importing module
Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/openerp/addons/base_import_module/models/ir_module.py", line 109, in import_zipfile
        self.import_module(cr, uid, mod_name, path, force=force, context=context)
    File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper
        return old_api(self, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/openerp/addons/base_import_module/models/ir_module.py", line 54, in import_module
        convert_file(cr, module, filename, idref, mode=mode, noupdate=noupdate, kind=kind, pathname=pathname)
    File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 897, in convert_file
        convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
    File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 983, in convert_xml_import
        obj.parse(doc.getroot(), mode=mode)
    File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 849, in parse
        self._tags[rec.tag](self.cr, rec, n, mode=mode)
    File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 759, in _tag_record
        id = self.pool['ir.model.data']._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(   data_node), mode=self.mode, context=rec_context )
    File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper
        return old_api(self, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_model.py", line 1069, in _update
        res_id = model_obj.create(cr, uid, values, context=context)
    File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper
        return old_api(self, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_ui_view.py", line 263, in create
        context=context)
    File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper
        return old_api(self, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 372, in old_api
        result = method(recs, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4101, in create
        record = self.browse(self._create(old_vals))
    File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 266, in wrapper
        return new_api(self, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 508, in new_api
        result = method(self._model, cr, uid, *args, **old_kwargs)
    File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4298, in _create
        recs._validate_fields(vals)
    File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 266, in wrapper
        return new_api(self, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 508, in new_api
        result = method(self._model, cr, uid, *args, **old_kwargs)
    File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4298, in _create
        recs._validate_fields(vals)
    File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 266, in wrapper
        return new_api(self, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 1275, in _validate_fields
        raise ValidationError('\n'.join(errors))
ParseError: "ValidateError
Field(s) `arch` failed against a constraint: Invalid view definition

Error details:
Model not found: document.page.create.menu

Error context:
View `Create Menu`
[view_id: 1587, xml_id: n/a, model: document.page.create.menu, parent_id: n/a]" while parsing /tmp/tmpwPHhPB/document_page/wizard/  document_page_create_menu_view.xml:5, near
<record id="view_wiki_create_menu" model="ir.ui.view">
    <field name="name">Create Menu</field>
    <field name="model">document.page.create.menu</field>
    <field name="arch" type="xml">
        <form string="Create Menu" version="7.0">
            <group string="Menu Information">
                <field name="menu_name"/>
                <field name="menu_parent_id"/>
            </group>
            <footer>
                <button name="document_page_menu_create" string="Create Menu" type="object" class="oe_highlight"/>
                or
                <button string="Cancel" class="oe_link" special="cancel"/>
            </footer>
        </form>
    </field>
</record>

我没有修改文件,Odoo中的应用程序是最新的。我也尝试重启Odoo服务器,但没有帮助。

Linux发行版:Ubuntu 16.04

Odoo版本:8.0-20170920

document_page version:8.0.1.0.2

我将不胜感激任何帮助!谢谢!

0 个答案:

没有答案