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

Error during database creation

By
Luke Gopher
on 8/17/14, 6:58 AM 1,753 views

Hi,

 

i've got this error xhen i create a new database :

 

The field(s) `arch` failed against a constraint: Invalid view definition

 

Can you help me to fix this ?

Regards

Hi, paste the debug message fully. This is a problem with xml. somewhere arch is not exist, or the field def wrong.

klacus
on 8/17/14, 10:13 AM
1
klacus
On 8/18/14, 1:43 AM

The problem is here:

the defected file is here:

/usr/lib/python2.7/site-packages/openerp-8.0dev_20140815_230101-py2.7.egg/openerp/addons/report/views/views.xm

Error details:
Element '<xpath expr="//group[@string='Footer Configuration']">' cannot be located in parent view

You need to change /addons/report/views/views.xml because the link is wrong. I mean this "Footer Configuration" design element in original xml is not exsist.

You can repair, if you comment all of this in def. file:

<!--      -->

or you can find any other elemt for the inherit in target and modify the def. file like this:

             

<xpath expr="//group[@string= 'Configuration (RML)']" position="after">
                        <group string="QWeb PDF Configuration">
                            <field name="paperformat_id"/>
                        </group>
                    </xpath>

 

you can check the valid items for target view here:

openerp / addons / base / res / res_company_view.xml

Hope this helps.

B.R.

 

0
Luke Gopher
On 8/17/14, 3:59 PM

Hee is the stacktrace :

 

2014-08-17 19:58:11,892 9845 INFO JANS openerp.modules.loading: module report: loading views/views.xml
2014-08-17 19:58:12,165 9845 ERROR JANS openerp.addons.base.ir.ir_ui_view: Element '<xpath expr="//group[@string='Footer Configuration']">' cannot be located in parent view

Error context:
View `view_company_form_inherited`
[view_id: 287, xml_id: n/a, model: res.company, parent_id: 112]
2014-08-17 19:58:12,169 9845 CRITICAL JANS openerp.service.server: Failed to initialize database `JANS`.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/openerp-8.0dev_20140815_230101-py2.7.egg/openerp/service/server.py", line 894, in preload_registries
    registry = RegistryManager.new(dbname, update_module=update_module)
  File "/usr/lib/python2.7/site-packages/openerp-8.0dev_20140815_230101-py2.7.egg/openerp/modules/registry.py", line 299, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/usr/lib/python2.7/site-packages/openerp-8.0dev_20140815_230101-py2.7.egg/openerp/modules/loading.py", line 343, in load_modules
    loaded_modules, update_module)
  File "/usr/lib/python2.7/site-packages/openerp-8.0dev_20140815_230101-py2.7.egg/openerp/modules/loading.py", line 247, 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/python2.7/site-packages/openerp-8.0dev_20140815_230101-py2.7.egg/openerp/modules/loading.py", line 175, in load_module_graph
    _load_data(cr, module_name, idref, mode, kind='data')
  File "/usr/lib/python2.7/site-packages/openerp-8.0dev_20140815_230101-py2.7.egg/openerp/modules/loading.py", line 117, in _load_data
    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
  File "/usr/lib/python2.7/site-packages/openerp-8.0dev_20140815_230101-py2.7.egg/openerp/tools/convert.py", line 973, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/usr/lib/python2.7/site-packages/openerp-8.0dev_20140815_230101-py2.7.egg/openerp/tools/convert.py", line 1059, in convert_xml_import
    obj.parse(doc.getroot())
  File "/usr/lib/python2.7/site-packages/openerp-8.0dev_20140815_230101-py2.7.egg/openerp/tools/convert.py", line 926, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/usr/lib/python2.7/site-packages/openerp-8.0dev_20140815_230101-py2.7.egg/openerp/tools/convert.py", line 855, 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/site-packages/openerp-8.0dev_20140815_230101-py2.7.egg/openerp/addons/base/ir/ir_model.py", line 1012, in _update
    res_id = model_obj.create(cr, uid, values, context=context)
  File "/usr/lib/python2.7/site-packages/openerp-8.0dev_20140815_230101-py2.7.egg/openerp/addons/base/ir/ir_ui_view.py", line 205, in create
    return super(view, self).create(cr, uid, values, context)
  File "/usr/lib/python2.7/site-packages/openerp-8.0dev_20140815_230101-py2.7.egg/openerp/osv/orm.py", line 4257, in create
    self._validate(cr, user, [id_new], context)
  File "/usr/lib/python2.7/site-packages/openerp-8.0dev_20140815_230101-py2.7.egg/openerp/osv/orm.py", line 1584, in _validate
    raise except_orm('ValidateError', '\n'.join(error_msgs))
ParseError: "ValidateError
The field(s) `arch` failed against a constraint: Invalid view definition

Error details:
Element '<xpath expr="//group[@string='Footer Configuration']">' cannot be located in parent view

Error context:
View `view_company_form_inherited`
[view_id: 287, xml_id: n/a, model: res.company, parent_id: 112]" while parsing /usr/lib/python2.7/site-packages/openerp-8.0dev_20140815_230101-py2.7.egg/openerp/addons/report/views/views.xml:96, near
<record id="reporting_settings_form_inherited" model="ir.ui.view">
            <field name="name">view_company_form_inherited</field>
            <field name="inherit_id" ref="base.view_company_form"/>
            <field name="model">res.company</field>
            <field name="arch" type="xml">
                <data>
                    <xpath expr="//group[@string='Footer Configuration']" position="after">
                        <group string="QWeb PDF Configuration">
                            <field name="paperformat_id"/>
                        </group>
                    </xpath>
                </data>
            </field>
        </record>

0
ThackerS (ts)
On 8/17/14, 4:21 PM

Dear Luke,

I analyse your errors code and i don't know where they errors from. Then, i recommend to you to uninstall your openerp server and reinstall it again. Don't unistall your postgresql server.
Best regards.
 

If you always just install and reinstall the system, you never understand the openerp. :-)

klacus
on 8/18/14, 1:47 AM

@klacus : i'm agree with you. :)

ThackerS (ts)
on 8/21/14, 5:13 PM

:-)

klacus
on 8/21/14, 8:24 PM

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

2 follower(s)

Stats

Asked: 8/17/14, 6:58 AM
Seen: 1753 times
Last updated: 3/16/15, 8:10 AM