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