Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
4 Răspunsuri
16561 Vizualizări

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>


Imagine profil
Abandonează

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


Cel mai bun răspuns

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>

Imagine profil
Abandonează

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>

Cel mai bun răspuns

Check if this tag properly defined.


<odoo>

<data>

       </data>                       

</odoo>


OR


<openerp>

<data>

       </data>                       

</openerp>




Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
4
oct. 20
8563
3
feb. 24
10045
1
nov. 23
2500
1
iun. 23
3347
0
feb. 23
2481