Commit Graph
10 Commits
Author SHA1 Message Date
anhe-odoo 02c4f52a9a [FIX] spreadsheet_edition: fixes image export in .xlsx
Task Description

o-spreadsheet now allows to insert images in a spreadsheet, and
we also allow to export them inside .xlsx file. However, while this
works as intended in a standalone o-spreadsheet server, it doens't
work correctly in Odoo as the data of the image are not found while
we try ton convert the spreadsheet to an xlsx file. This PR aims to
simplify the request made to get the binary data of the image file.

Related task

closes odoo/odoo#139549

Task: 3524473
X-original-commit: 301a98c
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-10-25 17:03:21 +00:00
Rémi Rahir (rar) 8a608a66ed [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/430f0907 [REL] 16.5.0-alpha.12
https://github.com/odoo/o-spreadsheet/commit/ca347935 [FIX] scorecard: fix baseline arrow
https://github.com/odoo/o-spreadsheet/commit/07863006 [IMP]  grid: add custom paste shortcuts
https://github.com/odoo/o-spreadsheet/commit/8c94a5a6 [FIX] Selection: exclude hidden rows/cols in selection statistics Task: 3508872
https://github.com/odoo/o-spreadsheet/commit/383f5344 [FIX] Figure: Pass figure as child component props Task: /
https://github.com/odoo/o-spreadsheet/commit/4b42059d [REL] 16.5.0-alpha.11
https://github.com/odoo/o-spreadsheet/commit/8635acf7 [FIX] charts: export gauge and scorecard charts in .xlsx Task: 3524473
https://github.com/odoo/o-spreadsheet/commit/a825627d [IMP] chart: Scorecard are now drawn on a canvas Task: 3524473
https://github.com/odoo/o-spreadsheet/commit/cb493613 [IMP] index: expose SelectionInput and toUnboundedZone Task: 3554062
https://github.com/odoo/o-spreadsheet/commit/8282716d [FIX] xlsx export: remove unsupported characters Task: 3552957
https://github.com/odoo/o-spreadsheet/commit/031593c2 [IMP] index: expose lettersToNumber
https://github.com/odoo/o-spreadsheet/commit/450a4eae [REF] ot: extract and expose range transformation helper Task: 3554062
https://github.com/odoo/o-spreadsheet/commit/8da5fb29 [IMP] types: shorter getters declaration
https://github.com/odoo/o-spreadsheet/commit/7e3bed67 [FIX] clipboard: cut/paste whole CF across sheets Task: 3502777
https://github.com/odoo/o-spreadsheet/commit/4e5f15f7 [FIX] icons: Fix icon svg's
https://github.com/odoo/o-spreadsheet/commit/c81dce7e [IMP] evaluation: expose getCorrespondingFormulaCell Task: 3318865
https://github.com/odoo/o-spreadsheet/commit/854f2d74 [FIX] ChartPanel: traceback on deleting chart while editing data series Task: 3523882
https://github.com/odoo/o-spreadsheet/commit/d39ded8c [IMP] edition: cancel edition when setting format Task: 3515610
https://github.com/odoo/o-spreadsheet/commit/b742ae0e [IMP] formats: add more date and number formats Task: 3515610
https://github.com/odoo/o-spreadsheet/commit/5641af62 [REF] formats: use helper to create format action Task: 3515610
https://github.com/odoo/o-spreadsheet/commit/025ee4db [FIX] menu: truncate menu description Task: 3515610
https://github.com/odoo/o-spreadsheet/commit/278c019a [FIX] core: typo
https://github.com/odoo/o-spreadsheet/commit/e6cad253 [MOV] tests: split tests files by category
https://github.com/odoo/o-spreadsheet/commit/34d96c72 [FIX] headers_overlay: reselect full column or row as dataseries range Task: 3481617

closes odoo/odoo#139383

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-10-20 23:37:50 +00:00
Lucas Lefèvre (lul) aa118d7dc0 [IMP] spreadsheet_dashboard_edition: load dashboard with user locale
Currently, spreadsheet dashboards always display numbers with the en_US
format, no matter the user's lang.

That's because the locale is hardcoded in the spreadsheet source file, in
the source code (or it falls back to the default en_US locale if it's missing).

With this commit, we dynamically change the spreadsheet locale with the user's
locale when he loads a dashboard.

We can change the locale with every user because the dashboard is readonly.
It cannot create a giant mess with dates in various locales.

Limitation
----------
Since hardcoded date formats are not changed when the locale changes, dates
will keep the en_US format. However, most (if not all) dates in dashboards
are coming from ODOO.PIVOT and ODOO.LIST functions, which compute the formats
dynamically based on the current locale.

closes odoo/odoo#135119

Task: 3484002
Related: odoo/enterprise#47284
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-10-11 17:01:57 +00:00
Lucas Lefèvre (lul) a8c6f26912 [IMP] spreadsheet: remove unused public method
The method is no longer used by the web client:
=> it should be private

See enterprise commit

closes odoo/odoo#133500

Task: 3483938
Related: odoo/enterprise#46460
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-09-27 14:57:00 +00:00
Chenyun YangandLucas Lefèvre dbdb7c9a7c [IMP] spreadsheet, spreadsheet_dashboard: share dashboard
This commit introduces models related to sharing dashboard, and
implements the sharing from dashboard view.
The basic idea is the same as sharing normal spreadsheet. The major
difference is that sharing a dashboard will direct to the dashboard view
instead of read-only spreadsheet view. A button and a side panel which
shows the global filters show up only in the dashboard view.

task 3378150

closes odoo/odoo#127370

Related: odoo/enterprise#43664
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Co-authored-by: Lucas Lefèvre <lul@odoo.com>
2023-08-14 14:52:02 +02:00
Adrien Minne (adrm) 4c13f4f08c [IMP] spreadsheet: detect mismatch in user/spreadsheet locale
This commit add a small indicator in the spreadsheet's control panel
to indicate if the user's locale is different from the spreadsheet's.

closes odoo/odoo#129857

Task: 3389491
X-original-commit: 5c776994f7bd230816369be3899989e7ab780906
Related: odoo/enterprise#44665
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-07-27 14:47:32 +02:00
Adrien Minne (adrm) c31032f415 [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/7d15d3c7 [REL] 16.4.0-alpha.6
https://github.com/odoo/o-spreadsheet/commit/56f3b593 [IMP] spreadsheet: add locale handling Task: 3222401
https://github.com/odoo/o-spreadsheet/commit/5aec70d4 [IMP] cell: store date string as value + format Task: 3222401
https://github.com/odoo/o-spreadsheet/commit/eeaf0083 [IMP] icons: add display header icon
https://github.com/odoo/o-spreadsheet/commit/3f1e970c [FIX] SelectionInput: fix position of exclamation mark icon Task: 3355063
https://github.com/odoo/o-spreadsheet/commit/a46bf04e [FIX] LineBarPieConfigPanel: charts data series invalid input Task: 3355063

closes odoo/odoo#126679

Related: odoo/enterprise#43291
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-06-29 18:20:37 +02:00
Om Rabara f42f5324fd [FIX] spreadsheet: check valid json data file while uploading
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
This error occurs when we try to upload an invalid json data file.

sentry- 3957419658

X-original-commit: https://github.com/odoo/odoo/commit/1a60a19a1c001c12cf933dd8c82332167b609038
Part-of: odoo/odoo#120818
2023-05-11 18:25:20 +02:00
Chenyun Yang 0a87304ff0 [REF] spreadsheet: spreadsheet models
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

closes odoo/odoo#116498

Related: odoo/upgrade#4473
Related: odoo/enterprise#38692
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-03-30 15:09:33 +02:00
Lucas Lefèvre a20032cc1c [MOV] spreadsheet: move module to community
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
2022-09-10 02:54:51 +02:00