Commit Graph
165 Commits
Author SHA1 Message Date
Pierre Pulinckx (pipu) 504b4a7178 [REF] *:Replace moment usages with luxon
luxon and moment are both used in the solution, but
these two libraries facilitate the manipulation of dates.
It was decided to replace all uses of moment with
luxon so we can then remove moment.js from the
code and lighten the assets.

task-3391739

closes odoo/odoo#127406

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-13 14:47:41 +02:00
Lucas Lefèvre 1a71f8cff7 [REF] spreadsheet: remove useless match attribute
`isMatched` is always true, so it have little/no purpose and we can
remove this attribute.

closes odoo/odoo#127279

Signed-off-by: Adrien Minne (adrm) <adrm@odoo.com>
2023-07-05 17:34:10 +02:00
Lucas Lefèvre dffaf2b78f [REF] spreadsheet: find odoo functions with iterator helper
Part-of: odoo/odoo#127279
2023-07-05 17:34:10 +02:00
Lucas Lefèvre 647c6663f9 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/b04cf78c2 [REL] 16.4.0-alpha.7
https://github.com/odoo/o-spreadsheet/commit/37e6ebed5 [IMP] helpers: add ast iteration helper Task: 3360232
https://github.com/odoo/o-spreadsheet/commit/c44431ffa [IMP] TopBarComposer: allow selection in readonly mode Task: 3378521
https://github.com/odoo/o-spreadsheet/commit/44063ddaf [ADD] functions: add TRUE and FALSE boolean functions Task: 3360232
https://github.com/odoo/o-spreadsheet/commit/62a93f842 [REF] tokenizer: decouple tokenizer from functions Task: 3360232
https://github.com/odoo/o-spreadsheet/commit/153a50d23 [IMP] xlsx: import images

Part-of: odoo/odoo#127279
2023-07-05 17:34:09 +02:00
Lucas Lefèvre (lul) 1f704ecdb1 [IMP] spreadsheet: add Odoo function category
This commit adds an "Odoo" functions category in the top bar menu
"Insert > Function".

It allows to easily discover existing functions.

closes odoo/odoo#127372

Signed-off-by: Alexis Lacroix (laa) <laa@odoo.com>
2023-07-05 13:09:48 +02:00
Lucas Lefèvre e136b43e9b [FIX] spreadsheet: use localized week start
Steps to reproduce:
Go to CRM pivot view, group create_date by week, insert into spreadsheet.
=> week numbers are offset by one (W23 instead of W24)

Since 3a177c448, `read_group` returns week aggregates according to the
user's language first day (e.g Sunday for en_US, Monday for fr_FR).

Before the commit, it was always Monday (ISO week start).
This commit changes the moment formats from "W" (Week of Year (ISO)) to
"w" which is the localized week of year*.

Note there can still be some inconsistencies if the browser language is
different than the user's language. This hasn't changed and is a regular
known issue.

* https://momentjscom.readthedocs.io/en/latest/moment/04-displaying/01-format/

opw-3372581

closes odoo/odoo#127089

X-original-commit: c5738479dc1c1879a9ac0169e1ec87eb5098c525
Related: odoo/enterprise#43516
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-07-04 07:55:08 +02:00
Mathieu Duckerts-Antoine b72791f05b [REF] web: remove unused props in TagsList
Some props like className were declared as optional in TagsList while
they are not used by the component. We remove them from the props
declaration.

Part-of: odoo/odoo#126350
2023-07-03 16:58:55 +02:00
Elisabeth Dickinson d70da05100 [FIX] spreadsheet_dashboard: fix lost margins on dropdowns
During the Milk revamp, the dropdown items in the Dashboard's header
lost their horizontal margins. These have been put back by setting a gap
property to the parent.
When in the dashboard view under Sales > Product, the dropdowns had an
awkward spacing between them despite the fix. Another fix was to set
`w-100` to the `.o_field_tags` element. And finally a `.gap-1` is also
added to the latter to give its children some space when multiple tags
are selected.

It was noticed that some CSS, specifically the `.o-filter-value` class,
was not targeting anything. This has been fixed by moving the selector
into its correct parent element.

task-3326566
part of task-3326263

closes odoo/odoo#127010

X-original-commit: bd456bc89f896de6b3d8c040706dc02ab3799e6e
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-07-01 09:52:59 +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
Rémy Voet (ryv) 3c62ca1eb9 [REM] core: remove name_get API
Rationale
=========

