Skip to Content
Menu
This question has been flagged
2 Replies
1689 Views
File "src/lxml/etree.pyx", line 3633, in lxml.etree._Validator.assert_
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/ubuntu/odoo/fnet_v15/odoo-server/odoo/http.py", line 644, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/ubuntu/odoo/fnet_v15/odoo-server/odoo/http.py", line 302, in _handle_exception
    raise exception.with_traceback(None) from new_cause
AssertionError: Element odoo has extra content: record, line 4

MY XML CODE:


xml version="1.0" encoding="UTF-8"?>


model="ir.ui.view" id="employee_portal_kanban_view">
name="name">Self Employee
name="model">hr.employee.portal
name="arch" type="xml">

name="emp_id"/>

t-name="kanban-box">
t-attf-class="oe_kanban_global_click">


class="fa-solid fa-user" role="img" aria-label="My Profile"/>
t-esc="record.emp_id.value"/>









model="ir.ui.view" id="employee_portal_form_view">
name="name">Self Employee
name="model">hr.employee.portal
name="arch" type="xml">



name="emp_id"/>







model="ir.actions.act_window" id="employee_portal_action_window">
name="name">Self Employee
name="res_model">hr.employee.portal
name="view_mode">kanban,form


name="employee_portal"
id="employee_portal_menu_root"
string="My Profile"
action="employee_portal_action_window"
web_icon="static/description/icon.png"/>


name="My Details"
id="employee_portal_my_details_menu"
parent="employee_portal_menu_root"/>


Thanks in advance :)


Avatar
Discard
Best Answer

Hi,

This error is raised when the written/given syntax in the XML file is wrong.

As the pasted code in the question is not in the right format, it will be hard to trace.


In order to resolve this, you have to go through the xml file and have to trace which line of code is causing the issue. This can be achieved by commenting the code section by section in the xml file and trace the which line of code is wrong.


And if it repeats often, same mistakes you repeat in the code :)

Thanks

Avatar
Discard
Author Best Answer

Hi Niyas, 

actually the time I pasted my xml code in the description box and saved this post, codes where kind of separated all over as you can see. So I'll try to paste it here in this post answer and see how it looks.



Self Employee
hr.employee.portal




















Self Employee
hr.employee.portal












Self Employee
hr.employee.portal
kanban,form


id="employee_portal_menu_root"
string="My Profile"
action="employee_portal_action_window"
web_icon="static/description/icon.png"/>


id="employee_portal_my_details_menu"
parent="employee_portal_menu_root"/>

Anyways dint expect Niyas Raphy himself to help me out! You are awesome, trying to help solve every user's bugs in this forum. Keep up the good work and thank you so much.
Avatar
Discard
Related Posts Replies Views Activity
2
Dec 24
3122
1
Dec 24
350
4
Nov 24
1364
1
Sep 24
1134
1
Sep 24
1200