The global filters had to be aware of every type of datasources that it affected (i.e. pivots, lists and charts). This commit introduces the possibility for any datasource to register its type in an object handled by the filters, making the latter agnostic of the different possible kinds. Task 2992752 closes odoo/odoo#102688 X-original-commit: b7dda98dfd2ee6973e2ca09b8c8ee7e8c43032a8 Related: odoo/enterprise#32526 Signed-off-by: Rémi Rahir (rar) <rar@odoo.com> Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
41 lines
1.7 KiB
JavaScript
41 lines
1.7 KiB
JavaScript
/** @odoo-module */
|
|
|
|
/**
|
|
* This file is meant to load the different subparts of the module
|
|
* to guarantee their plugins are loaded in the right order
|
|
*
|
|
* dependency:
|
|
* other plugins
|
|
* |
|
|
* ...
|
|
* |
|
|
* filters
|
|
* /\ \
|
|
* / \ \
|
|
* pivot list Odoo chart
|
|
*/
|
|
|
|
/** TODO: Introduce a position parameter to the plugin registry in order to load them in a specific order */
|
|
import spreadsheet from "@spreadsheet/o_spreadsheet/o_spreadsheet_extended";
|
|
const { corePluginRegistry, uiPluginRegistry } = spreadsheet.registries;
|
|
|
|
import { GlobalFiltersCorePlugin, GlobalFiltersUIPlugin } from "@spreadsheet/global_filters/index";
|
|
import { PivotCorePlugin, PivotUIPlugin } from "@spreadsheet/pivot/index"; // list depends on filter for its getters
|
|
import { ListCorePlugin, ListUIPlugin } from "@spreadsheet/list/index"; // pivot depends on filter for its getters
|
|
import {
|
|
ChartOdooMenuPlugin,
|
|
OdooChartCorePlugin,
|
|
OdooChartUIPlugin,
|
|
} from "@spreadsheet/chart/index"; // Odoochart depends on filter for its getters
|
|
|
|
corePluginRegistry.add("OdooGlobalFiltersCorePlugin", GlobalFiltersCorePlugin);
|
|
corePluginRegistry.add("OdooPivotCorePlugin", PivotCorePlugin);
|
|
corePluginRegistry.add("OdooListCorePlugin", ListCorePlugin);
|
|
corePluginRegistry.add("odooChartCorePlugin", OdooChartCorePlugin);
|
|
corePluginRegistry.add("chartOdooMenuPlugin", ChartOdooMenuPlugin);
|
|
|
|
uiPluginRegistry.add("OdooGlobalFiltersUIPlugin", GlobalFiltersUIPlugin);
|
|
uiPluginRegistry.add("OdooPivotUIPlugin", PivotUIPlugin);
|
|
uiPluginRegistry.add("OdooListUIPlugin", ListUIPlugin);
|
|
uiPluginRegistry.add("odooChartUIPlugin", OdooChartUIPlugin);
|