Installing the module in a big DB was very slow.
I applied several optimizations to the method for working better with big datasets:
- Prefetch all analytic account distribution.
- Batch writes as much as possible.
@moduon MT-4982
When installing the module account_financial_report, a relational table between
account_move_line and account_analytic_account is created and computed.
However, if an analytic account was used only on draft invoices before being deleted,
its ID will remain in the JSON column analytic_distibution of account_move_line.
In that case we get a ForeignKeyViolation because the ID doesn't exist in
account_analytic_account table.
Therefore, we need to check if the ID exists during the computation to avoid
inserting it in the relational table and raising the error.
* Move to less files to compile variables
* hide contacts on partner
* Add reports to res partner actions
* initialize wizard from context
* initialize wizard by current fiscal year