Odoo Help

1

How to display filters at the top of tree view

By
Jean-Michel Awad
on 4/22/13, 3:16 PM 3,387 views

Hello all,

In the account.move.line tree view, we see 2 filters directly displayed at the top of the tree view b: Period and Journal.

How can we achieve this ? I can't find a way to do that, what is the right way ?

Thanks for your help.

Regards,

Jean-Michel

3

Ray Carnes

--Ray Carnes--
16359
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0.

Completed Odoo Functional and Technical Training.

Major Skills:

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

I am a skilled Communicator and I only take the serious things seriously!

Ray Carnes
On 4/22/13, 5:04 PM

Take a look at the Action that is attached to the Menu Item. (If you access this from the Edit Action option in the Debug menu (Developer Mode) it is easier to find.)

It defaults to type tree_account_move_line_quickadd

Then, you find account_move_line_quickadd.xml exists in \addons\account\static\src\xml\

<t t-name="AccountMoveLineQuickAdd">
    <div class="oe_account_quickadd ui-toolbar" style="margin-bottom:0px;">
        <div class="oe_form_dropdown_section">
            <h4>Period :</h4> 
            <select class="oe_account_select_period">

            </select>
        </div>
        <div class="oe_form_dropdown_section">
            <h4>Journal :</h4> 
            <select class="oe_account_select_journal" >

            </select>
        </div>
    </div>
</t>
0
Lucio
On 4/22/13, 5:04 PM

I am not sure if this is what you want, but you can select a default search filter adding context to your action (probably defined in the <something>_view.xml):

<field name="context">{"search_default_<Name_of_the_Filter>":1}</field>

Where <name_of_the_filter> is the name of the wanted filter (also, probably defined in the<something>_view.xml)

<filter string="<Showable_string>" ... name="<Name_of_the_Filter>" ... />

Hope this helps you!

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.

Register

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

0 follower(s)

Stats

Asked: 4/22/13, 3:16 PM
Seen: 3387 times
Last updated: 3/16/15, 8:10 AM