Rational
We have an analytic acocunt module which can be used to know the debits and creadits of the company for diferent analytic roots accounts. In case the company has several branches one can use the analytic accounts to track the benefit of each of the branches but it is not possible to see how each of the branches afected the Profit and Loss of the company and how much amount of an expense account is related to one for the branches.
Proposal
I think we should add a Many2One to an analytic account on the Profit & Loss context model (also another for analytic). When the users sets a value on this field the amount of the types will be computed using the analytic lines and filtered with the selected analytc account.
The analytic account should be also added to the general_ledger account so when opening a type to see it’s moves we will see the values of the analytic lines for each account.