Odoo Help

Welcome!

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.

0

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

By
Odoo
on 7/15/14, 8:14 AM 2,103 views

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

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <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"/>
            </xpath>
        </field>
                
    </record>
    
    <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"/>
                </field>
            </field>
</record>
    
     <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'/>

</record>        
    </data>
</openerp>

------------------------------

Error

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

0

Hi Libu

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

https://openerp.my.openerp.com/forum/help-1/question/how-to-add-a-custom-search-field-in-sale-order-tree-view-for-my-custom-module-need-help-57418

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'/>

</field>

Regards

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)

Stats

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