Before this commit, the pivot's dataSources were managed by the core plugin
`PivotCorePlugin`. This didn't make sense since dataSources aren't core data:
- they are neither exported nor imported
- they can be different for each user (their ids were generated via uuidv4
at import)
- managing them required to handle local command in the core plugin
Moved the dataSources management to the UI plugin `PivotUIPlugin` and moved
the relevant getters inside this plugin. Changed the ids of the dataSources
to be the same as the pivot's id + a prefix, to avoid having to maintain a
mapping `pivotId` <=> `dataSourceId` .
This commit also removes the dataSourceId from the `INSERT_PIVOT`
command, which have no place here since this is a core command and the
dataSources are now a pure UI concept.
This is slighly more tricky than for lists, because the datasource need to
be loaded before the `INSERT_PIVOT` command to fetch the table structure.
The component dispatching the command need to make sure it creates a
dataSource with the id given by the getter `getPivotDataSourceId`,
or else the dataSource will be loaded twice.
Task: 3293491
Part-of: odoo/odoo#120136
Before this commit, the list's dataSources were managed by the core plugin
`ListCorePlugin`. This didn't make sense since dataSources aren't core data:
- they are neither exported nor imported
- they can be different for each user (their ids were generated via uuidv4
at import)
- managing them required to handle local command in the core plugin
Moved the dataSources management to the UI plugin `ListUIPlugin` and moved
the relevant getters inside this plugin. Changed the ids of the dataSources
to be the same as the list's id + a prefix, to avoid having to maintain a
mapping `listId` <=> `dataSourceId` .
This commit also removes the dataSourceId from the INSERT_ODOO_LIST
command, which have no place here since this is a core command and the
dataSources are now a pure UI concept.
Task: 3293491
Part-of: odoo/odoo#120136
Steps to reproduce the issue:
1. Project> select Project > Task> List view
2. Studio list view > Add existing properties field
3. Go back to list view > Favorites > add to spreadsheet
4. New Spreadsheet > Will receive error
opw-3284273
closesodoo/odoo#120473
X-original-commit: 5eb80e34db2e54b56164ea4b98bea3cebb09312b
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Before this revision, a date/datetime field was displayed in UTC instead
of in the user timezone.
This revision fixes this issue.
opw 3127742
closesodoo/odoo#117623
X-original-commit: c07b450594f7e3e1f093d0b5a5a083f915f75310
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
This commit fixes the problem of invisible borders when pivots and lists are
inserted. Now around headers and the total row, black borders are added.
task 3103403
closesodoo/odoo#117493
Related: odoo/enterprise#39218
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
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` ;)
closesodoo/odoo#115972
Related: odoo/enterprise#38471
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
This commit refactors the current model structure of spreadsheet-related
module. Data fields are integrated into an abstract model
`spreadsheet.mixin` and all sub-models are inherited from it. This way
we can group all decode/encode logics into one place.
task 3222572
closesodoo/odoo#116498
Related: odoo/upgrade#4473
Related: odoo/enterprise#38692
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
With this revision, the label of the field of the first row groupby is
inserted as the row title.
Task-id 2901960
closesodoo/odoo#107220
Related: odoo/enterprise#37395
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Up until now, the collaborative expected a field named `raw` containing
the serialized json data. This is historic and appeared because the field
containing the existing field `raw` on `document.document` contained this
data.
The name `raw` is meaningless. Now the collaborative expects a field
named `spreadsheet_data`.
I chose a field over a custom method because fields are more broadly
supported everywhere (web client services, web client mocks)
closesodoo/odoo#104167
Related: odoo/upgrade#4005
Related: odoo/enterprise#33246
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
When the data takes longer to load, the UI is blocked with the loading
overlay.
Now the data is loaded in the background and we can still navigate
in the spreadsheet.
Note: I moved the `.silent` upper in the call chain. Lower level structures
such as ServerData, DataSources, MetadataRepository don't need to know.
closesodoo/odoo#110387
X-original-commit: 8b09c7347ebeffa7059ed0ccc63f73e3559b7712
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Currently, a user opening a spreadsheet containing pivots/lists/graphs
that they don't have the rights to access (be it because of the parent
model or the domain applied) will end up in an infinite loop.
While starting the datasources, the fetch step will throw, potentially
spamming the user with access errors.
Manual forward port of https://github.com/odoo/enterprise/pull/35146
Task 3107650
closesodoo/odoo#110113
X-original-commit: 1555e79be0b52c30df43e8de50f5db56fbbda630
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
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
closesodoo/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>
Before this revision, the fields of `partner` were not searchable, which
was not correct.
This revision fixes that.
Part of task-id 2987871
X-original-commit: 2c180660e412bd0f52da920bdf8f96b200fc3aa2
Part-of: odoo/odoo#102688
Our reporting dashboards are too tedious to use for the average user, and
doesn't allow for edition or advanced computations.
Using spreadsheet formulas allows almost endless possibilities.
Task-id 2799682
Part-of: odoo/odoo#97606
Co-authored-by: Lucas Lefèvre <lul@odoo.com>
Co-authored-by: Pierre Rousseau <pro@odoo.com>
The spreadsheet module is moved to the community version
for the upcoming spreadsheet dashboards
This module is the core engine of spreadsheets in Odoo.
It contains `o-spreadsheet` library (o_spreadsheet.js) and all basic
integrations with odoo such as accounting formulas, lists, pivot, filters, etc.
This module alone does not have any action or menu to open a spreadsheet.
Those actions come with `documents_spreadsheet` module or the upcoming
`spreadsheet_dashboard` module.
Task 2799682
Part-of: odoo/odoo#97606