Using o-spreadsheet features and functions is done using the same import module as if it was installed from npm. Additionaly, by adding the library as dev dependency in package.json[1], IDEs can now leverage Typescript types for autocomplete and type checking. The "alpha" release tag is always the lastest master version. [1] enable web tooling `addons/web/tooling/enable.sh` ;) closes odoo/odoo#115972 Related: odoo/enterprise#38471 Signed-off-by: Rémi Rahir (rar) <rar@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 * as spreadsheet from "@odoo/o-spreadsheet";
|
|
const { corePluginRegistry, coreViewsPluginRegistry } = 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);
|
|
|
|
coreViewsPluginRegistry.add("OdooGlobalFiltersUIPlugin", GlobalFiltersUIPlugin);
|
|
coreViewsPluginRegistry.add("OdooPivotUIPlugin", PivotUIPlugin);
|
|
coreViewsPluginRegistry.add("OdooListUIPlugin", ListUIPlugin);
|
|
coreViewsPluginRegistry.add("odooChartUIPlugin", OdooChartUIPlugin);
|