Odoo Help


This community 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.


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

on 7/15/14, 8:14 AM 1,912 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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)


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