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

Filter a View using sequence

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

Friends,

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)..

Thanks...

3

Vasanth

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

Hi,

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)

Stats

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