Commit Graph
278 Commits
Author SHA1 Message Date
Lucas Lefèvre (lul) 90ccffcc7d [FIX] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/cadb8174b [REL] 17.0.7
https://github.com/odoo/o-spreadsheet/commit/548c779ba [FIX] dates: use UTC to represent naive date times Task: 3666703
https://github.com/odoo/o-spreadsheet/commit/49f05a71c [REF] dates: introduce DateTime to wrap Date object Task: 3666703
https://github.com/odoo/o-spreadsheet/commit/9676b76b7 [FIX] date: properly type reference dates Task: 3666703
https://github.com/odoo/o-spreadsheet/commit/653a0900f [FIX] tests: enables type checking for binded functions
https://github.com/odoo/o-spreadsheet/commit/61780b4e4 [FIX] functions: name MID args

closes odoo/odoo#149240

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2024-01-16 08:23:11 +00:00
Rémi Rahir (rar) 3d55b04ff8 [FIX] spreadsheet: Empty value in date filter should bypass filter
A date filter with an empty value would still create a domain filtered
on the current year instead of being bypassed.

closes odoo/odoo#148984

Task: 3668916
X-original-commit: 763f88e2d45cb7ba107db135eecd0365ba2b8c8b
Related: odoo/enterprise#54095
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2024-01-15 16:07:48 +00:00
Odoo Translation Bot b81790505b [I18N] Update translation terms from Transifex 2024-01-14 00:16:26 +01:00
Lucas Lefèvre (lul) 0111317b75 [FIX] spreadsheet: accumulate starting with past data
- Inserting a cumulated graph view inside spreadsheet
  (e.g. cumulated subscription MRR breakdown),
- apply a global filter to filter, let's say on the current
  month
=> the first data point does not include data from before
the current month (the accumulation starts at 0, even though
there is data before)

You can also check the MRR evolution subscription dashboard,
"MRR over time" chart.

Note: with this fix, we assume all "cumulated" charts are also
"cumulated_start". Which is true in practice (only one cumulated
graph view in the entire codebase)

closes odoo/odoo#149084

Task: 3680601
Related: odoo/enterprise#54146
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2024-01-12 14:27:47 +00:00
Odoo Translation Bot 0e23020b84 [I18N] Update translation terms from Transifex 2024-01-07 00:23:19 +01:00
Martin Trigaux 9a666bc8f0 [I18N] *: export 17.0 translations
There were a few errors

closes odoo/odoo#148315

Related: odoo/enterprise#53724
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2024-01-05 15:14:38 +00:00
Rémi Rahir (rar) a6d24df028 [FIX] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/310ca5796 [REL] 17.0.6
https://github.com/odoo/o-spreadsheet/commit/06b4a7e33 [FIX] evaluation: `evaluateFormula` no longer throws Task: 3576149
https://github.com/odoo/o-spreadsheet/commit/4f8cd15f4 [FIX] evaluation: track dependencies with R-tree Task: 3646902
https://github.com/odoo/o-spreadsheet/commit/d06a1a475 [FIX] Autofill: Automatic fill based on spreaded formula cells Task: 3626607
https://github.com/odoo/o-spreadsheet/commit/c404e22cc [IMP] index: export isMatrix
https://github.com/odoo/o-spreadsheet/commit/503d6bff5 [FIX] chart: time axis broken for days scale Task: 3619195
https://github.com/odoo/o-spreadsheet/commit/e5a902238 [IMP] scorecard: handling CF font style on chart
https://github.com/odoo/o-spreadsheet/commit/8ba492c75 [FIX] Components: rename private method arguments
https://github.com/odoo/o-spreadsheet/commit/078b86662 [FIX] *: Support metaKey modifier in event handlers Task: 3606161
https://github.com/odoo/o-spreadsheet/commit/63af9b38e [IMP] demo: don't double crash on launch error
https://github.com/odoo/o-spreadsheet/commit/cee016397 [FIX] export: faster border and style export
https://github.com/odoo/o-spreadsheet/commit/53e20ac4a [IMP] tests: pre-compile owl templates