Since v8, the `display_name` field is present on all models. By default,
`display_name` uses `name_get` which has pretty much the same purpose
(return record name used by the web client). Gradually, many (backend)
developers (and the ORM: https://github.com/odoo/odoo/commit/6da1c3ac4c036eac289597602976538e243cb939)
started using `display_name` (more convenient than
`record.name_get()[0][1]`) but it still had the `name_get` override.
It becomes more complex than necessary and poeple start to misunderstand
the two (and sometimes override both, leading to inconstiencies between
`display_name`/`name_get`).

To simplify the ORM and the API, we decided to keep only one of them,
the `display_name` field:
- It is much more convenient from a backend point of view
(`record.name_get()[0][1]` vs `record.display_name`)
- It is cached during the same transaction (and invalidated if
its dependencies change)
- It can be overridden like any other compute field (override
`_compute_display_name` with any extra dependencies)
- `name_get` is replaced by `read(['display_name'])`
(API perceptive), which can actually be more efficient
(if `display_name`'s depends are correct, the ORM will only fetch the
fields it needs instead of every prefetchable field)

Changes
=======

- Deprecates `name_get` for the v17 and based the method on
`display_name` (the opposite of before)
- Converts all usage of `name_get`
- Overrides of `name_get` are now overrides of `_compute_display_name`
- For `res.partner`, rename the field store `display_name` into
`complete_name` because `display_name` context-dependent and it makes
no sense to have a compute store that is context-dependent.
- Previously, it was possible to return multiple names for the same
record with `name_get`, but it was tricky and most of the usage of
this `name_get` didn't take this into account. The only example of
this is the `name_get` of `product.product`
(now use `", ".join(<names>)`).

Part-of: odoo/odoo#122085
2023-06-28 17:41:19 +02:00
Rmi Rahir (rar) 7b5f1df3d1 [FIX] spreadsheet: Fix bad serverData in js tests
The menus added in the server data which are used in mockServer did not
reflect a realistic menu configuration. This was brought to light when
trying to fix the addition of links to ir.ui.menu inside a spreadsheet.
See task 2821480

Related ENT pr: https://github.com/odoo/enterprise/pull/42885

closes odoo/odoo#126497

X-original-commit: 128475e8c29f8493b01710342179a5c468897c61
Related: odoo/enterprise#43209
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-06-27 13:44:25 +02:00
Lucas Lefèvre (lul) fa5bce0f8f [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/3b0b6f16 [REL] 16.4.0-alpha.5
https://github.com/odoo/o-spreadsheet/commit/b90a1620 [FIX] Filters: fix filter id on sheet duplication Task: 3384840
https://github.com/odoo/o-spreadsheet/commit/d309d391 [REF] ot_tests: use TEST_COMMANDS for ot test files Task: 3383455
https://github.com/odoo/o-spreadsheet/commit/ed0141fd [FIX] sheet: duplicate sheet name problem when renaming
https://github.com/odoo/o-spreadsheet/commit/869050fc [FIX]  registries: inline non-shared registry actions
https://github.com/odoo/o-spreadsheet/commit/2c434b6e [IMP] functions: update XLOOKUP to return array Task: 3184778
https://github.com/odoo/o-spreadsheet/commit/214213eb [IMP] functions: add a bunch or array functions Task: 3184778
https://github.com/odoo/o-spreadsheet/commit/d74d48ae [FIX] autocomplete dropdown: mock functions for snapshot
https://github.com/odoo/o-spreadsheet/commit/3401c874 [FIX] toolbar: missing hover effect on font size editor Task: 3360143
https://github.com/odoo/o-spreadsheet/commit/f60f2ffe [IMP] composer: double click on range will select the whole range
https://github.com/odoo/o-spreadsheet/commit/187d4d2f [FIX] rendering: cache text width
https://github.com/odoo/o-spreadsheet/commit/c1f7d666 [FIX] clipboard: paste - onlyformat behaviour
https://github.com/odoo/o-spreadsheet/commit/9c0b8ff4 [FIX] clipboard: fix behaviour when selection is updated before the paste
https://github.com/odoo/o-spreadsheet/commit/534fc20a [FIX] Composer: Allow to unselect fully selected composer content
https://github.com/odoo/o-spreadsheet/commit/8e647aec [FIX] xlsx: space loss in XML when exporting hyperlink
https://github.com/odoo/o-spreadsheet/commit/8023bd0b [IMP] filter: select/clear all pre-filtered data
https://github.com/odoo/o-spreadsheet/commit/c4c1b165 [FIX] chart panel: title state in chart design panel
https://github.com/odoo/o-spreadsheet/commit/8ba67af4 [FIX] selection_input: add missing test
https://github.com/odoo/o-spreadsheet/commit/84d4eb47 [IMP] dependencies: update owl to 2.1.3
https://github.com/odoo/o-spreadsheet/commit/bb9192d9 [IMP] dependencies: update Typescript to 4.9
https://github.com/odoo/o-spreadsheet/commit/383ab479 [FIX] functions: translate argument description
https://github.com/odoo/o-spreadsheet/commit/4815a8b6 [FIX] filters: export xlsx of empty cells

closes odoo/odoo#126436

Related: odoo/enterprise#43200
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-06-27 00:31:30 +02:00
Julien Mougenot 23e0ac2a1a [IMP] web: Support pointer events in draggable
This commit:

- adds a "delay" parameter to the `draggable_hook_builder`, waiting for
that delay on pointer down events before triggering the drag sequence
(making it possible to use "long mousedown" events);

- changes the event detection in `draggable_hook_builder` to listen
for pointer events instead of mouse events, effectively supporting the
drag and drop feature on touch devices;

- adapts the test helpers (with some refactors to `triggerEvent` and
other utility functions) to make them use pointer events instead for
drags and drops;

- adapts the tour utils to use a tone-downed version of the refactored
test utils `dragAndDrop` function;

- also changes events in list view which does not yet uses the draggable
hook, but should still work with the same helpers in tests.

Part-of: odoo/odoo#116005
2023-06-22 15:40:43 +02:00
Lucas Lefèvre 23ae2b2886 [FIX] spreadsheet: force light theme
Followup of #123320

Some things changed in saas-16.2

closes odoo/odoo#125706

X-original-commit: 82f79027deb8caa1e25e0ae8389f513db98cd6cd
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-06-20 09:11:06 +02:00
anhe-odoo f47f1278f3 [IMP] spreadsheet: autofill from pivot/list propagate the format
Task Description

When autofilling a pivot/list cell from another pivot/list cell,
the format of the target wasn't overwritten. This can lead to some
strange behaviour where the user set the desired format to a cell
then autofill the remaning cell of the column/row to apply the same
format once and nothing happen.
We now propagate the set format with the pivot/list autofill, but
we still don't propagate the style and border definition, as it
could break the currently defined pivot/list style.

Related Task
task-3252442

closes odoo/odoo#124984

X-original-commit: 8678b716a9fe2b38e9ed5d399d89df2343ee239c
Related: odoo/enterprise#42542
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Hendrickx Anthony (anhe) <anhe@odoo.com>
2023-06-15 00:12:47 +02:00
Soumya M 54e40d100e [REM] spreadsheet: removing ads from template
This commit removes 'Try Odoo' ad from the spreadsheet template which is
visible when spreadsheet is shared with public.

Task-3347908

closes odoo/odoo#124779

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-06-13 12:49:55 +02:00
Lucas Lefèvre 66e875b031 [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/251a52e98 [REL] 16.4.0-alpha.4
https://github.com/odoo/o-spreadsheet/commit/73409d7eb [FIX] formatting: round floats with leading zeroes Task: 3327899
https://github.com/odoo/o-spreadsheet/commit/b98383f20 [FIX] misc: type of isCloneable interface
https://github.com/odoo/o-spreadsheet/commit/08492ae06 [IMP] ColorPicker: Extend the custom color selection Task: 3272474
https://github.com/odoo/o-spreadsheet/commit/891d82d9d [REF] xlsx: remove useless exported check
tqhttps://github.com/odoo/o-spreadsheet/commit/6f0ca54f1 [IMP] plugins: remove activeSheet from CoreViews Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/2ac86cdaa [IMP] cf evaluation: make cf evaluation lazy Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/6957579fa [FIX] style: fix dependencies of getCellComputedStyle Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/f035db27d [IMP] plugins: add Immutable type Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/735b3ced4 [IMP] plugins: add history to some CoreView plugins Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/f08900e7c [IMP] plugin: make CoreView plugins more core Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/5fbde7277 [FIX] ColorPicker: fix `+` sign position
https://github.com/odoo/o-spreadsheet/commit/565740d89 [IMP] doc: connecting to external API
https://github.com/odoo/o-spreadsheet/commit/2a92e2dfb [IMP] sheet_actions: removed french spacing
https://github.com/odoo/o-spreadsheet/commit/fbf076535 [IMP] charts: dynamic errors in side panel
https://github.com/odoo/o-spreadsheet/commit/5a7435320 [FIX] demoData: fix XSLX demo data
https://github.com/odoo/o-spreadsheet/commit/8b9c9887c [FIX] clipboard: Do not update viewport on `paste`
https://github.com/odoo/o-spreadsheet/commit/1c4aa507f [REF] Selection: Let caller control selection visibilty Task: 3348042
https://github.com/odoo/o-spreadsheet/commit/c7b0d544f [IMP] config: enables type checking for binded functions

closes odoo/odoo#124697

Related: odoo/enterprise#42444
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-06-13 12:49:33 +02:00
Adrien Minne (adrm) 2ef25b8372 [FIX] spreadsheet: download excel with filtered values
Open a spreadsheet, add a data filter, filter some values,
File > Download
=> the filtered values are not exported.

Previously, we gave the exported data to the action_download_spreadsheet
action, and we created a new model based on the data. This was a problem
for data that was only exported for the xlsx in UI plugins, because this
wasn't in the exported data.

Fixed by giving the xlsx data to the action_download_spreadsheet action instead
of the data.

Odoo task 3231170

closes odoo/odoo#124617

X-original-commit: 8a7e2ecf60993c6862c8980b70e847c0e5aa2a50
Related: odoo/enterprise#42355
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Minne Adrien (adrm) <adrm@odoo.com>
2023-06-12 15:26:50 +02:00
Mathieu Duckerts-AntoineandLucas Lefevre dacb31aa85 [REF] spreadsheet: use name service in DisplayNameRepository
We make the class DisplayNameRepository use the name service instead of
BatchEndpoint. This makes the code simpler and allow to avoid a lot of
rpcs (in some occasions) when fetching display names.

closes odoo/odoo#124090

Related: odoo/enterprise#42124
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Lucas Lefevre <lul@odoo.com>
2023-06-09 17:00:48 +02:00
Mathieu Duckerts-AntoineandLucas Lefevre c41fb94946 [REF] spreadsheet: simplify DisplayNameRepository
The method getDisplayNameAsync being no more called, DisplayNameRepository
has no need to manage deferreds. We simplify it.

Part-of: odoo/odoo#124090
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Lucas Lefevre <lul@odoo.com>
2023-06-09 17:00:48 +02:00
Rmi Rahir (rar) d0f3341f8d [FIX] spreadsheet: move test to dedicated module
The test added in #120818 was relying on a model that does not depend on
module `spreadsheet, rather the opposite. This information was probably
lost during the forwardport process.

Since the fix concerns `spreadsheet.mixin` and not just
`spreadsheet.dashboard`, it makes sense to test it globally, in a
dedicated test module.

Fixes runbot build errors 20966 and 20968

closes odoo/odoo#123947

X-original-commit: 7205e3b26eb3de3f53d6984cd07ec3e4b3fbcfdd
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-06-07 21:34:40 +02:00
Rmi Rahir (rar) 8d551f9d32 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/059d66a1 [REL] 16.4.0-alpha.3
https://github.com/odoo/o-spreadsheet/commit/d39aaaf9 [IMP] highlight: support unbounded zone
https://github.com/odoo/o-spreadsheet/commit/98c8b592 [FIX] conditional_formatting: fix cf type checkboxes
https://github.com/odoo/o-spreadsheet/commit/b3848ec7 [FIX] XLSX: open exported .xlsx file containing images in Excel
https://github.com/odoo/o-spreadsheet/commit/a2a11450 [REF] tests: Use minimal setup for composer child components
https://github.com/odoo/o-spreadsheet/commit/dcb61744 [IMP] composer/CEH: Simplify composer flow
https://github.com/odoo/o-spreadsheet/commit/cf61a5f5 [IMP] selection: selecting row/col now add full unbounded range
https://github.com/odoo/o-spreadsheet/commit/98d40e17 [IMP] range: Fix getSelectionRangeString getter
https://github.com/odoo/o-spreadsheet/commit/88ab901f [IMP] tests: remove useless await nextTick() Task: 3344230
https://github.com/odoo/o-spreadsheet/commit/8f95190c [IMP] tests: test currency side panel in standalone Task: 3344230
https://github.com/odoo/o-spreadsheet/commit/61a2fb49 [IMP] tests: test CF side panel in standalone Task: 3344230
https://github.com/odoo/o-spreadsheet/commit/386f21cb [FIX] menu test: correctly await paste action
https://github.com/odoo/o-spreadsheet/commit/2c3fed33 [FIX] Chart Pannel: fixes updateChart process Task: 3323875

closes odoo/odoo#123462

Related: odoo/enterprise#41900
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-06-03 10:36:00 +02:00
Lucas Lefèvre 7415f9bbbd [FIX] spreadsheet: force light theme
Currenlyt, when using dark theme, spreadsheet is a mess. It's mostly
light theme, with some dark theme elements (mostly coming from odoo
components). There's even inputs where the text is white on a white
background.

o-spreadsheet code isn't prepared to handle dark theme. At all.
There are hardcoded colors everywhere.

Until we have a proper way to handle dark theme (use overridable scss
variables, rely on bootstrap), we force light theme for all elements
inside o-spreadsheet, including odoo components.

The css rules aren't pretty, but at least the spreadsheet is usable.

opw-3329765

closes odoo/odoo#123359

X-original-commit: 37a5f6a5b4b8ecbacf7a8ce4be822c6f348eb5da
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-06-01 22:12:18 +02:00
Rmi Rahir (rar) 86eb916bf2 [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/82328ad7 [REL] 16.4.0-alpha.2
https://github.com/odoo/o-spreadsheet/commit/fc9f6263 [FIX] index.ts: export `invalidateXCommand` sets
https://github.com/odoo/o-spreadsheet/commit/dca78e38 [IMP] Charts: improve side-pannel clarity
https://github.com/odoo/o-spreadsheet/commit/60e55d6c [REF] core: remove range plugin attribute
https://github.com/odoo/o-spreadsheet/commit/564c094f [REL] 16.4.0-alpha.1
https://github.com/odoo/o-spreadsheet/commit/d01251d0 [IMP] evaluation: lazy build dependency graph
https://github.com/odoo/o-spreadsheet/commit/0a6a786e [IMP] evaluation: introduce array formulas
https://github.com/odoo/o-spreadsheet/commit/54eea364 [MOV] evaluation: move file in its own folder
https://github.com/odoo/o-spreadsheet/commit/c11a642d [IMP] icons: add unfreeze icon
https://github.com/odoo/o-spreadsheet/commit/3632c629 [FIX] viewport: warning message on resized viewport size
https://github.com/odoo/o-spreadsheet/commit/3169b5c9 [REF] cells: use class instead of closure
https://github.com/odoo/o-spreadsheet/commit/0d6a3904 [FIX] ColorPicker: Fix style issue
https://github.com/odoo/o-spreadsheet/commit/6a12501a [FIX] SheetUIPlugin: set column height for multi line content
https://github.com/odoo/o-spreadsheet/commit/fffba67c [FIX] ColorPicker: modified add custom color icon Task: 3258627
https://github.com/odoo/o-spreadsheet/commit/2d158b55 [FIX] ContentEditableHelper: do not throw on missing node
https://github.com/odoo/o-spreadsheet/commit/40b37030 [IMP] components: use a hook to register/clean up event listeners
https://github.com/odoo/o-spreadsheet/commit/3a3aab7b [REL] 16.4.0.alpha
https://github.com/odoo/o-spreadsheet/commit/d70dcebe [FIX] ChartFigure: chart/image menu options in readonly mode Task: 3284659
https://github.com/odoo/o-spreadsheet/commit/fcc0d723 [IMP] commands: introduce reserved keywords Task: 3276541
https://github.com/odoo/o-spreadsheet/commit/da9f553e [IMP] commands: generic check for position Task: 3276541
https://github.com/odoo/o-spreadsheet/commit/930ac3a0 [IMP] model: core allowDispatch for local commands Task: 3276541
https://github.com/odoo/o-spreadsheet/commit/9f067cfe [FIX] Topbar: fix data menu items order
https://github.com/odoo/o-spreadsheet/commit/2ce92d3c [FIX] TopBar: fix icon's CSS
https://github.com/odoo/o-spreadsheet/commit/2be1518c [IMP] tests: add helper triggerTouchEvent Task: 3302326
https://github.com/odoo/o-spreadsheet/commit/e91b2b89 [IMP] tests: use keyUp/keyDown helper everywhere Task: 3302326
https://github.com/odoo/o-spreadsheet/commit/d63c2be2 [IMP] tests: add a triggerWheelEvent helper Task: 3302326

closes odoo/odoo#122677

Related: odoo/enterprise#41587
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-05-26 18:41:35 +02:00
Rmi Rahir (rar) 1259e60877 [FIX] spreadsheet: raise error for json fields in lists
The json fields are not supported in lists at the moment because they
require additional RPC to fetch the display value as long as its
formatting.

closes odoo/odoo#122074

Task: 3324679
X-original-commit: 9e6d598e6a96434c68634149ecf1acf3e714ca03
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-05-23 16:32:19 +02:00
FrancoisGe ddf67f83be [FIX] *: tests: utility to mock RPCError
In this commit we add the makeServerError utility which allows you
to easily create a valid RPCError in the tests.

We have added this utility to prevent the use of invalid or incomplete
errors. We will give default values for all the parameters needed for
a valid RPCError.

For example, in some tests, we only check the presence of an error
dialog and not the expected one. So there was a set of tests that were
green because the failure was in the RPCError handling. So we had an
error dialog but it was not the right one. In general, the crash occurred
because the RPCError contained no data.

closes odoo/odoo#121932

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-05-23 16:32:04 +02:00
Martin Trigaux 077bbd0b0b [I18N] *: export master source terms
closes odoo/odoo#121563

Related: odoo/enterprise#41140
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-17 10:34:00 +02:00
Chenyun Yang 085fd873d6 [IMP] spreadsheet[_dashboard]: delete relation filter values using backspace key
This commit implements the functionality of using backspace key to
delete values in relation filter.

task 3324738

closes odoo/odoo#121513

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-05-16 18:08:07 +02:00
Lucas Lefèvre 96669c74f8 [IMP] spreadsheet: share spreadsheet
This commit allows to share spreadsheets to other users (public, portal or
internal without the required access rights)

See Enterprise commit. This commit prepares the ground to sharing
`documents.document` spreadsheets.
(I expect dashboard spreadsheet sharing in the near future which will
use the same generic code)

The challenges of sharing odoo spreadsheets
-------------------------------------------

Odoo spreadsheets can have any data from the database.
ODOO.PIVOT and ODOO.LIST functions specifically can target *any model*
and *any field*.
The values are dynamically loaded with RPC calls when the
spreadsheet is open. Normal access rights apply to load this kind of
"embeded" data.

A user can open a spreadsheet if he can read the `documents.document` record,
but odoo specific functions might result in errors if the user doesn't have
the access rights on the underlying model.

That's obviously not what we want when sharing a spreadsheet to an external
person. We want this person to see the values and not a spreadsheet full
of errors.

Giving access to external user?
---------------------------------

Users must have a very clear understanding what they are "leaking" when
they share a spreadsheet. Sharing a spreadsheet should not open any door
the user wouldn't think of or wouldn't understand.

The best way is to be very strict with the data we are sharing.
That means: only the specific models, specific fields and specific records
visible in the spreadsheet by the user who is sharing (different users can
see different values for the same spreadsheet, depending on their access rights).

We also want to consider the following scenario:
Alice is a newcomer (with very limited access rights) and she shares a
spreadsheet to a customer. A few years later, she is manager and has a
lot more access rights (groups, ir.rules, etc.).
The forgotten spreadsheet shared years ago should not leak more data because
Alice now has access to all company data.

Specification
=============

With all those challenges in mind, here is a first approach of shared
spreadsheet:

Readonly freezed spreadsheet for external users
-----------------------------------------------

When sharing a spreadsheet, we actually copy and freeze the spreadsheet at that
time. Odoo formulas are replaced with their value. This is the easiest and safest
way to deal with access rights to other models: there's no access to other
models at all ^^
The spreadsheet is displayed in readonly since it would only be editing a copy.
If the external person wants data to be updated, he can ask a new sharing link.

Read/Write for internal users
-----------------------------

The situation for internal users is different. We can rely on their actual access
rights.
When an internal user opens a spreadsheet sharing link, he is redirected to the
regular spreadsheet client action. A token is used to read/write the
`documents.document` record (and other linked models such as `spreadsheet.revision`),
but the data for pivots, lists, etc. is loaded with the user's own access rights.
If the user doesn't have the rights to read a model or field, the function results in
an error and that's the expected behavior.
This sharing strategy is perfectly fine for all spreadsheets that doesn't contain
any odoo data (think of all the Google Sheets we receive internally by email to
register to an event or any other stuff).

Future work
-----------
From a functional point of view, the spec is far from perfect.
Users would probably expect the data to "update" itself (not freezed).
People will want write access for external users as well.
Given the complexity of getting it right (from a tecnical, security and functional POV),
this is left for a later work

closes odoo/odoo#114040

Task: 3045808
Related: odoo/enterprise#37687
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-05-15 13:58:59 +02:00
Lucas Lefèvreandanhe-odoo 65d2bb7618 [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/afee7d57 [REL] 16.3.0-alpha.8
https://github.com/odoo/o-spreadsheet/commit/3f5b6c41 [FIX] topbar: menu items are now sorted by sequence
https://github.com/odoo/o-spreadsheet/commit/88edc8b0 [IMP] core: add timestamp to remote revisions
https://github.com/odoo/o-spreadsheet/commit/289044a3 [FIX] sidepanel: switching from on sidepanel to another should trigger onCloseSidePanel
https://github.com/odoo/o-spreadsheet/commit/5848dcb7 [FIX] composer: fix placeholder scrollbar Task: 3258920
https://github.com/odoo/o-spreadsheet/commit/378bdd89 [FIX] menu items: text overflow not working
https://github.com/odoo/o-spreadsheet/commit/c7524c5a [FIX] evaluation: compute format from empty cell
https://github.com/odoo/o-spreadsheet/commit/bca6ad64 [IMP] TopBar: Add missing icons an gray disabled icons
https://github.com/odoo/o-spreadsheet/commit/e672e183 [FIX] menus: mark automatic format as active
https://github.com/odoo/o-spreadsheet/commit/fac211e1 [FIX] SelectionInput: Fix cross symbol
https://github.com/odoo/o-spreadsheet/commit/53ce0f02 [FIX] SelectionInputPlugin: prevent multiple range in 'singleRange' input Task: 3237798
https://github.com/odoo/o-spreadsheet/commit/4aa957bd [FIX] topbar: fix borderEditor props
https://github.com/odoo/o-spreadsheet/commit/803bc1a8 [FIX] topbar: active item color
https://github.com/odoo/o-spreadsheet/commit/f6705fa4 [FIX] ContentEditableHelper: fix getCurrentSelection for Firefox Task: 3071026
https://github.com/odoo/o-spreadsheet/commit/61766daa [REF] css: move hoverable-button to spreadsheet
https://github.com/odoo/o-spreadsheet/commit/34fd1982 [IMP] borders: add support for different line styles Task: 2714331
https://github.com/odoo/o-spreadsheet/commit/5539367a [FIX] lookup: horizontal search in LOOKUP function Task: 3277145
https://github.com/odoo/o-spreadsheet/commit/a7d7c0e5 [IMP] menu: disable insertion via menus when separate cols/rows selected
https://github.com/odoo/o-spreadsheet/commit/605ae100 [REF] selective_history: name constructor arguments Task: 3301044
https://github.com/odoo/o-spreadsheet/commit/23ec1c47 [FIX] collaborative: ignore bad snapshot revision
https://github.com/odoo/o-spreadsheet/commit/ed9ee1f3 [IMP] model: dispatch initial revision to core only
https://github.com/odoo/o-spreadsheet/commit/8dbd4801 [FIX] chart: no dataset with single cell

closes odoo/odoo#121273

Related: odoo/enterprise#41001
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Co-authored-by: anhe-odoo <anhe@odoo.com>
2023-05-15 08:34:45 +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
anhe-odoo bb9bedc707 [IMP] spreadsheet: add icons for "see records" and "set as filter" action
Task Description

This PR aims to add two new icons in the context menu of the spreadsheet, for
the see records/see properties and the set as filter actions

closes odoo/odoo#120543

Related: odoo/enterprise#40713
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-05-11 18:25:14 +02:00
Adrien Minne (adrm) 0bba2cbb67 [REF] spreadsheet: move chart dataSources to UI
Before this commit, the chart's dataSources were managed by the core plugin
`OdooChartCorePlugin`. 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)

Moved the dataSources management to the UI plugin `OdooChartUIPlugin` and moved
the relevant getters inside this plugin. Changed the ids of the dataSources
to be the same as the chart's id + a prefix, to avoid having to maintain a
mapping `chartId` <=> `dataSourceId` .

closes odoo/odoo#120136

Task: 3293491
Related: odoo/enterprise#40546
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-05-05 17:06:45 +02:00
Adrien Minne (adrm) bc56084355 [REF] spreadsheet: move pivot dataSources to UI
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
2023-05-05 17:06:45 +02:00
Adrien Minne (adrm) d70da3f734 [REF] spreadsheet: move list dataSources to UI
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
2023-05-05 17:06:45 +02:00
b5794e89e1 [IMP] web: Owl DateTimePicker
This commit introduces a date picker OWL component meant to handle the
following use-cases:
- date picker
- date & time picker
- date range picker
- date & time range picker

Basically, this component is the union of the two previous third-party
libraries handling these cases: TempusDominus and DateRangePicker.

New components introduced:

* The main addition of this commit is the `DateTimePicker` itself which
handles the display and interactions of the calendar and time pickers.
> see @web/core/datetime/datetime_picker

* The picker can then be coupled to an input using the
`useDateTimePicker` hook. The purpose of this hook is to handle events
on a given input element and syncronize its value to a date picker it
will spawn in a popover.
> see @web/core/datetime/datetime_hook

* Lastly, a simple `DateTimeInput` component will render an input and
call the hook mentioned above to handle it. This component is
effectively replacing the previous DatePicker and DateTimePicker
components (note that it does not handle range values).
> see @web/core/datetime/datetime_input

Another noticeable change of this commit is the definition of daterange
fields in views:

- Previously, the arch would have to define both fields
and bind them via their options, while also adding an arrow between
inputs or other forms of connection.

- In the new implementation, only the start date field must be declared,
and a date range can be spawned by providing an `end_date_field` in its
options.

Example:
```xml
<field
    name="start_datetime"
    widget="daterange"
    options="{'end_date_field': 'end_datetime'}"
/>
```

warning Added limitations:

- this new way of declaring date ranges means that templates have been
revised to declare one field tag instead of two. This means that list
views using date ranges have lost the ability to be sorted on their end
date fields.

> Justification: the current use cases have been reviewed and it has
been decided that it was not needed to sort on the end date on the
affected list views.

> Workaround: drop the date range and declare both fields as simple date
pickers (i.e. without the end_date_field option).

- all modifiers applied to a field using a date range will be copied and
applied to the end date field. There is no way to define modifiers
specific to one field or the other.

> Justification: there was no use case where one of the two fields
needed specific modifiers.

> Workaround: same as the previous point: split the range into 2 simple
date picker fields.

Additional notes:

- the widget="daterange" is not mandatory in form views, but is required
in list views because only fields with explicit widgets will not be
rendered as simple <span> elements. The date range feature will be
available as soon as an end_date_field is specified.

- as the end date field is not explicitly defined in the view anymore,
any modifier depending on it need to have it defined as invisible
somewhere in the arch.

Task ID: 3121497

Part-of: odoo/odoo#112171
Co-authored-by: Julien Carion <juca@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Pierre Pulinckx <pipu@odoo.com>
2023-05-05 13:52:22 +02:00
Lucas Lefèvre bb6428825b [FIX] spreadsheet: support properties field in lists
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

closes odoo/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>
2023-05-03 20:08:59 +02:00
Michael (mcm) 517d3258f2 [REF] web,*: add dependencies param to odoo.define
This commit makes the `dependencies` param of
`odoo.define` mandatory. It was optional and when
omitted, a regexp read the function to find the
dependencies. We can simplify it now almost all js
modules have been converted to esm.
The transpiler already adds the param for the es
modules except if the module has an alias.

task id: 3271352

closes odoo/odoo#119145

Related: odoo/enterprise#40040
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-05-03 12:39:30 +02:00
Rémi Rahir (rar) afc9593204 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/77c8f5f1 [REL] 16.3.0-alpha.7
https://github.com/odoo/o-spreadsheet/commit/1a2c6bec [FIX] xlsx: force the use of formatAttributes
https://github.com/odoo/o-spreadsheet/commit/2ab92bfa [FIX] xlsx: export computed format
https://github.com/odoo/o-spreadsheet/commit/2e3bb1fb [FIX] xlsx: Always export value of unsupported formulas Task: 3276929
https://github.com/odoo/o-spreadsheet/commit/a5eab554 [REF] import: don't deepcopy imported data
https://github.com/odoo/o-spreadsheet/commit/f6e5d06a [REF] misc: faster zone conversion
https://github.com/odoo/o-spreadsheet/commit/31251cdb [REF] import: don't uselessly import borders
https://github.com/odoo/o-spreadsheet/commit/da4cf9e6 [REF] model: don't copy command payload twice
https://github.com/odoo/o-spreadsheet/commit/9f24f7a8 [REF] misc: avoid regex in `toCartesian`
https://github.com/odoo/o-spreadsheet/commit/2d9534a4 [REF] *: improve regex processing time
https://github.com/odoo/o-spreadsheet/commit/72bdba14 [REF] tokenizer: improve computation time
https://github.com/odoo/o-spreadsheet/commit/1b667755 [REF] helper coordinate: ref lettersToNumber
https://github.com/odoo/o-spreadsheet/commit/9aed9a49 [REF] helper date format: improve performances
https://github.com/odoo/o-spreadsheet/commit/7ad727c0 [FIX] tests: allow es2022
https://github.com/odoo/o-spreadsheet/commit/8181824f [FIX] tests: Use only faketimers in find&replace Task: 3293232
https://github.com/odoo/o-spreadsheet/commit/8fcf6068 [REL] 16.3.0-alpha.6
https://github.com/odoo/o-spreadsheet/commit/27ee983d [IMP] menus: add menu icons Task: 3145722
https://github.com/odoo/o-spreadsheet/commit/0a3e7829 [FIX] tests: Use only faketimers in autofill tests Task: 3293232
https://github.com/odoo/o-spreadsheet/commit/3f1c9b61 [FIX] chart: don't open side panel readonly when double clicking Task: 3293322
https://github.com/odoo/o-spreadsheet/commit/25f2ffc5 [IMP] tsconfig: allow es2022
https://github.com/odoo/o-spreadsheet/commit/7edf96b0 [REV] test: make test tsconfig work in vscode
https://github.com/odoo/o-spreadsheet/commit/752033ee [IMP] spreadsheet: add split to columns feature
https://github.com/odoo/o-spreadsheet/commit/82e0f699 [FIX] demo: fix topbar file menu
https://github.com/odoo/o-spreadsheet/commit/88eaeacc [FIX] components: add ActionButton props schema
https://github.com/odoo/o-spreadsheet/commit/ea19c8bc [IMP] XLSX: export text wrapping
https://github.com/odoo/o-spreadsheet/commit/9d38d1ed [IMP] XLSX: import text wrapping modes
https://github.com/odoo/o-spreadsheet/commit/691e0a47 [FIX] sheet: add allowDispatch on ADD_COLUMNS_ROWS Task: 3272589
https://github.com/odoo/o-spreadsheet/commit/db981f0b [FIX] core: Prevent dispatch of invalid command payloads Task: 3272589
https://github.com/odoo/o-spreadsheet/commit/b395a240 [IMP] tests: speed up menu items tests
https://github.com/odoo/o-spreadsheet/commit/94051d5f [IMP] XLSX: export text vertical alignment
https://github.com/odoo/o-spreadsheet/commit/bc319199 [IMP] Grid: add keyboard shortcuts
https://github.com/odoo/o-spreadsheet/commit/980448dc [FIX] menu: separator for last visible item Task: 3276939
https://github.com/odoo/o-spreadsheet/commit/d376bc5f [IMP] XLSX: import text vertical alignment Task: 3249030
https://github.com/odoo/o-spreadsheet/commit/9b650cd7 [REF] collaborative: move getters to plugins
https://github.com/odoo/o-spreadsheet/commit/07cfb8a6 [FIX] menu: dynamically update visible menu items
https://github.com/odoo/o-spreadsheet/commit/189b7db8 [FIX] header_overlay: select col when there is a single row
https://github.com/odoo/o-spreadsheet/commit/f18f137c [FIX] sheet: prevent deleting all visible columns/rows

closes odoo/odoo#120306

Related: odoo/enterprise#40604
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-05-02 19:06:57 +02:00
Lucas Lefèvre 352c28b995 [FIX] spreadsheet: evaluate new ODOO.LIST functions
Steps to reproduce:

- Open any listview (e.g Sales order listview)
- select records from the listview, go to Favorites, and click on 'Insert list in spreadsheet' option
- Once the spreadsheet is created, Reload your browser.

Current behavior:
- Spreadsheet goes to an infinite loading.

opw-3284058

closes odoo/odoo#119561

X-original-commit: 6993d3e36d2f2540100e1bd248b629cc9e191659
Related: odoo/enterprise#40234
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-04-25 08:35:42 +02:00
Chenyun Yang de607a7296 [IMP] spreadsheet: add YTD in period filters
This commit adds YTD (year to date) filter to global period filters in
dashboard.

YTD filter gets the data from Jan 1st of the current year to
today (included). The unit of its offset is year.

task 3215947

closes odoo/odoo#118466

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-04-25 00:52:47 +02:00
Lucas Lefèvre 34edfdd290 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/6304f41c [REL] 16.3.0-alpha.5
https://github.com/odoo/o-spreadsheet/commit/5d6d39ff [IMP] history: add the possibility to repeat commands at redo Task: 2508693
https://github.com/odoo/o-spreadsheet/commit/f48587de [IMP] grid: add F4 shortcut to redo Task: 2508693
https://github.com/odoo/o-spreadsheet/commit/6ada2a17 [REF] history: transform history into a UI plugin Task: 2508693
https://github.com/odoo/o-spreadsheet/commit/f8490e90 [IMP] *: use deepCopy instead of JSON.parse(JSON.stringify) Task: 3272878
https://github.com/odoo/o-spreadsheet/commit/65387405 [IMP] model: store handler arrays Task: 3272878
https://github.com/odoo/o-spreadsheet/commit/5ebc4e30 [IMP] formats: performance of `splitNumber()` Task: 3272878
https://github.com/odoo/o-spreadsheet/commit/a4b68944 [IMP] sheet: move cells methods performance Task: 3272878
https://github.com/odoo/o-spreadsheet/commit/0b4b8ab0 [IMP] header_visibility: improve perfs of `findVisibleHeader` Task: 3272878
https://github.com/odoo/o-spreadsheet/commit/4178abad [FIX] grid: don't focus input if it's unmounted
https://github.com/odoo/o-spreadsheet/commit/9c801ee0 [IMP] xml_bundle: make bundling xml templates sync
https://github.com/odoo/o-spreadsheet/commit/58a15c79 [IMP] FilterIconsOverlay: vertical align for filter icon Task: 3162258
https://github.com/odoo/o-spreadsheet/commit/76141f75 [FIX] test: jest.setTimeout() pushed by error

closes odoo/odoo#119314

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-04-22 05:52:02 +02:00
Florian Charlier 9942eb3dcc [IMP] spreadsheet: add document test model field
See the added field in documents in ENT PR.

Task-3209385

closes odoo/odoo#119299

Related: odoo/enterprise#38171
Related: odoo/upgrade#4579
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-04-22 00:52:07 +02:00
Chenyun Yang 378954a486 [IMP] spreadsheet: include ongoing day in period filters
This commit includes the ongoing day in the current period filters.

Now the start date (time) of each period filter is the start of next day,
and the end date (time) is the end of today.

task 3267525

closes odoo/odoo#118326

Related: odoo/enterprise#39641
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-04-17 14:14:10 +02:00
Lucas LefèvreandAlexis Lacroix 7a1ae006eb [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/6824b8a1 [REL] 16.3.0-alpha.4
https://github.com/odoo/o-spreadsheet/commit/9b911f61 [FIX] tests: fix indeterministic ui sheet
https://github.com/odoo/o-spreadsheet/commit/f20b7be5 [FIX] demo: Align font family with Odoo Task: 3269724
https://github.com/odoo/o-spreadsheet/commit/49a5ee0e [FIX] ColorPicker: Fix checkmark symbol Task: 3269724
https://github.com/odoo/o-spreadsheet/commit/4f2ecfec [REM] menu: remove icons on menu items
https://github.com/odoo/o-spreadsheet/commit/54fca81f [REF] *: rename 'menuItem' files to 'action' files
https://github.com/odoo/o-spreadsheet/commit/5c23e084 [REF] *: Change names of type 'MenuItem' to 'Action'
https://github.com/odoo/o-spreadsheet/commit/e5007fd1 [REF] replace xml tool bar in the xml top bar by menu item buttons
https://github.com/odoo/o-spreadsheet/commit/950abc45 [REF] menu registry: factorize menu registries by menu items
https://github.com/odoo/o-spreadsheet/commit/c02a7e96 [IMP] topbar menu: add icons for conditional menu items
https://github.com/odoo/o-spreadsheet/commit/a19d9cac [IMP] topbar menu: add icons for static menu items
https://github.com/odoo/o-spreadsheet/commit/7825124c [IMP] menu: replace right text icon by left icon
https://github.com/odoo/o-spreadsheet/commit/be3c3d6f [FIX] viewport: infinite loop with hidden headers
https://github.com/odoo/o-spreadsheet/commit/c05be1de [FIX] github: update release-action to latest version
https://github.com/odoo/o-spreadsheet/commit/9fdbdab2 [FIX] sheetview: correctly auto-size spreadsheet
https://github.com/odoo/o-spreadsheet/commit/7d18b589 [IMP] bottom_bar: hide add sheet button in readonly mode
https://github.com/odoo/o-spreadsheet/commit/108b89bd [FIX] menus: don't open submenu is not readonly
https://github.com/odoo/o-spreadsheet/commit/1edbc157 [FIX] top bar: remove useless "Save" menu item

closes odoo/odoo#118624

Related: odoo/enterprise#39801
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Co-authored-by: Alexis Lacroix <laa@odoo.com>
2023-04-17 09:27:58 +02:00
Rémi Rahir (rar) 33b39eef80 [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/573e6791 [REL] 16.3.0-alpha.3
https://github.com/odoo/o-spreadsheet/commit/3cf6910c [IMP] spreadsheet: global `o-disabled` CSS class
https://github.com/odoo/o-spreadsheet/commit/18dcf13f [IMP] model: add canDispatch method
https://github.com/odoo/o-spreadsheet/commit/ca3b3d9d [IMP] figure: reposition figure upon row/col deletion Task: 3171141
https://github.com/odoo/o-spreadsheet/commit/2a814dce [FIX] viewport: viewport maxSize should consider the client size Task: 3204720
https://github.com/odoo/o-spreadsheet/commit/bc96d257 [IMP] menu: display separator of hidden items
https://github.com/odoo/o-spreadsheet/commit/1cba1222 [FIX] header_size: prevent row resize caused by multiline formulas
https://github.com/odoo/o-spreadsheet/commit/cfa3b530 [IMP] test: make test tsconfig work in vscode
https://github.com/odoo/o-spreadsheet/commit/133656d6 [FIX] *: use `Color` alias wherever we work with color strings
https://github.com/odoo/o-spreadsheet/commit/bff461d0 [FIX] *: standardization of color representation Task: 3193882
https://github.com/odoo/o-spreadsheet/commit/7445938f [FIX] type: Fix the Alias type
https://github.com/odoo/o-spreadsheet/commit/e96eef5b [IMP] Chart: use first row as header
https://github.com/odoo/o-spreadsheet/commit/91734b7d [MOV] filter: rename fitler_icons_overlay file
https://github.com/odoo/o-spreadsheet/commit/d3234a56 [IMP] color_picker : added accessibility to custom color picker
https://github.com/odoo/o-spreadsheet/commit/bbf4f484 [IMP] xlsx_import: support more date formats
https://github.com/odoo/o-spreadsheet/commit/2e02cfcc [IMP] tests: improve readability of new Model() in tests
https://github.com/odoo/o-spreadsheet/commit/d3036999 [FIX] tests: Bypass useless `drawGrid` Task: 3254822
https://github.com/odoo/o-spreadsheet/commit/96d5e44e [FIX] model: prevent UI plugins to refuse core commands
https://github.com/odoo/o-spreadsheet/commit/21333f9c [FIX] tokenizer: detect xc with sheet name starting with a number Task: 3215464
https://github.com/odoo/o-spreadsheet/commit/654d22fc [FIX] clipboard: don't open composer on firefox
https://github.com/odoo/o-spreadsheet/commit/b14ef0fc [FIX] demo: optional askConfirmation cancel argument
https://github.com/odoo/o-spreadsheet/commit/bf6c3b6a [IMP] spreadsheet: inherit font family
https://github.com/odoo/o-spreadsheet/commit/c20ecd57 [IMP] edition: remove `getEditionSheet` for redundancy Task: 3229919

closes odoo/odoo#118429

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-04-13 16:40:30 +02:00
Pulinckx Pierre (PIPU) 614de86989 [REF] *: Replace underscore function by native JS
Replace _.isNumber(), _.filter(), _.reject(), _.unique(), _.indexOf(), _.lastIndexOf(), _.findIndex(), _.range()
_.keys(), _.values(), _.str.sprintf() and some _.each()

closes odoo/odoo#118003

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-13 16:40:11 +02:00
Lucas Lefèvre 0651424113 [FIX] documents_spreadsheet: list dates with correct format
Commit odoo/enterprise@4bbf70f was fixing a timezone issue. Datetimes coming
from lists inserted in a spreadsheet were always displayed in UTC.

However, this commit also changed the formatting behavior.
Before the fix: date/datetimes were dispalyed with the server format
After: they are displayed with the local format (FR if the user lang
is French)

This can lead to issues because spreadsheet only understands a
handfull of date(time) format.
For example, it doesn't understand dd/mm/yyyy format but only
the other way around (mm/dd/yyyy)

This commit restores the previous format (server format), while
preserving the timezone conversion.

opw-3251586

Manual forward-port of odoo/enterprise#39438

closes odoo/odoo#118285

X-original-commit: bf84195bce4fbea55d1a4e6a6cd9f17d9be86b73
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-04-12 12:26:26 +02:00
Pierre Rousseau 70a2a62ec9 [FIX] spreadsheet: correctly format date/datetime values of list
Before this revision, a date/datetime field was displayed in UTC instead
of in the user timezone.
This revision fixes this issue.

opw 3127742

closes odoo/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>
2023-04-04 14:46:09 +02:00
Chenyun Yang 0420239770 [FIX] spreadsheet: borders around header and total row
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

closes odoo/odoo#117493

Related: odoo/enterprise#39218
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-04-04 13:35:22 +02:00