跳至内容
菜单
此问题已终结

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>


形象
丢弃

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


最佳答案

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>

形象
丢弃

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>

最佳答案

Check if this tag properly defined.


<odoo>

<data>

       </data>                       

</odoo>


OR


<openerp>

<data>

       </data>                       

</openerp>




形象
丢弃
相关帖文 回复 查看 活动
4
10月 20
8564
3
2月 24
10045
1
11月 23
2500
1
6月 23
3347
0
2月 23
2482