Skip to Content
Menu
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

Hey, I am facing the same error. Can you help me
Here is my XML
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="pos_button.PaymentScreenButtons"
t-inherit="point_of_sale.PaymentScreenButtons"
t-inherit-mode="extension">
<xpath expr="//div[contains(@class, 'payment-buttons')]" position="inside">
<button class="button button-partial-payment btn btn-light py-3 text-start rounded-0 border-bottom"
t-on-click="createAndPrintInvoice">
<i class="fa fa-money me-2"/>Custom Button
</button>
</xpath>
</t>
</templates>

Best Answer

Check if this tag properly defined.


<odoo>

<data>

       </data>                       

</odoo>


OR


<openerp>

<data>

       </data>                       

</openerp>




Avatar
Discard
Related Posts Replies Views Activity
4
Oct 20
8345
3
Feb 24
9847
1
Nov 23
2290
1
Jun 23
3181
0
Feb 23
2347