Commit Graph
2 Commits
Author SHA1 Message Date
John Laterre (jol) 5f66c57389 [IMP] account_reports,l10n_*: create abstract model for custom reports
In Reportalypse, custom reports use fields to refer to functions
allowing customizing different behaviors of the engine.

With this, all account.report models contain all the functions
of all the custom reports, leading to possible name clashes
if the functions aren't properly prefixed.

We can improve that a little: instead of having multiple fields,
we use but one, referring to an AbstractModel inheriting
from a new AbstractModel called account.report.custom.handler.

This AbstractModel simply contains the different functions
that can be overridden, and its subclasses are responsible to do so.

In the code, instead of calling _get_custom_report_function,
we check whether there is a custom handler for the report,
and call the right function on it.

task-2954761

closes odoo/odoo#98973

Related: odoo/documentation#2673
Related: odoo/enterprise#30777
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2022-09-09 12:16:58 +02:00
oco-odoo b7232b14b7 [IMP] account, l10n_*: Introduce unified reporting engine
This commit adapts account's model to the new report engine introduced for v16, and updates the data files accordingly.

account.report model is now declared in community, together with the other models used by the reporting. This is done so that the tax tags can properly be created by the tax report and used on tax templates. All the actual computation logic stays in enterprise.

See enterprise commit for full details.

Task 2524389

Part-of: odoo/odoo#94125
2022-08-25 19:56:55 +02:00