Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

AssertionError: Element openerp has extra content: data, line 3

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
convertassertionerrorodoo9
10 Răspunsuri
77770 Vizualizări
Imagine profil
Jeferson M. Moreira

I get the following error while trying to install my custom addon module on odoo 9.0, what should I do to fix this?


Odoo Server Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 643, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 680, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 316, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 118, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 309, in checked_call
    result = self.endpoint(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 959, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 509, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 896, in call_button
    action = self._call_kw(model, method, args, {})
  File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 884, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 459, in button_immediate_install
    return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 533, in _button_immediate_function
    registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
  File "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 385, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 338, in load_modules
    loaded_modules, update_module)
  File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 237, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 156, in load_module_graph
    _load_data(cr, module_name, idref, mode, kind='data')
  File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 98, in _load_data
    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
  File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 852, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 926, in convert_xml_import
    relaxng.assert_(doc)
  File "lxml.etree.pyx", line 3375, in lxml.etree._Validator.assert_ (src/lxml/lxml.etree.c:166410)
AssertionError: Element openerp has extra content: data, line 3
2
Imagine profil
Abandonează
Imagine profil
Jignesh Mehta
Cel mai bun răspuns

Hello Jeferson,


In your XMl file, there is an extra tag. So it gives error as extra content. Please Check your XML file.


UPDATE:-

Remove the <data></data> tag and try <odoo></odoo> tag instead of <openerp></openerp> tag.

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

<odoo>

     // Your XML File

</odoo>


Thanks,

7
Imagine profil
Abandonează
Qutechs, Ahmed M.Elmubarak

Hi, it should works fine with current tags

Mubaris ct

thanks Mehtha i had the same error and this answer worked

Ray Carnes (ray)

Also check that you don't use < or > (like if you want to define a string in your file that is actually an HTML 'a' link) and instead use &lt; and &gt; otherwise the parser will think you are defining tags.

Imagine profil
rock_solid
Cel mai bun răspuns

 there is not only extra tag can cause the problem,but also some misstyping , open the xml file with IE  and you'll find the extra content easily,then delete it  

1
Imagine profil
Abandonează
Imagine profil
Ankit H Gandhi(AHG)
Cel mai bun răspuns

Hello all,

I facing same issue but I solved out my mistake.

Kindly check xml tag spelling.  It might be code have wrong spelling.

like..

True <menuitem>

wrong <menitem>

True word is sequence

Wrong word is seqence

Hope this help you.

Best Thanks,

Ankit H Gandhi.

0
Imagine profil
Abandonează
Imagine profil
foram shah
Cel mai bun răspuns

I got the same error and it is due to miss placing tag <record> instead of <act_window>

Thanks..

0
Imagine profil
Abandonează
Imagine profil
ABU K
Cel mai bun răspuns

somewhere you missed to close />  tag (closing tag ) ,add this  or please paste your xml file 

0
Imagine profil
Abandonează
Imagine profil
Jeferson M. Moreira
Autor Cel mai bun răspuns

@Dep and @Jignesh I checked my code and I can't find any extra tag or close tag missing. I understand through the log that this problem is because of <data></data>, but this doesn't make sense. Please can someone look at my code and help me.


<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<!-- ORDER VIEW TO LIST EMPLOYEE AND MANAGER ORDERS -->
<record model="ir.ui.view" id="my_order_tree_view">
<field name="name">order.tree</field>
<field name="model">helpdesk.order</field>
<field name="arch" type="xml">
<tree string="My Orders">
<field name="name" domain="['&amp;',('partner_id','=',user.partner_id.id), ('company_id','=',user.partner_id.company_id.id)]"/>
<field name="state" domain="['&amp;',('partner_id','=',user.partner_id.id), ('company_id','=',user.partner_id.company_id.id)]"/>
</tree>
</field>
<button string="New Order" name="%(action_order_form_view)d" type="action"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">Create the first order</p>
</field>
</record>

<record model="ir.actions.act_window.view" id="action_my_order_tree_view">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="my_order_tree_view"/>
<field name="act_window_id" ref="action_my_order_tree_view"/>
</record>

<!-- ORDER VIEW TO LIST ALL ORDERS FROM A SPECIFIC COMPANY -->
<record model="ir.ui.view" id="company_order_tree_view">
<field name="name">order.tree</field>
<field name="model">helpdesk.order</field>
<field name="arch" type="xml">
<tree string="Orders">
<field name="name" domain="[('company_id','=',user.partner_id.company_id.id)]"/>
<field name="state" domain="[('company_id','=',user.partner_id.company_id.id)]"/>
</tree>
</field>
<button string="New Order" name="%(action_order_form_view)d" type="action"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">Create the first order</p>
</field>
</record>

<record model="ir.actions.act_window.view" id="action_company_order_tree_view">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="company_order_tree_view"/>
<field name="act_window_id" ref="action_company_order_tree_view"/>
</record>

<!-- ORDER VIEW TO LIST TRACKED ORDERS TO AGENT -->
<record model="ir.ui.view" id="tracked_order_tree_view">
<field name="name">order.tree</field>
<field name="model">helpdesk.track.follow</field>
<field name="arch" typ="xml">
<tree string="Tracked Orders">
<field name="name" domain="[('user_id','=',user.id)]"/>
<field name="state" domain="[('user_id','=',user.id)]"/>
</tree>
</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">Track the first order</p>
</field>
</record>

<record model="ir.actions.act_window.view" id="action_tracked_order_tree_view">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="tracked_order_tree_view"/>
<field name="act_window_id" ref="action_tracked_order_tree_view"/>
</record>

