Odoo Help


Set default filter

on 7/3/15, 7:54 AM 704 views


Could any one help me to figure out what is the problem why the filter isn't set by default:

<record id="view_voucher_inherit_filter" model="ir.ui.view">

<field name="name">checks.search</field>

<field name="model">account.voucher</field>

<field name="inherit_id" ref="account_voucher.view_voucher_filter"/>

<field name="arch" type="xml">

<filter string="Draft" position="before">

<filter name="cheque" domain="[('journal_id.code', '=', 'TCHK')]" />




<record id="account_voucher.action_voucher_list" model="ir.actions.act_window">

<field name="name">Journal Vouchers</field>

<field name="type">ir.actions.act_window</field>

<field name="res_model">account.voucher</field>

<field name="view_type">form</field>

<field name="view_mode">tree,form,graph</field>

<field name="context">{'search_default_cheque:1}</field>

<field name="search_view_id" ref="view_voucher_inherit_filter"/>


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 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: 7/3/15, 7:54 AM
Seen: 704 times
Last updated: 7/3/15, 7:54 AM