Commit Graph

8 Commits (c7b93a6c76f9cdae1595e181a4ac79d2caa93cb6)

Author SHA1 Message Date
Jairo Llopis f4e7e2a6e2
[FIX] account_financial_report: optimize computation of analytic accounts
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
2024-02-01 12:52:41 +00:00
Akim Juillerat 973b928114 Avoid error on installation with missing analytic account
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.
2023-10-16 08:52:03 +02:00
David Ramia 36c5b3580c [MIG] account_financial_report: Migration to 16.0 2022-12-24 10:49:56 +01:00
Joan Sisquella cace7052c3 [IMP] domain widget performance fix 2022-11-30 18:07:35 +01:00
Ernesto Tejeda 30ccdf5bb3 [MIG] account_financial_report: Migration to 13.0 2022-11-30 18:07:31 +01:00
Ernesto Tejeda 65d8966a37 [IMP] account_financial_report: black, isort 2022-11-30 18:07:31 +01:00
Iryna Vushnevska a0df108788 [IMP] account_financial_reports: Several improvements:
* 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
2022-11-30 18:07:27 +01:00
Jordi Ballester Alomar 5396ef00d1 [account_financial_report]
- minor usability fixes for multicompany
- improve performance of general ledger using a new index
2022-11-30 18:07:26 +01:00