Odoo Help


How to list EAN 13 Barcode first in search view of a custom module

on 1/8/15, 5:39 AM 733 views

  Hi all,

When I add custom search view  in product it shows  ean13 in last field of search view.I want to show list  this ean13 in first .How to change my code
        <!-- <record id="product_template_search_custom_view" model="ir.ui.view">
            <field name="name">product.template.customsearch</field>
            <field name="model">product.template</field>
             <field name="inherit_id" ref="product.product_template_search_view"/>
             <field name="arch" type="xml">
                <search string="Product">
                    <field name="ean13" string="EAN 13 Baarcode"/>
        </record> -->

On 1/8/15, 6:25 AM

Use xpath to get the first() field and put ean13 before that. <xpath expr="//field[fisrt()]" position="before"><field name="ean13" string="EAN 13 Baarcode"/></xpath>

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

1 follower(s)


Asked: 1/8/15, 5:39 AM
Seen: 733 times
Last updated: 3/16/15, 8:10 AM