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.


Filter a View using sequence

aci aisha
on 2/12/15, 3:30 AM 495 views


I have a tree view displaying some file numbers.

File number starts with different sequences..

Can i filter it with a specific sequence(Using Code)..




| 5 3 8
Pondicherry, India
On 2/12/15, 3:54 AM


You try this

  <filter string="file numbers" domain="[('file_no','=','your_required_value')]"/>

for example:

<filter string="file numbers" domain="[('file_no','=',25)]"/> means, you will get all the value if file_no=25 only

In xml view you can define a doamin for the following ways:

 staring with "te":

<filter string="Valid" icon="terp-personal" domain="[('name','=like','te%%')]" />

ending with "te" :

<filter string="Valid" icon="terp-personal" domain="[('name','=like','%%te')]" />

contains "te":

<filter string="Valid" icon="terp-personal" domain="[('name','like','te%%')]"


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

1 follower(s)


Asked: 2/12/15, 3:30 AM
Seen: 495 times
Last updated: 3/16/15, 8:10 AM