Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Invalid XML for View Architecture error when installing app

By
Alexandre Takacs
on 4/28/14, 2:10 PM 1,182 views

I am having an issue when installing a "stock" openERP applications (in this case the issue tracker module, but this seems to happen with all modules, I tried for instance with fleet management). The error is with some validation and in reported as "Invalid XML for View Architecture". Apparently an xpath invocation failing...

I have seen some similar issues being reported but not with "out of the box" modules ?!

Some (hopefully) relevant logging:

2014-04-14 09:36:29,647 23202 INFO MyOpenERP openerp.modules.loading: loading 1 modules...
2014-04-14 09:36:29,701 23202 INFO MyOpenERP openerp.modules.loading: loading 65 modules...
2014-04-14 09:36:30,037 23202 INFO MyOpenERP openerp.modules.loading: loading 67 modules...
2014-04-14 09:36:30,045 23202 INFO MyOpenERP openerp.modules.module: module project_issue: creating or updating database tables
2014-04-14 09:36:31,398 23202 INFO MyOpenERP openerp.modules.loading: module project_issue: loading project_issue_view.xml
2014-04-14 09:36:32,425 23202 ERROR MyOpenERP openerp.addons.base.ir.ir_ui_view: Can't render view  for model: project.project
Traceback (most recent call last):
  File "/opt/openerp/server/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 "/opt/openerp/server/openerp/osv/orm.py", line 2237, in fields_view_get
    arch=apply_view_inheritance(cr, user, source, sql_res['id']),
  File "/opt/openerp/server/openerp/osv/orm.py", line 2195, in apply_view_inheritance
    source = apply_inheritance_specs(source, view_arch, view_id)
  File "/opt/openerp/server/openerp/osv/orm.py", line 2179, in apply_inheritance_specs
    raise_view_error("Element '%s' not found in parent view '%%(parent_xml_id)s'" % tag, inherit_id)
  File "/opt/openerp/server/openerp/osv/orm.py", line 2072, in raise_view_error
    %  (child_view.xml_id, self._name, error_msg))
AttributeError: View definition error for inherited view '' on model 'project.project': Element '<xpath expr="//page[@name="project_stages"]">' not found in parent view 'project.edit_project'
2014-04-14 09:36:32,512 23202 ERROR MyOpenERP openerp.tools.convert: Parse error in /opt/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="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>
            </data></field>
       </record>
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/tools/convert.py", line 847, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/opt/openerp/server/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 "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 964, in _update
    res_id = model_obj.create(cr, uid, values, context=context)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_ui_view.py", line 103, in create
    return super(view, self).create(cr, uid, values, context)
  File "/opt/openerp/server/openerp/osv/orm.py", line 4472, in create
    self._validate(cr, user, [id_new], context)
  File "/opt/openerp/server/openerp/osv/orm.py", line 1546, 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-04-14 09:36:32,565 23202 ERROR MyOpenERP openerp.netsvc: ValidateError
Error occurred while validating the field(s) arch: Invalid XML for View Architecture!
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/server/openerp/osv/osv.py", line 144, in wrapper
    raise except_osv(inst.name, inst.value)
