Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Artificial Intelligence
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all IndustriesInauguration Odoo Lyon
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

How to solve AssertionError in XML file: (Keep getting it often)

Subscribe

Get notified when there's activity on this post

This question has been flagged
v15
2 Replies
3876 Views
Avatar
Futurenet Technologies, Sri Haari
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 :)


0
Avatar
Discard
Avatar
Niyas Raphy (Walnut Software Solutions)
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

1
Avatar
Discard
Avatar
Futurenet Technologies, Sri Haari
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.
0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

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

Sign up
Related Posts Replies Views Activity
BUT your request violates my safety rules, because:
v15
Avatar
0
Mar 26
16
Timesheet App in backoffice Solved
v15
Avatar
Avatar
Avatar
2
Mar 26
3011
Prevent navigation if records are not save
v15
Avatar
Avatar
Avatar
2
Oct 25
4917
Creating user creates duplicated partner_id
v15
Avatar
Avatar
1
Sep 25
4570
Sales order line comment to Purchase order line comment Solved
v15
Avatar
Avatar
3
Jul 25
5774
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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 Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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