Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
11298 Vistas

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

Avatar
Descartar
Mejor respuesta

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>
Avatar
Descartar
Mejor respuesta

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!

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
mar 18
9419
2
nov 23
3039
7
abr 21
20358
1
oct 20
4797
2
nov 16
4165