except_osv: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')
2014-04-14 09:36:32,568 23202 INFO MyOpenERP werkzeug: 127.0.0.1 - - [14/Apr/2014 09:36:32] "POST /web/dataset/call_button HTTP/1.1" 200 -
2014-04-14 09:36:33,428 23202 INFO ? werkzeug: 127.0.0.1 - - [14/Apr/2014 09:36:33] "GET /web/static/src/img/warning.png HTTP/1.1" 200 -
2014-04-14 09:36:45,090 23202 INFO MyOpenERP openerp.modules.loading: loading 1 modules...
2014-04-14 09:36:45,140 23202 INFO MyOpenERP openerp.modules.loading: loading 65 modules...
2014-04-14 09:36:45,396 23202 INFO MyOpenERP openerp.modules.loading: Modules loaded.
2014-04-14 09:36:45,405 23202 INFO MyOpenERP werkzeug: 127.0.0.1 - - [14/Apr/2014 09:36:45] "POST /web/action/load HTTP/1.1" 200 -
2014-04-14 09:36:53,242 23202 INFO ? werkzeug: 127.0.0.1 - - [14/Apr/2014 09:36:53] "GET / HTTP/1.1" 303 -
2014-04-14 09:37:14,694 23202 INFO MyOpenERP openerp.modules.loading: loading 1 modules...
2014-04-14 09:37:14,746 23202 INFO MyOpenERP openerp.modules.loading: loading 65 modules...
2014-04-14 09:37:15,215 23202 INFO MyOpenERP openerp.modules.loading: loading 68 modules...
2014-04-14 09:37:15,219 23202 INFO MyOpenERP openerp.osv.orm: Missing many2one field definition for _inherits reference "cost_id" in "fleet.vehicle.log.fuel", using default one.
2014-04-14 09:37:15,219 23202 INFO MyOpenERP openerp.osv.orm: Missing many2one field definition for _inherits reference "cost_id" in "fleet.vehicle.log.services", using default one.
2014-04-14 09:37:15,220 23202 INFO MyOpenERP openerp.osv.orm: Missing many2one field definition for _inherits reference "cost_id" in "fleet.vehicle.log.contract", using default one.
2014-04-14 09:37:15,221 23202 INFO MyOpenERP openerp.modules.module: module fleet: creating or updating database tables
2014-04-14 09:37:16,850 23202 INFO MyOpenERP openerp.osv.orm: storing computed values of fields.function 'name'
2014-04-14 09:37:16,850 23202 INFO MyOpenERP openerp.osv.orm: storing computed values of fields.function 'name'
2014-04-14 09:37:16,851 23202 INFO MyOpenERP openerp.osv.orm: storing computed values of fields.function 'year'
2014-04-14 09:37:16,851 23202 INFO MyOpenERP openerp.osv.orm: storing computed values of fields.function 'name'
2014-04-14 09:37:16,851 23202 INFO MyOpenERP openerp.osv.orm: storing computed values of fields.function 'cost_amount'
2014-04-14 09:37:16,852 23202 INFO MyOpenERP openerp.osv.orm: storing computed values of fields.function 'cost_amount'
2014-04-14 09:37:16,852 23202 INFO MyOpenERP openerp.osv.orm: storing computed values of fields.function 'cost_amount'
2014-04-14 09:37:16,852 23202 INFO MyOpenERP openerp.osv.orm: storing computed values of fields.function 'name'
2014-04-14 09:37:16,853 23202 INFO MyOpenERP openerp.osv.orm: storing computed values of fields.function 'image_medium'
2014-04-14 09:37:16,853 23202 INFO MyOpenERP openerp.osv.orm: storing computed values of fields.function 'image_small'
2014-04-14 09:37:16,853 23202 INFO MyOpenERP openerp.osv.orm: storing computed values of fields.function 'name'
2014-04-14 09:37:16,855 23202 INFO MyOpenERP openerp.modules.loading: module fleet: loading security/fleet_security.xml
2014-04-14 09:37:17,928 23202 INFO MyOpenERP openerp.modules.loading: module fleet: loading security/ir.model.access.csv
2014-04-14 09:37:18,201 23202 INFO MyOpenERP openerp.modules.loading: module fleet: loading fleet_view.xml
2014-04-14 09:37:18,952 23202 INFO MyOpenERP openerp.modules.loading: module fleet: loading fleet_cars.xml
2014-04-14 09:37:20,442 23202 INFO MyOpenERP openerp.modules.loading: module fleet: loading fleet_data.xml
2014-04-14 09:37:21,281 23202 INFO MyOpenERP openerp.modules.loading: module fleet: loading fleet_board_view.xml
2014-04-14 09:37:21,409 23202 WARNING MyOpenERP openerp.addons.base.ir.ir_translation: module fleet: no translation for language en_GB
2014-04-14 09:37:21,409 23202 INFO MyOpenERP openerp.addons.base.ir.ir_translation: module fleet: loading translation file (fr) for language fr_FR
2014-04-14 09:37:21,409 23202 INFO MyOpenERP openerp.tools.translate: loading /opt/openerp/addons/fleet/i18n/fr.po
2014-04-14 09:37:22,559 23202 INFO MyOpenERP openerp.modules.module: module project_issue: creating or updating database tables
2014-04-14 09:37:22,719 23202 INFO MyOpenERP openerp.modules.loading: module project_issue: loading project_issue_view.xml
2014-04-14 09:37:22,891 23202 ERROR MyOpenERP openerp.addons.base.ir.ir_ui_view: Can't render view  for model: project.project
Traceback (most recent call last):
  File "/opt/openerp/server/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 "/opt/openerp/server/openerp/osv/orm.py", line 2237, in fields_view_get
    arch=apply_view_inheritance(cr, user, source, sql_res['id']),
  File "/opt/openerp/server/openerp/osv/orm.py", line 2195, in apply_view_inheritance
    source = apply_inheritance_specs(source, view_arch, view_id)
  File "/opt/openerp/server/openerp/osv/orm.py", line 2179, in apply_inheritance_specs
    raise_view_error("Element '%s' not found in parent view '%%(parent_xml_id)s'" % tag, inherit_id)
  File "/opt/openerp/server/openerp/osv/orm.py", line 2072, in raise_view_error
    %  (child_view.xml_id, self._name, error_msg))
AttributeError: View definition error for inherited view '' on model 'project.project': Element '<xpath expr="//page[@name="project_stages"]">' not found in parent view 'project.edit_project'
2014-04-14 09:37:22,892 23202 ERROR MyOpenERP openerp.tools.convert: Parse error in /opt/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="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>
            </data></field>
       </record>
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/tools/convert.py", line 847, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/opt/openerp/server/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 "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 964, in _update
    res_id = model_obj.create(cr, uid, values, context=context)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_ui_view.py", line 103, in create
    return super(view, self).create(cr, uid, values, context)
  File "/opt/openerp/server/openerp/osv/orm.py", line 4472, in create
    self._validate(cr, user, [id_new], context)
  File "/opt/openerp/server/openerp/osv/orm.py", line 1546, 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-04-14 09:37:22,894 23202 ERROR MyOpenERP openerp.netsvc: ValidateError
Error occurred while validating the field(s) arch: Invalid XML for View Architecture!
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/server/openerp/osv/osv.py", line 144, in wrapper
    raise except_osv(inst.name, inst.value)
except_osv: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')
2014-04-14 09:37:22,896 23202 INFO MyOpenERP werkzeug: 127.0.0.1 - - [14/Apr/2014 09:37:22] "POST /web/dataset/call_button HTTP/1.1" 200 -

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 4/28/14, 2:10 PM
Seen: 1182 times
Last updated: 3/16/15, 8:10 AM