İçereği Atla
Menü
Bu soru işaretlendi
4 Cevaplar
16541 Görünümler

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
Vazgeç

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


En İyi Yanıt

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
Vazgeç

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>

En İyi Yanıt

Check if this tag properly defined.


<odoo>

<data>

       </data>                       

</odoo>


OR


<openerp>

<data>

       </data>                       

</openerp>




Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
4
Eki 20
8542
3
Şub 24
10025
1
Kas 23
2484
1
Haz 23
3333
0
Şub 23
2466