closes odoo/odoo#148115

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2024-01-04 18:17:32 +00:00
Prakash Prajapati 9a3d51c1e3 [FIX] spreadsheet: fix the test case related to the year
Part-of: odoo/odoo#147809
2024-01-02 16:09:51 +00:00
Odoo Translation Bot ad35458e8b [I18N] Update translation terms from Transifex 2023-12-31 00:18:24 +01:00
Odoo Translation Bot 50e8e08183 [I18N] Update translation terms from Transifex 2023-12-24 00:18:24 +01:00
Odoo Translation Bot 304a6caa14 [I18N] Update translation terms from Transifex 2023-12-17 00:08:26 +01:00
Lucas Lefèvre (lul) 2fd6499c49 [FIX] spreadsheet: translate odoo links
Change your language and open any dashboard.
The table titles (e.g. "Top countries" of the Leads dashboard) are not
translated.

It was lost in commit odoo/o-spreadsheet@9616681
With this commit not all link labels are translated. Only odoo links.
I don't think other (regular) links should be translated.

closes odoo/odoo#146574

X-original-commit: a2e406db138d51e710caf61a2809cfa991ea6cb3
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-12-16 11:15:08 +00:00
Odoo Translation Bot 8ab45d4a85 [I18N] Update translation terms from Transifex 2023-12-10 00:12:46 +01:00
Rémi Rahir (rar) 51b931b5de [FIX] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/a554a8ba8 [FIX] spreadsheet: Force left-to-right direction
https://github.com/odoo/o-spreadsheet/commit/4e028decb [FIX] evaluation: cache ranges with errors
https://github.com/odoo/o-spreadsheet/commit/40206f030 [FIX] ranges: allow single full col references Task: 3571633
https://github.com/odoo/o-spreadsheet/commit/4862ff70e [FIX] composer: loop fixed full references Task: 3571633
https://github.com/odoo/o-spreadsheet/commit/81f21a3cc [FIX] tokenizer: recognized fixed full headers Task: 3571633
https://github.com/odoo/o-spreadsheet/commit/d3f89b161 [FIX] SelectionInput: release overriden input
https://github.com/odoo/o-spreadsheet/commit/380f06bef [FIX] repeat: faster can redo check
https://github.com/odoo/o-spreadsheet/commit/ab3c0f813 [FIX] HeaderVisibilityPlugin: ensure hidden rows include folded rows Task: 3560662
https://github.com/odoo/o-spreadsheet/commit/24a1383c2 [Fix] FilterEvaluationPlugin: hide all rows of the sheet Task: 3560662
https://github.com/odoo/o-spreadsheet/commit/837cbb48b [FIX] Spreadsheet: Allow shift-scroll to work on mac os Task: 3603771
https://github.com/odoo/o-spreadsheet/commit/d979d8e36 [FIX] error tooltip: display more of the error message Task: 3599337
https://github.com/odoo/o-spreadsheet/commit/be4a2113d [FIX] line chart: non aligned checkbox label
https://github.com/odoo/o-spreadsheet/commit/e2e10a3e8 [FIX] Sheet: fix `ADD_COLUMNS_ROWS` allowDispatch Task: 3603714
https://github.com/odoo/o-spreadsheet/commit/29b5698b3 [FIX] Commands: Add Allowdispatch to `MOVE_COLUMNS_ROWS`
https://github.com/odoo/o-spreadsheet/commit/3238f1262 [FIX] selection: change `MOVE_COLUMNS_ROWS` payload Task: 3603714
https://github.com/odoo/o-spreadsheet/commit/6b79208cd [FIX] Autofill: Automatic autofill based on content Task: 3592859
https://github.com/odoo/o-spreadsheet/commit/d805d512b [FIX] HeaderPositionsUIPlugin: cell wrapping for long text

closes odoo/odoo#144972

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-12-05 21:15:30 +00:00
Rémi Rahir (rar) 3813458919 [FIX] spreadsheet: Unable to copy text on safari
Same idea as https://github.com/odoo/enterprise/pull/49291, the
clipboard on safari needs to be treated asynchronously.

closes odoo/odoo#144657

