Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
3988 Näkymät

Hello,

The problem begins with this:

I go to Account/Configuration/Analytic Accounts and choose any account.

I click on Cost and Revenues button to see analytic lines.

The lines are shown and I apply more filters to refine.

Now I save this favorite user filter to be used by default, but when I return, it is not set by default.

I know it is two clicks away but I still need it.

Is this possible at all?

I tried replacing the button Cost and Revenues with my own

<xpath expr="//button[@name='128']" position="replace">
<button class="oe_stat_button" type="object" name="show_cost_revenues" icon="fa-usd" string="Cost/Revenue" widget="statinfo"/>
</xpath>

and added the function show_cost_revenues:

def show_cost_revenues(self):
 
action=self.env.ref('analytic.account_analytic_line_action_entries').read()[0]
 filters=self.env['ir.filters'].get_filters('account.analytic.line',                                                                 action['id'])
return action

So my question is also, is this the way, and if so, how do I now apply one of the filters in the action?


Thanks in dvance

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
toukok. 22
3263
1
huhtik. 22
1831
2
jouluk. 22
5043
1
jouluk. 22
3859
1
elok. 25
603