0

本番データベースで次のエラーが発生し、ログインが拒否されました。どうすれば解決できるかアドバイスお願いします。

2014-02-15 22:42:24,733 18124 ERROR myDB openerp.addons.base.ir.ir_ui_view: Can't render view project_issue.view_project_form_inherited for model: project.project
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_ui_view.py", line 126, in _check_render_view
    fvg = self.pool.get(view.model).fields_view_get(cr, uid, view_id=view.id, view_type=view.type, context=context)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 2239, in fields_view_get
    arch=apply_view_inheritance(cr, user, source, sql_res['id']),
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 2197, in apply_view_inheritance
    source = apply_inheritance_specs(source, view_arch, view_id)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 2181, in apply_inheritance_specs
    raise_view_error("Element '%s' not found in parent view '%%(parent_xml_id)s'" % tag, inherit_id)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 2074, in raise_view_error
    %  (child_view.xml_id, self._name, error_msg))
AttributeError: View definition error for inherited view 'project_issue.view_project_form_inherited' on model 'project.project': Element '<xpath expr="//page[@name="project_stages"]">' not found in parent view 'project.edit_project'
2014-02-15 22:42:24,739 18124 ERROR myDB openerp.tools.convert: Parse error in /usr/lib/pymodules/python2.7/openerp/addons/project_issue/project_issue_view.xml:302: 
<record id="view_project_form_inherited" model="ir.ui.view">
            <field name="name">project.project.form.inherited</field>
            <field name="model">project.project</field>
            <field name="inherit_id" ref="project.edit_project"/>
            <field name="arch" type="xml">
                <data><xpath expr="//div[@name=&quot;options_active&quot;]" position="inside">
                    <field name="use_issues" class="oe_inline"/>
                    <label for="use_issues"/>
                </xpath>
                <xpath expr="//div[@name=&quot;buttons&quot;]" position="inside">
                    <button name="%(act_project_project_2_project_issue_all)d" string="Issues" type="action" attrs="{'invisible':[('use_issues','=', 0)]}"/>
                </xpath>
                <xpath expr="//page[@name=&quot;project_stages&quot;]" position="attributes">
                    <attribute name="attrs">{'invisible': [('use_tasks', '=', False),('use_issues','=',False)]}</attribute>
                </xpath>
                <field name="priority" position="before">
                    <field name="project_escalation_id"/>
                </field>
                <field name="alias_domain" position="after">
                    <label for="alias_model" class="oe_edit_only" string="creates"/><field name="alias_model" class="oe_edit_only oe_inline"/>
                </field>
            </data></field>
       </record>
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 847, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 814, in _tag_record
    id = self.pool.get('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/pymodules/python2.7/openerp/addons/base/ir/ir_model.py", line 940, in _update
    model_obj.write(cr, uid, [res_id], values, context=context)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_ui_view.py", line 214, in write
    return super(view, self).write(cr, uid, ids, vals, context)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4209, in write
    self._validate(cr, user, ids, context)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 1548, in _validate
    raise except_orm('ValidateError', '\n'.join(error_msgs))
except_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')
2014-02-15 22:42:24,743 18124 ERROR myDB openerp.netsvc: ValidateError
Error occurred while validating the field(s) arch: Invalid XML for View Architecture!
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 433, in dispatch
    return fn(*params)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 444, in exp_authenticate
    res_users = pooler.get_pool(db).get('res.users')
  File "/usr/lib/pymodules/python2.7/openerp/pooler.py", line 49, in get_pool
    return get_db_and_pool(db_name, force_demo, status, update_module)[1]
  File "/usr/lib/pymodules/python2.7/openerp/pooler.py", line 33, in get_db_and_pool
    registry = RegistryManager.get(db_name, force_demo, status, update_module)
  File "/usr/lib/pymodules/python2.7/openerp/modules/registry.py", line 192, in get
    update_module)
  File "/usr/lib/pymodules/python2.7/openerp/modules/registry.py", line 218, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 350, in load_modules
    force, status, report, loaded_modules, update_module)
  File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 256, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 188, in load_module_graph
    load_data(module_name, idref, mode)
  File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 76, in <lambda>
    load_data = lambda *args: _load_data(cr, *args, kind='data')
  File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 124, in _load_data
    tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report)
  File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 954, in convert_xml_import
    obj.parse(doc.getroot())
  File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 847, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 814, in _tag_record
    id = self.pool.get('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/pymodules/python2.7/openerp/addons/base/ir/ir_model.py", line 940, in _update
    model_obj.write(cr, uid, [res_id], values, context=context)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_ui_view.py", line 214, in write
    return super(view, self).write(cr, uid, ids, vals, context)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4209, in write
    self._validate(cr, user, ids, context)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 1548, in _validate
    raise except_orm('ValidateError', '\n'.join(error_msgs))
except_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')
4

2 に答える 2

0

あなたのコードに間違いがあるようです。<data>タグが間違った位置に配置されているため、タグを削除してください。あなたの見解はこのようになるはずです。

 <record id="view_project_form_inherited" model="ir.ui.view">
        <field name="name">project.project.form.inherited</field>
        <field name="model">project.project</field>
        <field name="inherit_id" ref="project.edit_project"/>
        <field name="arch" type="xml">
            <xpath expr="//div[@name='options_active']" position="inside">
                <field name="use_issues" class="oe_inline"/>
                <label for="use_issues"/>
            </xpath>
            <xpath expr="//div[@name='buttons']" position="inside">
                <button name="%(act_project_project_2_project_issue_all)d" string="Issues" type="action" attrs="{'invisible':[('use_issues','=', 0)]}"/>
            </xpath>
            <xpath expr="//page[@name='project_stages']" position="attributes">
                <attribute name="attrs">{'invisible': [('use_tasks', '=', False),('use_issues','=',False)]}</attribute>
            </xpath>
            <field name="priority" position="before">
                <field name="project_escalation_id"/>
            </field>
            <field name="alias_domain" position="after">
                <label for="alias_model" class="oe_edit_only" string="creates"/><field name="alias_model" class="oe_edit_only oe_inline"/>
            </field>
        </field>
   </record>

これを試して。モジュールを更新することを忘れないでください。これがあなたを助けることを願っています。

于 2014-02-18T05:19:39.680 に答える
0
AttributeError: View definition error for inherited view 'project_issue.view_project_form_inherited' on model 'project.project': Element '<xpath expr="//page[@name="project_stages"]">' not found in parent view 'project.edit_project'

エラーメッセージが表示されます。「project_issue」モジュールに問題があるようです。何かが正しくインストールされていない可能性があります。--update=all または --update=project を使用してサーバーを起動してみてください。

そうでない場合は、前述のモジュール (project_issue またはプロジェクト) をデータベースでアンインストールして設定してみてください。ir_module_module 列の状態でそれを行うことができます。うまくいけば、その後ログインして、さらに検索してください。

プロジェクトモジュールに影響を与えている自作モジュールを使用していますか? もしそうなら、おそらく大きな問題があります(上記の方法でアンインストールしてください)。

于 2014-02-17T17:44:43.967 に答える