Task: 3571908
X-original-commit: 011aa4a03133361b9bb6af47816f828584ee41ee
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-12-05 17:30:08 +00:00
Mathieu Duckerts-Antoine 167999c350 [FIX] web: pivot: no duplicates in read_group groupby
Since https://github.com/odoo/odoo/pull/103510, the read_group parameter "groupby" can no longer contain
implicit duplicates. For example groupby=['date', 'date:month] doesn't work
anymore. Here we remove all duplicates from groupby before making a read_group.

closes odoo/odoo#143792

Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2023-12-04 15:10:29 +00:00
Odoo Translation Bot 2ac98dc2e5 [I18N] Update translation terms from Transifex 2023-12-03 00:18:54 +01:00
Rémi Rahir (rar) daa1b46608 [FIX] spreadsheet: reset selected datasource upon its deletion
closes odoo/odoo#140355

Task: 3551443
X-original-commit: e68f9fd312f0eeac45530920974c417db2098cb0
Related: odoo/enterprise#49866
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-11-28 21:20:46 +00:00
Odoo Translation Bot 3ffba892de [I18N] Update translation terms from Transifex 2023-11-26 00:20:02 +01:00
Lucas Lefèvre (lul) d27d9a4757 [FIX] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/7346d0af9 [REL] 17.0.4
https://github.com/odoo/o-spreadsheet/commit/661e290f4 [FIX] sheet: remove zombie code
https://github.com/odoo/o-spreadsheet/commit/7362fc105 [FIX] sheet: remove rows faster
https://github.com/odoo/o-spreadsheet/commit/dcaa1ab0c [FIX] tokenizer: faster current char lookup
https://github.com/odoo/o-spreadsheet/commit/0448b26f5 [FIX] tokenize: replace special chars faster
https://github.com/odoo/o-spreadsheet/commit/88a57c6be [FIX] icons: use correct comment syntax in xml files
https://github.com/odoo/o-spreadsheet/commit/cf8194df2 [FIX] clipboard: fix array formula copy
https://github.com/odoo/o-spreadsheet/commit/ca24d7e8c [FIX] evaluation: faster range matrix
https://github.com/odoo/o-spreadsheet/commit/a13ff80b3 [FIX] clipboard: traceback on paste from copy after deleting that sheet
https://github.com/odoo/o-spreadsheet/commit/eaa0dca12 [FIX] evaluation: cache range references values Task: 3588401
https://github.com/odoo/o-spreadsheet/commit/cdeb716c3 [REF] evaluation: group compilation parameters
https://github.com/odoo/o-spreadsheet/commit/943a7e7f8 [FIX] lookup: cache string normalization Task: 3588401
https://github.com/odoo/o-spreadsheet/commit/0330db03c [FIX] cells,borders: cancel useless commands Task: 3603259
https://github.com/odoo/o-spreadsheet/commit/38d77fe89 [FIX] cells: faster getter to get cell Task: 3588401
https://github.com/odoo/o-spreadsheet/commit/15bdafc80 [FIX] model: don't flatten command result

closes odoo/odoo#143587

Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2023-11-25 05:41:44 +00:00
Adrien Minne (adrm) d5f8d960c1 [FIX] spreadsheet: fix side panel input arrow
The arrow in the inputs of the side panel was stuck to the side of the input,
without any padding.

closes odoo/odoo#143191

Task: 3376873
X-original-commit: 97c2f7832669ce01f70ee0b5474328382b3f8c2f
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Adrien Minne (adrm) <adrm@odoo.com>
2023-11-23 01:20:08 +00:00
Khushi 68c3696cca [FIX] spreadsheet: modify includeTotal behaviour in ODOO.PIVOT.TABLE
This commit modifies the functioning of `ODOO.PIVOT.TABLE` formula when the
boolean `includeTotal` is set to 'false'.

Earlier, total values of both row and column were not displayed in this case.
But now, if a groupby is not applied on any of the two dimensions, it displays
total values of the dimension on which groupby has been applied.
Otherwise the formula serves no purpose since it doesn't display any
data.

For example, one row groupby and zero column groupbys are applied on pivot:
The formula `=ODOO.PIVOT.TABLE(1,,false)` would display all cells of pivot
(including the row totals), except the last row (i.e. the column total).

Task ID : 3580623

closes odoo/odoo#140970

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-11-21 20:06:36 +00:00
Lucas Lefèvre (lul)andAdrien Minne 037e5b823b [FIX] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/8bd0fb2b4 [REL] 17.0.3
https://github.com/odoo/o-spreadsheet/commit/fe3ba2a88 [FIX] text_helper: strikethrough wrong positioning
https://github.com/odoo/o-spreadsheet/commit/742581e80 [IMP] demo: add demo data for data validation
https://github.com/odoo/o-spreadsheet/commit/0323dd37a [FIX] FiltersPlugin: removing row with data filter header Task: 3546012
https://github.com/odoo/o-spreadsheet/commit/fc2a17482 [FIX] FilterEvaluationPlugin: insert/remove rows on data filter header Task: 3546012
https://github.com/odoo/o-spreadsheet/commit/3c3bbe9a2 [MOV] tests: fix typo in test file name of context menu
https://github.com/odoo/o-spreadsheet/commit/c53528f7c [FIX] F&R: Fix css rule
https://github.com/odoo/o-spreadsheet/commit/b6fa9634f [FIX] Menus: Show Insert col/row menu when full sheet selected Task: 3450188
https://github.com/odoo/o-spreadsheet/commit/80bd3b30f [REV] Charts: Do not rely on history for the chartRuntimes Task: 3578417
https://github.com/odoo/o-spreadsheet/commit/3d6f4f954 [IMP] evaluation: improve perfs of `getCorrespondingFormulaCell` Task: 3584306
https://github.com/odoo/o-spreadsheet/commit/17ba12211 [FIX] cell: update cell tokens and dependencies Task: 3584306
https://github.com/odoo/o-spreadsheet/commit/c0cb4cf86 [FIX] find_and_replace: take array formula result into account Task: 3413999

[IMP] spreadsheet: remove useless tokenize calls

The pivot/list helpers were tokenizing the cell's content when trying
to find list/pivot formulas. But we can skip the tokenize call as we
already have the tokens in the cell's compiledFormula.

closes odoo/odoo#142323

Task: 3584306
Related: odoo/enterprise#50888
Signed-off-by: Adrien Minne (adrm) <adrm@odoo.com>
Co-authored-by: Adrien Minne <adrm@odoo.com>
2023-11-19 23:55:11 +00:00
Odoo Translation Bot f6fe982853 [I18N] Update translation terms from Transifex 2023-11-19 00:28:08 +01:00
Khushi 905d8565ad [FIX] spreadsheet: traceback while inserting chart from other model
Steps to reproduce:
- Insert a list/pivot in a blank spreadsheet from a module (say Sales).
- Apply a global filter on it.
- Insert an odoo chart in the same sheet but from a different module (eg. CRM)

This works just fine when chart is inserted from the same model because it matches
the existing filter (from the pivot/list), and directly returns that field matching
without check the field matching from charts.

However in case of different model, the issue is that when there are no charts in the
sheet, the existing code of `getOdooChartIds` retrieves the incorrect chart ids
(`getChartIds` getter returns all chart ids, including the id of chart being inserted).
This leads to a traceback as the code tries to fetch fieldMatchings for a non-existent
chart within the sheet.

This commit resolves the issue by modifying the `getOdooChartIds` method to now utilize
`this.charts` instead of `getChartIds` getter, which correctly provides the ids of
charts already present in the sheet.

Task ID: 3573402

closes odoo/odoo#140700

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-11-16 08:57:45 +00:00
Odoo Translation Bot b61c1ac0b3 [I18N] Update translation terms from Transifex 2023-11-12 00:21:23 +01:00
Louis (wil) 68b4dfc2bb [I18N] *: import translations
closes odoo/odoo#141655

Related: odoo/enterprise#50484
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-11-08 20:48:14 +00:00
Rémi Rahir (rar) 542b3b97ed [IMP] spreadsheet*: Add a print mode for spreadsheets
The current spreadsheet layout is not adapted to print the document as
the spreadsheet component is designed to only be rendered in the visible
part of the client viewport, the invisible parts of the spreadsheet are
not rendered.

This revision adds the possibility to render the whole spreadsheet when
the user wants to print the document (either via a top menu button or
with the generic shortcut Ctrl+P).

closes odoo/odoo#140281

Task: 3575484
Related: odoo/enterprise#49829
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-11-07 17:57:11 +00:00
Louis (wil) af5a5f4986 [I18N] *: export source terms
closes odoo/odoo#141127

Related: odoo/enterprise#50247
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-11-06 16:55:41 +00:00
Rémi Rahir (rar) 8c01a611cd [IMP] spreadsheet: cache PivotCache cells
This revision extends the caching introduced in [1] to cache the
Pivot cells of a `PivotTable` for every combination of `includeTotal`
and  `includeColumnHeaders`. the conditions for the `clickableCell` of
`ODOO.PIVOT.TABLE` cells fetch the pivot cells a LOT, which becomes
problematic for big pivots.

For a spreadsheet with a formulat `ODOO.PIVOT.TABLE` that spreads over
2562 (122*21) cells:

|                                  | Before  | After  |
|----------------------------------|---------|--------|
| `getPivotDomainArgsFromPosition` | 1227 ms | 124 ms |
| load spreadsheet as dashboard    | 7.97 s  | 2.4 s  |
|                                  |         |        |

[1] https://github.com/odoo/odoo/pull/138594

closes odoo/odoo#141116

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-11-06 16:55:40 +00:00
Odoo Translation Bot 5d2bc9e9b3 [I18N] Update translation terms from Transifex 2023-11-05 00:21:55 +01:00
Lucas Lefèvre (lul) c503d1895d [FIX] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/3184728ea [REL] 17.0.2
https://github.com/odoo/o-spreadsheet/commit/74e28e1c9 [FIX] evaluation: fix incorrect invalidation

closes odoo/odoo#140935

Signed-off-by: Adrien Minne (adrm) <adrm@odoo.com>
2023-11-04 06:43:11 +00:00
Rémi Rahir (rar) d11845e322 [IMP] spreadsheet: Improve ODOO.PIVOT.TABLE hook value
In order to identify an ODOO.PIVOT.TABLE formula cell, we set the
display name of the pivot as the evaluated value of the cell containing
the formula.

closes odoo/odoo#140674

Task: 3580153
Related: odoo/enterprise#50003
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-11-04 00:38:29 +00:00
Lucas Lefèvre (lul) 201445b2c2 [FIX] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/0887d5bb5 [REL] 17.0.1
https://github.com/odoo/o-spreadsheet/commit/88efb7049 [FIX] package: Export template file when publishing on npm
https://github.com/odoo/o-spreadsheet/commit/0678b7058 [FIX] SelectionInput: Unable to select range after confirm Task: 3493185
https://github.com/odoo/o-spreadsheet/commit/d8d943bb3 [IMP] history: reduce memory allocation
https://github.com/odoo/o-spreadsheet/commit/0170f5cad [IMP] range: order only if needed
https://github.com/odoo/o-spreadsheet/commit/05da23cbe [IMP] actions: don't create actions at each rending
https://github.com/odoo/o-spreadsheet/commit/1ce196dfb [IMP] viewport: find header with binary search
https://github.com/odoo/o-spreadsheet/commit/bb668d1d9 [IMP] locale: change date format with locale Task: 3575516
https://github.com/odoo/o-spreadsheet/commit/cc08fcf00 [FIX] XLSX: Exported image dimension Task: /
https://github.com/odoo/o-spreadsheet/commit/c0a34c295 [REL] 17.0
https://github.com/odoo/o-spreadsheet/commit/5080bc451 [REM] viewport: remove unused parameter
https://github.com/odoo/o-spreadsheet/commit/07999834b [REM] viewport: remove always falsy condition
https://github.com/odoo/o-spreadsheet/commit/f4583b226 [FIX] header_size: decouple added row from base row Task: 3510863
https://github.com/odoo/o-spreadsheet/commit/7be4d753f [FIX] evaluation: avoid .shift()
https://github.com/odoo/o-spreadsheet/commit/83aba22d4 [FIX] top_bar: force white background
https://github.com/odoo/o-spreadsheet/commit/f7fb70ee7 [IMP] headers: add header position UI plugin Task: 3563624
https://github.com/odoo/o-spreadsheet/commit/c58899b26 [IMP] selection: don't dispatch at `START` Task: 3563624
https://github.com/odoo/o-spreadsheet/commit/a4fe61669 [IMP] headers: add `getHeaderSize` getter Task: 3563624
https://github.com/odoo/o-spreadsheet/commit/2dd53005c [IMP] translations: Do not translate template strings Task: /
https://github.com/odoo/o-spreadsheet/commit/18a08b1de [REL] 16.5.0-alpha.13
https://github.com/odoo/o-spreadsheet/commit/bb48a4eda [FIX] border_editor, top_bar: dark-mode adaptations Task: 3201038
https://github.com/odoo/o-spreadsheet/commit/5176308f4 [FIX] evaluation: fix evaluateFormula getter typing
https://github.com/odoo/o-spreadsheet/commit/612f02623 [IMP] Functions: add SORT, SORTN and RANK Task: 3472980
https://github.com/odoo/o-spreadsheet/commit/ca56b0809 [FIX] Highlight: prevent default `mousedown` behaviour Task: /
https://github.com/odoo/o-spreadsheet/commit/10a42a475 [REF] ClientTag: use t-if instead of opacity Task: /
https://github.com/odoo/o-spreadsheet/commit/43692a6e5 [REF] tests: dispatch both input and change events
https://github.com/odoo/o-spreadsheet/commit/8dae28aed [REF] chart_test: improve test speed/readability
https://github.com/odoo/o-spreadsheet/commit/0f3b35682 [FIX] collaborative: display other users name

closes odoo/odoo#140649

Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2023-11-03 10:46:07 +00:00
Lucas Lefèvre (lul) fb8c608e3d [IMP] spreadsheet: restrict text filter to range
Purpose
=======

This task answers two use cases making text filters more useful and easier to
use:

Always using the same few values
--------------------------------
The text filter allows to type any arbitrary text. However, some users will
always use the same few values. They will always again and again type the
same values, every time they want to set or change the filter value. That's
cumbersome. There's also a risk of making a typo while typing.

Parametric dashboards
---------------------
Some dashboards are built to be parametric (our business analysts do that a
lot). e.g. They put the measure field in a cell, then reference that cell in
PIVOT functions. If you want to have the same dashboard, but with another
measure: just update the cell with the new measure and that's it.

In read-only mode however, you can't update that cell :(

But you can mimic a variable parameter with a text filter. Create the text
filter, then get the filter value in a cell with the function
=ODOO.FILTER.VALUE("..."). Now you can update the cell value by setting
different values in the filter input.

However, you need to know exactly what value would be correct/valid for the
parameter. Typing any arbitrary text would lead to errors or unexpected
results. Business analysts can know that kind of technical stuff, but
lambda users don't. The solution is currently to duplicate the dashboard and
change the cell value with the exact parameter value you want.

Specification
=============
In the filter config side panel, allow the user to restrict the set of
possible values to values in a range of cells in the spreadsheet. Let's say
A1, A2, A3 contains Paris, Brussels, Berlin. If the user chooses A1:A3 in the
side panel, the text filter input is no longer a free text input, but becomes
a select with the 3 cities.

If a value from the range is selected, then the cell with this value is
changed to another value: keep the previous selected value selected.

display the values with their cell format but use their raw format for the
logic behind it (using the value as a cell value from ODOO.FILTER.VALUE)

closes odoo/odoo#139191

Task: 3554062
Related: odoo/enterprise#49204
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-11-02 15:10:52 +00:00
Lucas Lefèvre (lul) b3369c42bb [FIX] spreadsheet: test invalid pivot expression detection
See https://github.com/odoo/odoo/pull/139871/files#r1377199846

closes odoo/odoo#140418

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-10-31 10:33:57 +00:00
Adrien Minne (adrm) eba33ff004 [IMP] spreadsheet: change global filter icon
Change the global filter icon from the `fa-search` to something more
filter-like.

Also use the same icon in shared dashboard.

closes odoo/odoo#139164

Task: 3560817
Related: odoo/enterprise#49166
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-10-30 13:55:56 +00:00
Odoo Translation Bot 6739c317d1 [I18N] Update translation terms from Transifex 2023-10-29 00:07:17 +02:00
Louis (wil) 3f6f949fa5 [I18N] export sources
closes odoo/odoo#140002

Related: odoo/enterprise#49687
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-10-27 08:36:16 +00:00
anhe-odoo 33e00d1c13 [IMP] spreadsheet: allow to download a shared dashboard
Task Description

The aim of this PR is to be able to download a shared dashboard.
This is done by adding a "Download" button on the shared dashboard
(next to the frozen date), which allow to export the dashboard as
an .xlsx file.

Related Task

closes odoo/odoo#139426

Task: 3512907
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-10-26 08:45:56 +00:00
Pierre Paridans 963842381e [IMP] web,*: replace ClipboardJS with Web API and homebrew polyfill
*: auth_totp_portal, mrp_subcontracting, project, survey, web_editor,
   website, website_links, website_sale_loyalty, website_slides, test_lint,
   spreadsheet

Implements missing `clipboard.write()` and `ClipboardItem` ; targets
only Firefox (which partially implements Clipboard API, features hidden
behind a preference flag).

Supported browsers: Chromium 76+, Safari 13.1+, Firefox 63+, Safari iOS
13.4+.

This allows to replace ClipboardJS by the native Clipboard Web API.

Reference:
https://caniuse.com/?search=clipboard
https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API
https://w3c.github.io/clipboard-apis/

task-3439226

closes odoo/odoo#134881

Related: odoo/enterprise#47154
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-10-26 07:22:54 +00:00
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
Adrien Minne (adrm) 61d54527fc [IMP] spreadsheet: improve wrong linked menu handling
If a chart was linked to an odoo menu, but the odoo menu didn't have
an action, the user would get a traceback when clicking on the chart.

This commit:
- Improves dashboard validation. Now we test that the menu is linked
to an action, in addition to testing that the menu exists
- Send a "danger" notification when the user clicks on a chart with
a menu without an action linked to it, rather than a traceback

closes odoo/odoo#139324

Task: 3563450
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-10-25 11:37:33 +00:00
Pierre Pulinckx (pipu) 1d6f2da14a [REF] *: add chartjs assets bundle
In the goal of simplify assets loading, in this commit we create a new
assets bundle for chartJS and its luxon adapter.
With this, we can now use loadBundle instead of load these two libraries
with loadJS.

task-3562357

closes odoo/odoo#139544

Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-10-24 15:23:30 +00:00
Rémi Rahir (rar) b2167e0a23 [IMP] spreadsheet: Add class props to SpreadsheetShareButton
Make the share button style parametric as we use it in different
contexts.

closes odoo/odoo#139302

Task: 3329419
Related: odoo/enterprise#49302
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-10-24 13:55:13 +00:00
Lucas Lefèvre (lul) 99d93872a3 [FIX] spreadsheet[_dashboard]: avoid flicker
In the dashboard action, when switching from dashboard to dashboard, the
size of the control panel flickers. That's because the Share button is not
displays while the dashboard is loading and it takes some place, making
the control panel taller when it's displayed.

With this commit, the Share button is always displayed (disabled when the model
isn't loaded). In addition to fix the size flickering issue, it's also less
things appearing/disappearing from the UI (less sapin de Noël)

closes odoo/odoo#138816

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-10-24 12:38:27 +00:00
Alexis Lacroix c0bc8d9ea9 [IMP] spreadsheet: add date from_to global filter
Adds in date type global filters a new category
"From / To" allowing to define a domain between
two dates.

closes odoo/odoo#138507

Task: 3516362
Related: odoo/enterprise#48855
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-10-24 12:38:25 +00:00
Adrien Minne (adrm) 783a1dfeba [FIX] spreadsheet: don't use constant uid in tests
Most tests that need the user id simply use `uid=7`, which will fail
if the default user id ever change in the tests. This commit replaces
it by `sessuin.user_context.uid`.

closes odoo/odoo#138733

Task: 3553122
Related: odoo/enterprise#48965
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-10-23 20:07:26 +00:00
Adrien Minne (adrm) 0d9e4804b1 [FIX] spreadsheet: re-insert pivot w/ contextual domain
Re-inserting a pivot that had a contextual domain would fail because
the data source would try to fetch the data with the domain as a string,
but the domain should be a list at this point.

Task: 3553122
Part-of: odoo/odoo#138733
2023-10-23 20:07:26 +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