<!-- ORDER VIEW TO LIST OPEN ORDERS TO AGENT -->
<record model="ir.ui.view" id="open_order_tree_view">
<field name="name">order.tree</field>
<field name="model">helpdesk.order</field>
<field name="arch" typ="xml">
<tree string="Open Orders">
<field name="name" domain="[('state','=','open')]"/>
<field name="state" domain="[('state','=','open')]"/>
</tree>
</field>
</record>

<record model="ir.actions.act_window.view" id="action_open_order_tree_view">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="open_order_tree_view"/>
<field name="act_window_id" ref="action_open_order_tree_view"/>
</record>

<!-- ORDER VIEW TO LIST ALL ORDERS -->
<record model="ir.ui.view" id="orders_tree_view">
<field name="name">order.tree</field>
<field name="model">helpdesk.order</field>
<field name="arch" typ="xml">
<tree string="Orders">
<field name="name"/>
<field name="state"/>
</tree>
</field>
</record>

<record model="ir.actions.act_window.view" id="action_orders_tree_view">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="orders_tree_view"/>
<field name="act_window_id" ref="action_orders_tree_view"/>
</record>

<!-- ANSWER ORDER FORM VIEW -->
<record model="ir.ui.view" id="order_form_view">
<field name="name">order.form</field>
<field name="model">helpdesk.answer</field>
<field name="arch" type="xml">
<form string="Order Form">
<header>
<button name="action_open" type="object" groups="employee,company_manager" string="Open" states="open" class="oe_highlight"/>
<button name="action_solved" type="object" groups="employee,company_manager" string="Solved" states="solved" class="oe_highlight"/>
<button name="action_deleted" type="object" groups="company_manager" string="Delete" states="deleted" class="oe_highlight"/>
<button name="action_message" type="object" string="Send message" class="oe_highlight"/>
<button name="action_track" type="object" groups="agents" string="Track" states="tracked" class="oe_highlight" attrs="{'invisible:[('state','=','tracked')]'}"/>
<button name="action_assign" type="object" groups="helpdesk_manager" string="Assign" states="tracked" class="oe_highlight" attrs="{'invisible:[('state','=','tracked')]'}"/>
<field name="state" widget="statusbar"/>
</header>

<sheet>
<group>
<field name="name"/>
<field name="description"/>
<field name="message"/>
</group>
</sheet>
</form>
</field>
</record>

<record model="ir.actions.act_window" id="action_order_form_view">
<field name="name">Order</field>
<field name="res_model">helpdesk.order</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
</record>

<!-- MENU -->
<!-- top level menu: no parent -->
<menuitem id="main_helpdesk_menu" name="HelpDesk"/>

<!-- A first level in the left side menu is needed before using action= attribute -->
<menuitem id="helpdesk_menu" name="HelpDesk" parent="main_helpdesk_menu"/>

<!-- Submenu -->
<menuitem id="my_order_menu" name="My Orders" groups="employee,company_manager" parent="helpdesk_menu" action="action_my_order_tree_view"/>
<menuitem id="company_order_menu" name="Company Orders" groups="company_manager" parent="helpdesk_menu" action="action_company_order_tree_view"/>
<menuitem id="tracked_order_menu" name="Tracked Orders" groups="agents" parent="helpdesk_menu" action="action_tracked_order_tree_view"/>
<menuitem id="open_order_menu" name="Open Orders" groups="agents" parent="helpdesk_menu" action="action_open_order_tree_view"/>
<menuitem id="all_orders_menu" name="All Orders" groups="helpdesk_manager" parent="helpdesk_menu" action="action_orders_tree_view"/>

</data>
</openerp>


0
Imagine profil
Abandonează
Jignesh Mehta

Try with my updated code.

Imagine profil
Qutechs, Ahmed M.Elmubarak
Cel mai bun răspuns

Hi,

I think your code has a lot of issues. But I think the one which generated this error is that you're putting the <button> field out side the <tree tag 

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<!-- ORDER VIEW TO LIST EMPLOYEE AND MANAGER ORDERS -->
<record model="ir.ui.view" id="my_order_tree_view">
<field name="name">order.tree</field>
<field name="model">helpdesk.order</field>
<field name="arch" type="xml">
<tree string="My Orders">
<field name="name" domain="['&amp;',('partner_id','=',user.partner_id.id), ('company_id','=',user.partner_id.company_id.id)]"/>
<field name="state" domain="['&amp;',('partner_id','=',user.partner_id.id), ('company_id','=',user.partner_id.company_id.id)]"/>
</tree>
</field>
<button string="New Order" name="%(action_order_form_view)d" type="action"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">Create the first order</p>
</field>
</record>



Try to remove or comment this line and try again ...
0
Imagine profil
Abandonează
Imagine profil
G.Abdessamia
Cel mai bun răspuns
In my case that was just a mistyping of web_icon form a menu, i wrote web-icon instead :
<menuitem id="purchase_menu" name="Achats"
                   web_icon="......."
                   sequence=""/>
0
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
AssertionError: Element odoo has extra content: data owing to few lines of code in the Email Template XML
assertionerror
Imagine profil
Imagine profil
1
oct. 23
3681
How to get data n view using custom widget in odoo 9
odoo9
Imagine profil
0
sept. 23
2865
How to get data n view using custom widget in odoo 9
odoo9
Imagine profil
0
sept. 23
2553
How to Remove " ADD NEW COLUMN " from task kanban view of Project Module? Rezolvat
odoo9
Imagine profil
Imagine profil
Imagine profil
2
iun. 25
12210
How to edit the product website description Rezolvat
odoo9
Imagine profil
Imagine profil
Imagine profil
Imagine profil
Imagine profil
6
oct. 23
23531
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now