Odoo Help


AssertionError: Did not expect element filter Please need a help..........

on 7/15/14, 8:14 AM 2,291 views

Hi ,THis is my code ............

<?xml version="1.0" encoding="utf-8"?>
        <record id="sale_order_form_inherited1" model="ir.ui.view">
        <field name="name">sale.order.form.inherited</field>
        <field name="model">sale.order</field>
        <field name="inherit_id" ref="sale.view_order_form"/>
        <field name="arch" type="xml">
            <xpath expr="/form/sheet/group/group/field[@name='client_order_ref']" position="after">
                    <field name="status_id"/>
    <record id="view_order_tree" model="ir.ui.view">
            <field name="name">sale.view_order_tree</field>
            <field name="model">sale.order</field>
            <field name="inherit_id" ref="sale.view_order_tree"/>
            <field name="arch" type="xml">
                <field name="state" position="after">
                    <field name="status_id"/>
     <record id="search_sale_order_ept" model="ir.ui.view"> 
                 <field name="name">search_sale_order_ept</field>
                 <field name="model">sale.order</field> 
                 <field name="type">search</field> 
                 <field name="inherit_id" ref="sale.view_sales_order_filter"/> 

                    <filter  string="Hold" domain="[('state','=','hold')]" help="Hold" name='filter_hold'/>#Thi sis the error line 
                    <filter string="Back Order" domain="[('state','=','back_order')]" help="Back Order" name='filter_backorder'/>




File "lxml.etree.pyx", line 2773, in lxml.etree._Validator.assert_ (src/lxml/lxml.etree.c:113335) AssertionError: Did not expect element filter there, line 33


Hi Libu

I have edited the ans for this error in your previous question please look at 


do the following for the search view

<field name="name" position="after">

        <filter  string="Hold" domain="[('state','=','hold')]" help="Hold" name='filter_hold'/> 

<filter string="Back Order" domain="[('state','=','back_order')]" help="Back Order" name='filter_backorder'/>



Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 7/15/14, 8:14 AM
Seen: 2291 times
Last updated: 3/18/16, 6:06 AM