Commit Graph
135 Commits
Author SHA1 Message Date
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
luvi 129fa3f150 [MOV] web, *: move TagsList to core components
Since this component is imported and used in many places, it is more
convenient to move this component a core component instead of a
component made exclusively for the Many2ManyTagsField component.

This change makes the usage of TagsList possible by SelectMenu, which
would create issues as the fields folder should not be imported in
other modules.

Part-of: odoo/odoo#115799
2023-04-03 13:55:17 +02:00
Lucas Lefèvre 052dadfc5b [REF] spreadsheet: introduce @odoo/o-spreadsheet module
Using o-spreadsheet features and functions is done using
the same import module as if it was installed from npm.

Additionaly, by adding the library as dev dependency in package.json[1], IDEs can
now leverage Typescript types for autocomplete and type checking.
The "alpha" release tag is always the lastest master version.

[1] enable web tooling `addons/web/tooling/enable.sh` ;)

closes odoo/odoo#115972

Related: odoo/enterprise#38471
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-03-30 17:57:44 +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 b6c4cbe07d [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/59f25bb4 [REL] 16.3.0-alpha.2
https://github.com/odoo/o-spreadsheet/commit/d0189bd0 [FIX] config: bump owl version
https://github.com/odoo/o-spreadsheet/commit/115e1d2b [FIX] tests: fix component tests and their organization
https://github.com/odoo/o-spreadsheet/commit/e42786ad [FIX] Top_bar: Opening a menu should close the composer Task: 3076218
https://github.com/odoo/o-spreadsheet/commit/45f4c5c3 [FIX] range: show ref error after removing col/row
https://github.com/odoo/o-spreadsheet/commit/c55d601d [IMP] figure: add snap to figure drag & drop
https://github.com/odoo/o-spreadsheet/commit/7cbde524 [FIX] side panel: onSidePanelClose prop never call on X symbol click
https://github.com/odoo/o-spreadsheet/commit/308e5d6c [IMP] figure_chart: Double click on chart open the sidepanel
https://github.com/odoo/o-spreadsheet/commit/9781b7e3 [FIX] composer: fixed composer placeholder issues

closes odoo/odoo#116338

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-03-24 07:45:07 +01:00
Géry Debongnie 70a412f325 [IMP] web: update owl from v2.0.7 to v2.0.9
This update contains the following commits:

[IMP] implement .alike suffix on props
[IMP] release: add version number on App
[IMP] app: add name as a config option
[FIX] runtime, compiler: fix refs getting set or unset incorrectly
[FIX] compiler: call translate function with correct string
[FIX] compiler: properly handle readonly attribute/readOnly property
[REF] blockdom,compiler: implement properties
[REF] tests: move properties tests in own file
[FIX] compiler: dynamic value on inputs doesn't turn 0 into empty string
[FIX] components: do not crash when binding anonymous function

More details at: https://github.com/odoo/owl/releases/tag/v2.0.9

Note that this owl update required a few adaptations in Odoo code. The
main problem was that some code would access references after the
component was unmounted. However, Owl is now stricter and properly
remove the reference.

closes odoo/odoo#115991

X-original-commit: a2952026f23858a8d34dcdab4ec8b467f7fc9bcf
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-03-22 11:06:46 +01:00
Rémi Rahir (rar) 50219f2322 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/f41d64a2 [REL] 16.3.0-alpha.1
https://github.com/odoo/o-spreadsheet/commit/a5c5a9bc [FIX] xlsx export: empty string in filtered range
https://github.com/odoo/o-spreadsheet/commit/804bae64 [IMP] components: expose FigureComponent to extend chart menus
https://github.com/odoo/o-spreadsheet/commit/bf20db7f [IMP] functions: DATEDIF and ADDRESS
https://github.com/odoo/o-spreadsheet/commit/1633f098 [REL] Bump master version to 16.3.0-alpha.0
https://github.com/odoo/o-spreadsheet/commit/5fa40538 [IMP] top_bar: added placeholder to topbar composer
https://github.com/odoo/o-spreadsheet/commit/4d93a990 [IMP] toolbar: fix style of icons and of hover
https://github.com/odoo/o-spreadsheet/commit/2c6fe88a [REL] 16.2.0-alpha.4
https://github.com/odoo/o-spreadsheet/commit/5da3ae45 [FIX] ColorPicker: Convert custom string to valid HEX color Task: 3224839
https://github.com/odoo/o-spreadsheet/commit/8b1620b8 [FIX] chart_scorecard: adjusted title and baseline description colors
https://github.com/odoo/o-spreadsheet/commit/c8dd3159 [REF] figure: unify chart and image menus
https://github.com/odoo/o-spreadsheet/commit/cd919f01 [IMP] readme: add npm package
https://github.com/odoo/o-spreadsheet/commit/06bd4fe4 [FIX] server: Do not capture exit process event
https://github.com/odoo/o-spreadsheet/commit/8beef23d [IMP] package: disable console clearing
https://github.com/odoo/o-spreadsheet/commit/aa58c5ac [IMP] package: add task label
https://github.com/odoo/o-spreadsheet/commit/3b23d4ee [FIX] bottom_bar: left/right scroll sheet arrows don't WorkbookData
https://github.com/odoo/o-spreadsheet/commit/febacd14 [FIX] filters: filter can hide all the visible rows of a sheet
https://github.com/odoo/o-spreadsheet/commit/2e34887f [FIX] package: correctly name package entry files
https://github.com/odoo/o-spreadsheet/commit/b8efb5ea [IMP] XLSX: export images
https://github.com/odoo/o-spreadsheet/commit/635a643b [IMP] spreadsheet: separate ZoneDimension and DOMDimension
https://github.com/odoo/o-spreadsheet/commit/734c930c [FIX] package-lock.json: remove git conflict markers
https://github.com/odoo/o-spreadsheet/commit/0cad29b7 [IMP] rollup: improve argument handling of rollup.config.js
https://github.com/odoo/o-spreadsheet/commit/1296e415 [IMP] bundle_xml: improve the bundling o xml

closes odoo/odoo#115514

Related: odoo/enterprise#38296
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-03-17 19:22:19 +01:00
Louis Wicket (wil) 9afe7c74c9 [IMP] *: remove "French spacing" 👺
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.

The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.

closes odoo/odoo#114533

Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-03-14 15:52:10 +01:00
Aaron Bohy 8fc4c6f2d8 [REF] *: remove legacy views support
The last view in the odoo codebase has just been converted to owl,
meaning that we no longer have legacy views. This allows us to
remove a lot of legacy view related code: the abstract elements on
which the legacy views were built, the compatibility layers that
allowed to deal with both owl and legacy views uniformly, legacy
widgets that were only used in those legacy views...

closes odoo/odoo#114893

Related: odoo/upgrade#4420
Related: odoo/enterprise#38005
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-03-10 13:33:04 +01:00
Rémi Rahir (rar) 406abe1f6e [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/ec749cf1 [REL] 16.2.0-alpha.3
https://github.com/odoo/o-spreadsheet/commit/d7267cfa [IMP] selection input: dynamic highlight followup
https://github.com/odoo/o-spreadsheet/commit/de0cdc02 [FIX] figure,chart: Enforce unicity of figure ids
https://github.com/odoo/o-spreadsheet/commit/2410e9d2 [IMP] color_picker: make the color picker a popover
https://github.com/odoo/o-spreadsheet/commit/5ff12582 [FIX] bundle_xml: small fixes for script bundling the xmls
https://github.com/odoo/o-spreadsheet/commit/cf82dbd6 [REV] charts: Fix chart duplicated ids
https://github.com/odoo/o-spreadsheet/commit/a4d593fb [REV] figure,chart: Prevent destructive creation
https://github.com/odoo/o-spreadsheet/commit/eb626ad0 [REL] 16.2.0-alpha.2
https://github.com/odoo/o-spreadsheet/commit/2afe3505 [FIX] chart: Remove forwardport comments Task: 3210689
https://github.com/odoo/o-spreadsheet/commit/2048d9ac [IMP] config: GH release follow semantic versions of package
https://github.com/odoo/o-spreadsheet/commit/00bd206c [IMP] config: tag npm publications
https://github.com/odoo/o-spreadsheet/commit/c66113b3 [FIX] server: server checking the wrong dir to watch for changes
https://github.com/odoo/o-spreadsheet/commit/38af1607 [FIX] config: Fix the action version extractor
https://github.com/odoo/o-spreadsheet/commit/162451a3 [REL] 16.2.0-alpha.1
https://github.com/odoo/o-spreadsheet/commit/92eaf0f5 [FIX] figures: menu not displayed for small figures positioned left
https://github.com/odoo/o-spreadsheet/commit/2855f543 [REL] 16.2.0-alpha.0
https://github.com/odoo/o-spreadsheet/commit/e3653157 [IMP] config: Add Github Action to automatically release and publish on npm
https://github.com/odoo/o-spreadsheet/commit/dfc2cf96 [IMP] config,*: Prepare introduction of releases
https://github.com/odoo/o-spreadsheet/commit/bf7c536e [IMP] doc: adapt the doc to the new API for arguments
https://github.com/odoo/o-spreadsheet/commit/270c02e2 [FIX] figure,chart,image: Prevent destructive creation
https://github.com/odoo/o-spreadsheet/commit/34fc5622 [FIX] charts: Fix chart duplicated ids
https://github.com/odoo/o-spreadsheet/commit/8f75a4f3 [FIX] chart,image: Prevent destructed charts on duplicated sheet
https://github.com/odoo/o-spreadsheet/commit/a815a167 [IMP] functions: translate argument description
https://github.com/odoo/o-spreadsheet/commit/c215783e [IMP] helpers: export lazy function
https://github.com/odoo/o-spreadsheet/commit/f6dfe33f [REM/IMP] css: remove unused classes and improved a bit the css
https://github.com/odoo/o-spreadsheet/commit/fbd86375 [REF] port: run server on 9090 instead of 9000
https://github.com/odoo/o-spreadsheet/commit/8cbfba42 [IMP] top_bar: added and updated tooltips
https://github.com/odoo/o-spreadsheet/commit/7421765d [IMP] figure: remove useless chart registry filling
https://github.com/odoo/o-spreadsheet/commit/7b31778f [FIX] selection input: dynamic highlights
https://github.com/odoo/o-spreadsheet/commit/84ae26f2 [FIX] composer: fix wrong style attribute
https://github.com/odoo/o-spreadsheet/commit/58b09153 [FIX] corner: Fix missing background color
https://github.com/odoo/o-spreadsheet/commit/155c6af3 [IMP] bottom_bar: Add drag&drop on sheet tab.
https://github.com/odoo/o-spreadsheet/commit/d641b2cf [FIX] menus,charts: missing translations
https://github.com/odoo/o-spreadsheet/commit/36df3326 [FIX] selection: uncomment test
https://github.com/odoo/o-spreadsheet/commit/990c158b [FIX] font_size_editor: add props definition
https://github.com/odoo/o-spreadsheet/commit/4dfa6d3e [IMP] autofill: support edge scrolling
https://github.com/odoo/o-spreadsheet/commit/a198f5c9 [IMP] Components: extract color picker entry component

closes odoo/odoo#114388

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-03-07 02:00:06 +01:00
Lucas Lefèvre 4217c5b3dd [FIX] spreadsheet: load async formulas without delay
Now the promise waiting for all async no longer relies on a setInterval.
It was a hack that can be better solved by listening to the data sources
event.

closes odoo/odoo#114348

X-original-commit: de1f42f98410bc796dfdbfd237b1e20be4496166
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-03-03 19:10:20 +01:00
jash 2162dd4225 [FIX] spreadsheet_dashboard: decoding the dashboard data
Earlier, receiving data was size of the file which is not what we
want. And we are trying to decode that as they are in binary form. Which
can not working properly.

So refactor code accordingly.

Task - 3162824

closes odoo/odoo#113953

Related: odoo/enterprise#37650
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-03-02 16:01:02 +01:00
FrancoisGe f9edb9f2f4 [REF] spreadsheet: remove duplicate orderByToString
The orderByToString function has been duplicated in spreadsheet. We will
replace it with the one defined in web.

closes odoo/odoo#113873

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-02 16:00:56 +01:00
Pierre Rousseau 6e45c0fd22 [FIX] spreadsheet: preload list record limit
Steps to reproduce:
- Insert a list view in a spreadsheet
- Cut & Paste the entire list to a new sheet
- On the first sheet, insert a formula, `=SUM()` which sum many records of the list
- Click on `Clear history` in the file menu (to force a snapshot and a reload)
=> There are one RPC by number of records in the SUM function, with the
limit increased by 1 each time.

The record limit (the bigger record index) is computed during the
evaluation. With a normal case, the evaluation goes through all the
cells of the viewport, collect the biggest record index, and trigger the
rpc after that.
However, in our usecase, the evaluation is not passed on the second sheet
(the one which contains the list view), so the limit is not computed.
When we evaluate the arguments of the `SUM` function, we evaluate each
argument one by one. So we evaluate a `ODOO.LIST` formula, the limit is
lower than the previous limit, so the function returns an error.
But when evaluating the arguments of a function, we stop the evaluation
as soon as we find an error. So the evaluation of the `SUM` function is
stopped, and the limit is not entirely computed.
So the first RPC will have a limit 1, then the evaluation is re-run, a
second RPC is triggered with a limit 2, and so on.

This commit fixes the issue by preloading the limit during the import of
the data and during an UPDATE_CELL.

opw-3165458

closes odoo/odoo#113789

X-original-commit: 1c5a05198542b3a40c97443b2a9ecf5fb32eb5f2
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-02-27 18:12:29 +01:00
Lucas Lefèvre 0fa9b07d8f [FIX] documents_spreadsheet: use user timezone for pivot view
Set the user timezone to Australia/Sydney (GMT+11)
Set your computer's timezone is US/Arizona (GMT-7)

Insert a pivot view grouped by a datetime field (e.g. create_date),
The dates are messed up.

The server returns midnight in Sydney, as UTC as always in odoo
2023-01-01 00:00:00 in Sydney is 2022-12-31 13:00:00 in UTC

Since midnight in Sydney is still the previous day in UTC, we
have to convert the datetime to the original timezone to get back the
local date (2023-01-01).

If the user timezone and the computer timezone are different, using
the computer timezone is wrong because it will yield the time in
Arizona.
When it's midnight in Sydney (2023-01-01 00:00:00) it's 2022-12-31 06:00:00
in Arizona.
This is not the same day!

opw-3170077

closes odoo/odoo#113740

X-original-commit: b2f760cae74201d1622e56a0027dae67dcff9e33
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-02-27 15:00:19 +01:00
Pierre Rousseau 5ff5bb686c [IMP] spreadsheet: include first row grouping at insertion
With this revision, the label of the field of the first row groupby is
inserted as the row title.

Task-id 2901960

closes odoo/odoo#107220

Related: odoo/enterprise#37395
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-02-23 10:30:56 +01:00
Pierre Rousseau 906e6784c1 [REF] spreadsheet*: use @odoo/owl import
closes odoo/odoo#113133

Related: odoo/enterprise#37284
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-02-22 20:25:27 +01:00
Rémi Rahir (rar) 829329ab84 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/1b667256 [IMP] format: set decimal change on each cell of zone
https://github.com/odoo/o-spreadsheet/commit/f9766810 [FIX] Top_bar: topbar dropdown z-index
https://github.com/odoo/o-spreadsheet/commit/73819bd5 [IMP] Toolbar: make font size selector editable
https://github.com/odoo/o-spreadsheet/commit/db50da0d [FIX] scorecard: rendering issue while resizing
https://github.com/odoo/o-spreadsheet/commit/fdd0ca6c [FIX] topbar: colorPicker maximum height props
https://github.com/odoo/o-spreadsheet/commit/25fd9bbe [FIX] top_bar: auto selecting adjacent cells for filter
https://github.com/odoo/o-spreadsheet/commit/079bf8d5 [FIX] top_bar: respond menu upon scaling viewport
https://github.com/odoo/o-spreadsheet/commit/74b2b2eb [IMP] parser: improve parenthesis error messages
https://github.com/odoo/o-spreadsheet/commit/43dd7222 [REF] parser: rename unknown to empty AST node
https://github.com/odoo/o-spreadsheet/commit/b3895766 [REF] parse: remove binding power
https://github.com/odoo/o-spreadsheet/commit/42594be1 [FIX] bottom_bar_statistic: close context menu on change
https://github.com/odoo/o-spreadsheet/commit/ed572ee5 [FIX] chart: add dimensions to canvas
https://github.com/odoo/o-spreadsheet/commit/6609e980 [REF/IMP] tests: mount owl App in test mode and mount components in helper
https://github.com/odoo/o-spreadsheet/commit/80a0b53d [FIX] Edition: Reference loop should not alter sheetname of the reference
https://github.com/odoo/o-spreadsheet/commit/378af542 [FIX] FigureContainer: Do not update figure when not dragged

closes odoo/odoo#112972

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-02-17 12:07:53 +01:00
Lucas Lefèvre 68c1aad930 [REF] spreadsheet: assign filter in history
The filter can be assigned in the history directly with its
"id". No need to copy the object

closes odoo/odoo#112309

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-02-13 08:19:00 +01:00
MerlinGuillaume a021c48417 [FIX] spreadsheet,web: use dot or comma in date format
Date fields are changing format if you type it in instead of using the
date selector calendar popup

Steps to reproduce:
1. Install Time Off
2. Open the current language and change the date format to `%d.%m.%Y`
3. Go to Time Off > Approvals > Allocations
4. Create a new allocation
5. Change the validity period to 10.03.2023 (by typing it in, not using
   the datepicker) and click out of the field
6. The date displayed is changed to 2010/03/20 or 20.03.2010 (if the
   datepicker was opened)

Solution:
Add dot and comma as a possible character for static format
Also deduplicated function isValidStaticFormat so we have a single
definition

Problem:
Formats using dots were not considered as valid static format so the
value entered was parsed with the format `yyyy/MM/dd` instead

opw-3081268

closes odoo/odoo#112218

X-original-commit: 18d6944510b55a4de21be050b8fef327f00e71d5
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-02-08 16:50:00 +01:00
Pierre Rousseau c904bd7c5e [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/b1f3dd55e [FIX] Cell/clipboard: Fix last cell deletion
https://github.com/odoo/o-spreadsheet/commit/7a183b176 [REF/IMP] figure: refactor figure container and handle scroll
https://github.com/odoo/o-spreadsheet/commit/64b9f825c [REF] sheetview: split getter "getActiveSheetScrollInfo"
https://github.com/odoo/o-spreadsheet/commit/be9540654 [IMP] top bar: add 'text wrapping' options
https://github.com/odoo/o-spreadsheet/commit/a7d59e34f [IMP] top bar: add 'vertical alignment' options
https://github.com/odoo/o-spreadsheet/commit/d4663158d [FIX] menu: use capture for events
https://github.com/odoo/o-spreadsheet/commit/29fa62c35 [FIX] figures: copy paste through context menu not working
https://github.com/odoo/o-spreadsheet/commit/8cdc7c193 [FIX] selection processor: expose only interface
https://github.com/odoo/o-spreadsheet/commit/ab6c4d86e [FIX] selection: avoid scroll when using ctrl+a loop
https://github.com/odoo/o-spreadsheet/commit/fd1140c72 [FIX] Renderer: Speed up rendering
https://github.com/odoo/o-spreadsheet/commit/0358a76d5 [FIX] components: Fix static colors for spreadsheet
https://github.com/odoo/o-spreadsheet/commit/8497bf562 [REF] tests: introduce click helper
https://github.com/odoo/o-spreadsheet/commit/662996755 [FIX] drag & drop: mouse outside the grid & freeze panes
https://github.com/odoo/o-spreadsheet/commit/472852266 [IMP] chart: format Y values
https://github.com/odoo/o-spreadsheet/commit/b561936fd [IMP] tests: Speed up composer tests

closes odoo/odoo#111953

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-02-06 10:19:02 +01:00
Pierre Rousseau 032c5e1d9d [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/dac9cfd14 [REF] collaborative: don't dispatch commands twice to views
https://github.com/odoo/o-spreadsheet/commit/04459ca94 [FIX] sheetview: check active sheet exists
https://github.com/odoo/o-spreadsheet/commit/2f1852560 [FIX] EdgeScroll: Allow edge scrolling through hidden columns
https://github.com/odoo/o-spreadsheet/commit/de4abb0b4 [IMP] Registry: add sequence to chart registry
https://github.com/odoo/o-spreadsheet/commit/bb110f20d [IMP] Header: auto-resize of row height
https://github.com/odoo/o-spreadsheet/commit/bfe777ada [IMP] topbar: CSS tweaking
https://github.com/odoo/o-spreadsheet/commit/73379f013 [FIX] collaborative: don't render uselessly
https://github.com/odoo/o-spreadsheet/commit/3dd59192a [FIX] freeze: check overlapping merge with command sheet
https://github.com/odoo/o-spreadsheet/commit/520fdad1e [FIX] header size: compute the size before duplicating the sheet
https://github.com/odoo/o-spreadsheet/commit/bc62fcff2 [FIX] data filters: don't copy filter values
https://github.com/odoo/o-spreadsheet/commit/8ed593daa [FIX] merges: validate zone to unmerge
https://github.com/odoo/o-spreadsheet/commit/21d1fb7e0 [FIX] collaborative: validate remote commands with allowDispatch
https://github.com/odoo/o-spreadsheet/commit/ba4f998cb [FIX] collaborative: transform remote commands before dispatch to UI
https://github.com/odoo/o-spreadsheet/commit/d811b1f08 [IMP] Function: add `hidden` tag to hide functions
https://github.com/odoo/o-spreadsheet/commit/d24b6f09e [FIX] composer: (real) support of IME
https://github.com/odoo/o-spreadsheet/commit/3edc780fd [FIX] popover: preserve scroll in popover
https://github.com/odoo/o-spreadsheet/commit/4da67942c [FIX] topbar: properly toggle menus
https://github.com/odoo/o-spreadsheet/commit/ecdd45fd6 [FIX] menu: reduce redundant calls to getter
https://github.com/odoo/o-spreadsheet/commit/ccd231e4e [FIX] ripple: use `window.getComputedStyle()` only in `onClick`
https://github.com/odoo/o-spreadsheet/commit/c8b5f70fc [FIX] drag&drop: preventDefault on passive wheel event
https://github.com/odoo/o-spreadsheet/commit/db5b00246 [FIX] figure resizer: fix CSS
https://github.com/odoo/o-spreadsheet/commit/a05fa98c2 [FIX] chart: default chart background behaviour
https://github.com/odoo/o-spreadsheet/commit/015dd2cff [FIX] ColorPicker : showing black color selected upon reset
https://github.com/odoo/o-spreadsheet/commit/3710b7df1 [IMP] css: use cssPropertiesToCss helper everywhere
https://github.com/odoo/o-spreadsheet/commit/cd424377e [REF] tests: use helpers in autocomplete dropdown tests
https://github.com/odoo/o-spreadsheet/commit/73c7dce73 [IMP] EventStream: self releasing does not call the release callback
https://github.com/odoo/o-spreadsheet/commit/01e001d5a [IMP] demo: add Owl error handling in demo.js
https://github.com/odoo/o-spreadsheet/commit/d1ad65205 [FIX] `Grid`: double click should target the main cell
https://github.com/odoo/o-spreadsheet/commit/ccfd28c42 [IMP] Grid Composer: add cell reference when scrolling
https://github.com/odoo/o-spreadsheet/commit/41708c7ae [FIX] Reference: Support sheet names containing exclamation points
https://github.com/odoo/o-spreadsheet/commit/84d8ffab6 [FIX] package-lock.json: solve conflict in file
https://github.com/odoo/o-spreadsheet/commit/98ad66f29 [FIX] config: bump owl version to 2.0.3
https://github.com/odoo/o-spreadsheet/commit/9a618dbb2 [IMP] top bar: add menu item to insert formula functions
https://github.com/odoo/o-spreadsheet/commit/289ec5b92 [REF] compiler: use code builder
https://github.com/odoo/o-spreadsheet/commit/71ae6cfa0 [FIX] grid_overlay: properly detect grid overlay resize
https://github.com/odoo/o-spreadsheet/commit/be62b9ebf [FIX] sheetView: grid composer at wrong pos when cell not in viewport
https://github.com/odoo/o-spreadsheet/commit/b3da747df [IMP] Autofill: alphanumeric values
https://github.com/odoo/o-spreadsheet/commit/ca5becafa [IMP] composer: add multi line composer handling
https://github.com/odoo/o-spreadsheet/commit/4aea6af88 [IMP] mockContentHelper: use focus to change window.mockContentHelper
https://github.com/odoo/o-spreadsheet/commit/1bee3a4b6 [IMP] tokenize: add NEWLINE handling
https://github.com/odoo/o-spreadsheet/commit/1da559c75 [FIX] menu: fix positioning of sub menus

closes odoo/odoo#111568

Related: odoo/enterprise#36586
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-02-01 16:39:54 +01:00
Pierre Rousseau e63d5dd253 [FIX] spreadsheet: correctly return in function
closes odoo/odoo#110816

X-original-commit: 5b6bf9f76df4df3be182b14b4c0ba36631bc6cc9
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-01-24 13:47:31 +01:00
Martin Trigaux 776689b0f4 [I18N] *: export saas-16.1 source terms
closes odoo/odoo#110752

X-original-commit: 56b2b52287a8f2192d80ea417c7efac80a87c0a9
Related: odoo/enterprise#36173
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-01-24 10:20:30 +01:00
Lucas Lefèvre a7fe381f71 [REF] spreadsheet_dashboard: remove badly named raw field
Up until now, the collaborative expected a field named `raw` containing
the serialized json data. This is historic and appeared because the field
containing the existing field `raw` on `document.document` contained this
data.

The name `raw` is meaningless. Now the collaborative expects a field
named `spreadsheet_data`.
I chose a field over a custom method because fields are more broadly
supported everywhere (web client services, web client mocks)

closes odoo/odoo#104167

Related: odoo/upgrade#4005
Related: odoo/enterprise#33246
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-01-20 20:58:01 +01:00
Lucas Lefèvre 22d4a260ec [FIX] spreadsheet: load data in background
When the data takes longer to load, the UI is blocked with the loading
overlay.

Now the data is loaded in the background and we can still navigate
in the spreadsheet.

Note: I moved the `.silent` upper in the call chain. Lower level structures
such as ServerData, DataSources, MetadataRepository don't need to know.

closes odoo/odoo#110387

X-original-commit: 8b09c7347ebeffa7059ed0ccc63f73e3559b7712
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-01-19 17:49:06 +01:00
Pierre Rousseau 040410e5cc [FIX] spreadsheet: correctly migrate date offset field matching
Steps to reproduce:
- Edit CRM -> Leads dashboard
- Edit filter "Period"
=> There is no period offset for the pivot 2, 4 and 6, despite the
   fact that these pivots have a period offset defined in the json
   data

This is because the field matching migration was not correct. It did
not take "offset" field into account.

Task-id 3138590

closes odoo/odoo#110221

X-original-commit: 2217c10ba771ece4a4d0d0485ce2f24b13754244
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-01-18 10:16:20 +01:00
Rémi Rahir e10d00acfd [FIX] spreadsheet: do not evaluate domain for date filters without a field
We were trying to evaluate the domain of a date filter when no chain was
provided in the field matching instead of returning an undefined domain
like for the other types of filters.

Task 3114332

closes odoo/odoo#110131

X-original-commit: 6eddb4b684d5c233b650f86fd8b26dcb8af4ca2d
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-01-18 06:55:51 +01:00
Lucas Lefèvre 9a06c9550a [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/331a62e8 [REF] menu: simplify menu api
https://github.com/odoo/o-spreadsheet/commit/9c5f0ebc [IMP/REF] bottom_bar: improve style and usability
https://github.com/odoo/o-spreadsheet/commit/a378c53c [IMP] composer: fuzzy search to autocomplete
https://github.com/odoo/o-spreadsheet/commit/35b1263a [FIX] bottom_bar_sheet: fix innerHTML security issue

closes odoo/odoo#110106

Related: odoo/enterprise#35897
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-01-17 20:59:02 +01:00
Rémi Rahir 3e7bdd40fa [FIX] spreadsheet: Catch access errors on spreadsheet
Currently, a user opening a spreadsheet containing pivots/lists/graphs
that they don't have the rights to access (be it because of the parent
model or the domain applied) will end up in an infinite loop.

While starting the datasources, the fetch step will throw, potentially
spamming the user with access errors.

Manual forward port of https://github.com/odoo/enterprise/pull/35146

Task 3107650

closes odoo/odoo#110113

X-original-commit: 1555e79be0b52c30df43e8de50f5db56fbbda630
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-01-17 14:16:34 +01:00
Rémi Rahir f7a3657a0b [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/dcff0890 [IMP] Error: Lookup module's functions  now return NA Errors
https://github.com/odoo/o-spreadsheet/commit/e154817f [FIX] collaborative: Ensure full payload of `UPDATE_CHART`
https://github.com/odoo/o-spreadsheet/commit/1829d0f0 [FIX] functions, find & replace: escape regex special characters
https://github.com/odoo/o-spreadsheet/commit/273c38ca [FIX] figure: Change component structure to leverage navigator native behaviour
https://github.com/odoo/o-spreadsheet/commit/bf97a1e4 [IMP] registries: always populate chart/figure registries
https://github.com/odoo/o-spreadsheet/commit/1178bbec [IMP] components: prevent mouse event defaults on drag-and-drop

closes odoo/odoo#109866

Related: odoo/enterprise#35778
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-01-16 09:33:02 +01:00