This question has been flagged

Hello Experts

i am trying to install custom module and faced the following error. I googled and found that this error is may be due to error in the XML.


can somebody please review my xml code and guide me where i am doing wrong.

thanks in advanced


error:

AssertionError: Document does not comply with schema



XML code

<?xml version="1.0" encoding="utf-8"?>

<Odoo>

<data>

<!-- improved idea categories list -->

<record id='fleet_vehicle_view_form' model='ir.ui.view'>

<field name="name">fleet.vehicle.form</field>

<field name="model">fleet.vehicle</field>

<field name="inherit_id" ref="fleet.fleet_vehicle_view_form"/>

<field name="arch" type="xml">

<!-- find field description and add the field

idea_ids after it -->

<!-- <xpath expr="//field[@name='transmission']" position="after">

<field name="custfield" string="Custom Field"/>

</xpath> -->

<field name="transmission" position="after">

<field name="custfield"/>

</field>

</field>

</record>

</data>

</Odoo>


Avatar
Discard

Hi Waleed Mohsen

Thank you for the response.I will get back to you after testing this.

 

Thank you Waleed Mohsen by changing the tags issue resolved


Best Answer

Hi,
Replace your <Odoo> tag with <odoo>  and </Odoo> with </odoo>

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- improved idea categories list -->
<record id='fleet_vehicle_view_form' model='ir.ui.view'>
<field name="name">fleet.vehicle.form</field>
<field name="model">fleet.vehicle</field>
<field name="inherit_id" ref="fleet.fleet_vehicle_view_form"/>
<field name="arch" type="xml">
<!-- find field description and add the field
idea_ids after it -->
<!-- <xpath expr="//field[@name='transmission']" position="after">
<field name="custfield" string="Custom Field"/>
</xpath> -->
<field name="transmission" position="after">
<field name="custfield"/>
</field>
</field>
</record>
</data>
</odoo>

Avatar
Discard
Best Answer

Check if this tag properly defined.


<odoo>

<data>

       </data>                       

</odoo>


OR


<openerp>

<data>

       </data>                       

</openerp>




Avatar
Discard