Analytic distribution

Rational

In some cases, it is needed to distribute the amount of a line to different analytic accounts.
For example, fixed charges (like rental or electricity) will be distributed between each cost centre following a ratio.
But such distribution is actually not possible with the current design because on Sale, Purchase or Invoice, we can only select an account per axes.
Also often the same distribution need to be apply many times on similar lines, so it will be good to allow to reuse them. And users do not necessary know the exact distribution for each case.

Proposal

Instead of complexify the current form with ratio for each account and a 100% validation, I propose to create a new account type distribution.
This new account type could be used as selection on document but not for entry.
A distribution account will contain a list of accounts (normal or distribution) and rate. The total of the rates must be 100%.
The modules which create analytic lines will be adapted to create many lines in case of distribution account.

Implementation

https://bugs.tryton.org/issue5908