How to filter a tree view (model A) by a new create filter belong to model B ?
I have created a new field (many2one, named x_BU, related to account.analytic.account) named "Business Unit" in model account.invoice.line. I show my new field in view account.invoice.form. So, for every client bill accounting line (it doesn't work for supplyers but it's another problem) I can tag an analytic account AND a Business unit (whose I find back in analytic accountdue to the relation many2one) without use analytic distribution.
Then, in model account.move.line i create a new field one2many related to my previous field x_BU to be able to filter my accounting lines by Business Unit in view accounting move line.
But the problem is that : in view account move line, I find my filter Busniess Unit in Advanced filter, but I doesn't filter my accounting lines.
Could you tell me what I'm doing wrong ?or What's it's not possible to do ?
Tkank you if you can Help me;