Commit Graph
54 Commits
Author SHA1 Message Date
Pierre Rousseau 122e5142da [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/7112f4d7 [IMP] autofill: draw autofill behind selection
https://github.com/odoo/o-spreadsheet/commit/363a5898 [IMP] demo: add production use warning
https://github.com/odoo/o-spreadsheet/commit/46f3adb5 [IMP] readme: add contribution guidelines
https://github.com/odoo/o-spreadsheet/commit/ddce160a [REF] model: remove useless else to dispatch
https://github.com/odoo/o-spreadsheet/commit/7795cee6 [FIX] linkDisplay: Hide edit/remove on readonly mode
https://github.com/odoo/o-spreadsheet/commit/5d574cf4 [IMP] xlsx: import and export data filters
https://github.com/odoo/o-spreadsheet/commit/580880af [FIX] topbar: empty space between dropdown and button
https://github.com/odoo/o-spreadsheet/commit/bbbd3739 [FIX] components: rename non-english import alias
https://github.com/odoo/o-spreadsheet/commit/852f7502 [IMP] spreadsheet: remove exposeSpreadsheet props

closes odoo/odoo#104790

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-11-03 09:37:08 +01:00
Rémi Rahir 06f92770f9 [FIX] spreadsheet: filter creation/deletion reloads datasources
The domain of the datasources was not recomputed on the deletion of a
filter that impacted it. Furthermore, the issue was also present when a
client would UNDO/REDO some revisions.

Task 3002004

closes odoo/odoo#104630

X-original-commit: 3b63d8d592482b655a4273bf9d5d98de3992d26a
Related: odoo/enterprise#33468
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-10-31 17:55:42 +01:00
Pierre Rousseau 3aca42ab26 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/1f8e5fac [FIX] spreadsheet: deactivate keystroke inputs in dashboard mode
https://github.com/odoo/o-spreadsheet/commit/085c09b8 [REF] spreadsheet: remove local model
https://github.com/odoo/o-spreadsheet/commit/8dbb54ad [REF] spreadsheet_test: use model from helper
https://github.com/odoo/o-spreadsheet/commit/80fb9292 [REF] tests: mountSpreadsheet returns model
https://github.com/odoo/o-spreadsheet/commit/4bc9edd7 [REM] grid: remove ctrl+s shortcut
https://github.com/odoo/o-spreadsheet/commit/0673bc44 [IMP] spreadsheet: remove useless props
https://github.com/odoo/o-spreadsheet/commit/4e75de52 [IMP] *: add props validation
https://github.com/odoo/o-spreadsheet/commit/f78681ea [REM] tests: remove scroll bars mock
https://github.com/odoo/o-spreadsheet/commit/505e942b [FIX] sheetview: resize viewport when font size changes
https://github.com/odoo/o-spreadsheet/commit/c3997be9 [FIX] data filters: traceback at sheet duplication
https://github.com/odoo/o-spreadsheet/commit/0b35536e [FIX] filters: show rows when filter table is removed
https://github.com/odoo/o-spreadsheet/commit/3a897a36 [IMP] cell: Remove useless uuid generation for performance
https://github.com/odoo/o-spreadsheet/commit/d9d8a6fb [FIX] topbar: dropdown closing when clicking inside
https://github.com/odoo/o-spreadsheet/commit/29225920 [FIX] readme: cannot extend excel import

closes odoo/odoo#104274

Related: odoo/enterprise#33312
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-10-27 18:43:14 +02:00
abd-msyukyu-odoo 64d48616c9 [FIX] knowledge: make removeContextUserInfo a web asset
removeContextUserInfo was a Spreadsheet asset, which is not a dependency of
Knowledge.

In order to make this feature available for all modules, it is moved in web as
an object util, that needs to be used alongside the user service in order to
dynamically remove user context information (no hardcoding).

Task-3017349

closes odoo/odoo#104304

X-original-commit: fd88fc1bbad4c0cdb44cf634b6a5621eb7597e0d
Related: odoo/enterprise#33322
Signed-off-by: David Beguin (dbe) <dbe@odoo.com>
2022-10-27 15:41:21 +02:00
Adrien Minne 178f8666cf [IMP] srpeadsheet: make xlsx import verbose in debug mode
Make the xlsx import display warning for things that couldn't be imported,
but only if Odoo is in debug mode.

Odoo task 3035674

closes odoo/odoo#103671

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-10-24 15:12:48 +02:00
Rémi Rahir e4bf9126c8 [FIX] spreadsheet: wait for async functions in Excel download
Task 3002547

closes odoo/odoo#103368

X-original-commit: ae5fdcc963529573e5dace497ab2ff6f8b365eea
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-10-18 13:17:19 +02:00
Adrien Minne 47ffe7b285 [FIX] spreadsheet: filter clear button for automatic default value
For the date filters with a default value set to "Automatically fitler
on the current period", the clear button don't work. It does not clear
the filter but revert it back to the default value.

The bug happens in the global filters side panel as well as in the
dashboards.

Odoo task 2989909

closes odoo/odoo#103270

X-original-commit: 27e58050aacf0ae525f1e1b6fec7b69133781312
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Signed-off-by: Minne Adrien (adrm) <adrm@odoo.com>
2022-10-17 16:14:58 +02:00
Pierre Rousseau ab2ae80ce0 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/ab6f7e4b [FIX] find_and_replace: clear input clears search matches
https://github.com/odoo/o-spreadsheet/commit/fe6afd61 [REF] header_visibility_ui: rewrite findLastVisibleColRowIndex
https://github.com/odoo/o-spreadsheet/commit/4c987a64 [REF] grid: remove useless clip
https://github.com/odoo/o-spreadsheet/commit/25a3168b [REF] functions: naming convention of assert helpers
https://github.com/odoo/o-spreadsheet/commit/ab896cac [IMP] functions: add demo data for financial functions
https://github.com/odoo/o-spreadsheet/commit/1e5912ad [IMP] functions: add AMORLINC function
https://github.com/odoo/o-spreadsheet/commit/cee8339f [IMP] functions: add XNPV function
https://github.com/odoo/o-spreadsheet/commit/dd17ff13 [IMP] functions: add XIRR function
https://github.com/odoo/o-spreadsheet/commit/d6813dc4 [IMP] functions: add VDB function
https://github.com/odoo/o-spreadsheet/commit/83ea4da8 [IMP] functions: add TBILLYIELD function
https://github.com/odoo/o-spreadsheet/commit/b2bd8be3 [IMP] functions: add TBILLEQ function
https://github.com/odoo/o-spreadsheet/commit/d1e70d63 [IMP] functions: add TBILLPRICE function
https://github.com/odoo/o-spreadsheet/commit/ea1bef1c [IMP] functions: add SYD function
https://github.com/odoo/o-spreadsheet/commit/31605fd4 [IMP] functions: add SLN function
https://github.com/odoo/o-spreadsheet/commit/816d31af [IMP] functions: add RRI function
https://github.com/odoo/o-spreadsheet/commit/a4a83a4b [IMP] functions: add RECEIVED function
https://github.com/odoo/o-spreadsheet/commit/28feb878 [IMP] functions: add MIRR function
https://github.com/odoo/o-spreadsheet/commit/a289a941 [IMP] functions: add INTRATE function
https://github.com/odoo/o-spreadsheet/commit/62da0927 [IMP] functions: add FVSCHEDULE function
https://github.com/odoo/o-spreadsheet/commit/b6789bd7 [IMP] functions: add DOLLARFR function
https://github.com/odoo/o-spreadsheet/commit/5db4064f [IMP] functions: add DOLLARDE function
https://github.com/odoo/o-spreadsheet/commit/cdc73ce5 [IMP] functions: add DISC function
https://github.com/odoo/o-spreadsheet/commit/cd0ee521 [IMP] functions: add DDB function
https://github.com/odoo/o-spreadsheet/commit/161134e6 [IMP] functions: add CUMPRINC function
https://github.com/odoo/o-spreadsheet/commit/c89c64ec [IMP] functions: add CUMIPMT function
https://github.com/odoo/o-spreadsheet/commit/4608ce74 [IMP] functions: add ACCRINTM function
https://github.com/odoo/o-spreadsheet/commit/c0bbf544 [IMP] functions: add DAYS360 function
https://github.com/odoo/o-spreadsheet/commit/2a59663c [IMP] functions: add PRICEMAT function
https://github.com/odoo/o-spreadsheet/commit/1c28a0ff [IMP] functions: add PRICEDISC function
https://github.com/odoo/o-spreadsheet/commit/dabffa30 [IMP] functions: add ISPMT function
https://github.com/odoo/o-spreadsheet/commit/f7351b21 [FIX] evaluation: prevent minus 0 (-0) values
https://github.com/odoo/o-spreadsheet/commit/3fca53c9 [IMP] functions: add IPMT function
https://github.com/odoo/o-spreadsheet/commit/418c9f4a [IMP] functions: add PPMT function
https://github.com/odoo/o-spreadsheet/commit/8ea85442 [IMP] functions: add NPER function
https://github.com/odoo/o-spreadsheet/commit/b9eb40b8 [IMP] functions: add PMT function
https://github.com/odoo/o-spreadsheet/commit/27228ad7 [IMP] functions: add YIELDDISC function
https://github.com/odoo/o-spreadsheet/commit/ca54b439 [IMP] functions: add coupon functions
https://github.com/odoo/o-spreadsheet/commit/7f0b3703 [IMP] functions: add RATE formula
https://github.com/odoo/o-spreadsheet/commit/9940b6d9 [IMP] functions: add NOMINAL and EFFECT functions
https://github.com/odoo/o-spreadsheet/commit/97ddfdd6 [FIX] functions: rename financial test file
https://github.com/odoo/o-spreadsheet/commit/16f7d2af [REF] sheetview: don't reset viewports uselessly
https://github.com/odoo/o-spreadsheet/commit/4dfa2142 [REF] grid: remove useless anonymous function
https://github.com/odoo/o-spreadsheet/commit/e3f64551 [FIX] ui_sheet: do not resize empty columns

closes odoo/odoo#103245

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-10-17 10:11:14 +02:00
Adrien Minne 4eabd4603f [FIX] spreadsheet: switch global filter icon
Since the introduction of Data Filters, we have a dupicated icon for both
data filters and global filters in the topbar. Fix this by changing
the global filters icon to fa-search.

Also move CSS for global filter to entreprise where it should be.

Odoo task 3014307

closes odoo/odoo#103084

X-original-commit: e9d68085f09ddba0135b8c0995fd33b2de534eda
Related: odoo/enterprise#32720
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Minne Adrien (adrm) <adrm@odoo.com>
2022-10-12 14:19:43 +02:00
Rémi Rahir fc520504a9 [FIX] spreadsheet: Ingore Pivot.HEADERS with measure field
Field `measure` in `PIVOT.HEADER` functions are not actual res.model
fields but are used to display the fieldName of the measured field.

closes odoo/odoo#102979

X-original-commit: 6de4b2c4c058babb4e3ee0b60212aa4a9ccec119
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-10-10 20:52:25 +02:00
Pierre Rousseau cf49fd2643 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/1af8ad34 [IMP] filters: allow to update a filter in readonly mode
https://github.com/odoo/o-spreadsheet/commit/706cc8ee [FIX] model: ensure that two getters cannot have the same name
https://github.com/odoo/o-spreadsheet/commit/96067749 [IMP] grid: allow to remove content of a cell with backspace

closes odoo/odoo#102807

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-10-10 11:57:10 +02:00
Pierre Rousseau 590957106b [FIX] spreadsheet: rename conflicting getter
closes odoo/odoo#102706

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-10-09 11:49:58 +02:00
Pierre Rousseau c9022c7494 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/35585379 [IMP] readme: re-introduce o-spreadsheet nick name
https://github.com/odoo/o-spreadsheet/commit/f81baa40 [IMP] spreadsheet: Add data filters
https://github.com/odoo/o-spreadsheet/commit/7851fffc [FIX] tests: fix non-deterministic helper
https://github.com/odoo/o-spreadsheet/commit/d3106bca [FIX] scorecard: resize text while figure is resized
https://github.com/odoo/o-spreadsheet/commit/1e7ee52d [FIX] model: don't translate technical error message
https://github.com/odoo/o-spreadsheet/commit/7088a9a1 [FIX] Chart Panel: Chart title is updated when typing
https://github.com/odoo/o-spreadsheet/commit/900c1b60 [FIX] automatic_sum: evaluated date blocks automatic sum
https://github.com/odoo/o-spreadsheet/commit/4dbac05c [ADD] Copyright, license
https://github.com/odoo/o-spreadsheet/commit/3de57000 [IMP] documentation and readme
https://github.com/odoo/o-spreadsheet/commit/6efe8064 [DOC] Rebuild documentation

Part-of: odoo/odoo#102706
2022-10-09 11:49:58 +02:00
Rémi Rahir c822f4778f [FIX] spreadsheet: faulty logic in filters dependencies
The global filters had to be aware of every type of datasources that it
affected (i.e. pivots, lists and charts). This commit introduces the
possibility for any datasource to register its type in an object handled
by the filters, making the latter agnostic of the different possible
kinds.

Task 2992752

closes odoo/odoo#102688

X-original-commit: b7dda98dfd2ee6973e2ca09b8c8ee7e8c43032a8
Related: odoo/enterprise#32526
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-10-07 19:45:13 +02:00
Pierre Rousseau 53e9761a41 [REF] spreadsheet: rename global filters plugins
After this revision, the core and ui plugins are clearly identified.

X-original-commit: c2aea83092cda1c95ebbef423ce265451f67babe
Part-of: odoo/odoo#102688
2022-10-07 19:45:13 +02:00
Pierre Rousseau 877f190f60 [FIX] spreadsheet: fix test data
Before this revision, the fields of `partner` were not searchable, which
was not correct.
This revision fixes that.

Part of task-id 2987871

X-original-commit: 2c180660e412bd0f52da920bdf8f96b200fc3aa2
Part-of: odoo/odoo#102688
2022-10-07 19:45:12 +02:00
Rémi Rahir 3ab8b6ae81 [FIX] spreadsheet: Fix style and presentation of global filters
Fixed the style of some filters inputs (namely date filters) and
added placeholders for dashboard mode.

task 2995579

closes odoo/odoo#102604

X-original-commit: f6a661c926d3d34c9a011f2b2020a319e65754ae
Related: odoo/enterprise#32485
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-10-07 15:40:13 +02:00
Pierre Rousseau 347294a8d2 [FIX] spreadsheet, spreadsheet_dashboard: adapt to spreadsheet last update
closes odoo/odoo#102358

Related: odoo/enterprise#32366
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-10-06 17:00:21 +02:00
Pierre Rousseau 7578cfa109 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/808bd19f [IMP] figure: select figure on insertion
https://github.com/odoo/o-spreadsheet/commit/a6675aa4 [IMP] clickable cell: give env as condition argument
https://github.com/odoo/o-spreadsheet/commit/b8420475 [IMP] dashboard: clickable cells
https://github.com/odoo/o-spreadsheet/commit/7b1c16b0 [REF] components: use dedicated component for dashboard mode
https://github.com/odoo/o-spreadsheet/commit/b3f48d65 [REF] grid: move focusable element to grid
https://github.com/odoo/o-spreadsheet/commit/cd083d9b [REF] grid: resize sheet view independently from grid
https://github.com/odoo/o-spreadsheet/commit/ed4948b8 [REF] tests: globally mock grid clientX and clientY
https://github.com/odoo/o-spreadsheet/commit/011aa0d4 [IMP] spreadsheet: export positionToZone helper
https://github.com/odoo/o-spreadsheet/commit/b24e6483 [IMP] formula: ignore space when caching compiled formula
https://github.com/odoo/o-spreadsheet/commit/65a67b51 [IMP] package.json: upgrade Typescript
https://github.com/odoo/o-spreadsheet/commit/af4f2f58 [IMP] package.json: upgrade prettier
https://github.com/odoo/o-spreadsheet/commit/4c15328d [IMP] functions: improve performance of lookup functions
https://github.com/odoo/o-spreadsheet/commit/baafa638 [IMP] functions: add XLOOKUP function
https://github.com/odoo/o-spreadsheet/commit/3d5c662e [IMP] functions: add MID function
https://github.com/odoo/o-spreadsheet/commit/26f24529 [IMP] functions: add PROPER function
https://github.com/odoo/o-spreadsheet/commit/07b4201f [IMP] functions: add CLEAN function
https://github.com/odoo/o-spreadsheet/commit/adee58ff [IMP] functions: add IFNA function
https://github.com/odoo/o-spreadsheet/commit/089f3b8d [IMP] functions: add ISBLANK function
https://github.com/odoo/o-spreadsheet/commit/b638a3d5 [IMP] grid: use correct event attribute

Part-of: odoo/odoo#102358
2022-10-06 17:00:21 +02:00
Martin Trigaux fde3f4d4b9 [I18N] *: export 16.0 source terms
closes odoo/odoo#102163

X-original-commit: 011d7aac5aacedb3ab373f247471ba69d67f50f3
Related: odoo/enterprise#32288
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-10-06 14:56:52 +02:00
Rémi Rahir e88bc0b040 [FIX] spreadsheet: Introducing stacked line charts
Allow users to use stacked line charts. The chart.js configuration
is mimicking the one inside Odoo community.

task 2888350

closes odoo/odoo#102312

X-original-commit: 1ccb2cd685c60eecd767eb15967d4b4c25262ded
Related: odoo/enterprise#32345
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-10-06 12:04:44 +02:00
anhe-odoo 1b2ae7fceb [FIX] spreadsheet: fix set_as_filter action in context menu
Task Description

In some case, when trying to display the context menu on a
pivot cell (doesn't seem to impact PIVOT.HEADER), we get a
traceback caused by the arguments of the formula take into
account in the ´getFiltersMatchingPivot`, called by the
"isVisible" property evaluation of the "set as filter" action.

These errors only rise when using a pivot with "__count" as
measure and a positional argument.

Moreover, when trying to open the context menu with a filter
defined without any field, we get another traceback.

Reproducibility

The first issue  can be reproduced with the following steps:
1. Go to the CRM app
2. Create a pivot view
3. Group the row by Country
4. "Ungroup" the columns (keep only the total)
5. Set "__count" as measure
6. Insert the pivot on a new spreadsheet
7. Edit the pivot formulas to use positional argument for country_id
8. Insert a new filter on the country field
9. Right click on a pivot cell

The second issue can be reproduced with the following steps:
1. Open a spreadsheet with a pivot
2. Add a filter related to the pivot but without any field matching
3. Right-click on a pivot cell

Fix Description

The first issue is coming from the fact we try to get the value related
to a field in the pivot formula using the 2nd and 3rd argument instead
of using the last two arguments of the formula. This is fixed by passing
to getPivotHeaderValue only the last two arguments of the pivot formula.

For the second issue, we simply check that the pivot field is defined
before looking at its name.

Related Task

task-2999181

closes odoo/odoo#102204

X-original-commit: 15e0c8aba57d4e0a8c58f288a4e96f0bc884736c
Related: odoo/enterprise#32303
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-10-05 14:25:51 +02:00
Rémi Rahir f0fc3ee7eb [IMP] spreadsheet: Lazy load xml templates
Since the split of components with their templates in dedicated file in
https://github.com/odoo/o-spreadsheet/commit/10e1a0ca, the templates were eager-loaded.

However, this had an impact on the size of the `assets_qweb` bundle.
This commit introduces the lazy-loading of the `spreadsheet.o_spreadsheet`
bundle since it is now achievable.

A followup of https://github.com/odoo/enterprise/pull/30609

task 2896049

closes odoo/odoo#102118

X-original-commit: 15af10c207d6a359a58b5778bd414ff7b543a020
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-10-04 18:06:43 +02:00
Adrien Minne ca1998fb35 [FIX] spreadsheet: fix dashboard tests
feffe7d removed the id from the chart object at export, but this id was
used to validate the dashboard data in the test. Take the figure id
insread in the tests.

X-original-commit: 3788df2fe6e3c0b62df604a1aae89b3d81c324d4
Part-of: odoo/odoo#102006
2022-10-04 08:30:43 +02:00
Rémi Rahir 8f379d8ae5 [FIX] spreadsheet: Fix Odoo chart duplication
Odoo charts have a specific need of dataSources for their runtime data
(in oppostion to standard graphs). In order to link the chart with its
datasource, we injected the chart id inside its definition in order to
be able to fetch the corresponding datasource. Unfortunately, this
approach require that we can access the chartId from anywhere which is
unfortunately not the case when we copy/cut/paste a chart. The current
implementation would copy the chart while keeping a reference to the
same datasource, thereby keeping the same data and be submitted to the
same filters as the original chart dataSource.

Note that a chart should not be aware of its own id; that is, its place
in the mapping of a plugin.

This commit changes the approach to set the dataSource inside the chart
directly through a method only available on OdooChart instances.

This problem would also arise on sheet duplication but was due to a
problem in the library itself.

task 2998207

closes odoo/odoo#101660

X-original-commit: 47f7cc08bec749301001c6c4567cafbcea8bd552
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-09-30 09:31:55 +02:00
Martin Trigaux e856beb782 [I18N] *: export 16.0 source terms
closes odoo/odoo#101659

Related: odoo/enterprise#32040
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-30 09:31:52 +02:00
stefanorigano (SRI) b633a95bb6 [IMP] web, web_editor, website, spreadsheet: use system fonts
Use system fonts for backend and web-editor's UI.
This commit removes references to proprietary fonts and allows the OS
to use the system ones. The aim is to reduce http request and the
general footprint (see enterprise counter-part).

The new font-stack:

- apple-system (San Francisco): iOS Safari, macOS Safari, macOS Firefox
- BlinkMacSystemFont (San Francisco): macOS Chrome
- Segoe UI: Windows
- Roboto: Android, Chrome OS
- Helvetica Neue: old OSX versions
- Ubuntu: Ubuntu
- Liberation Sans: Linux (others)
- Arial: Any
- sans-serif: General fallback

This was actually already introduced for the website default theme and
as a general option with [1] but it was not complete: if reaching the
need to use Roboto of the font stack, the repo Roboto was used instead
of the potential system one. It was not shown during testing with the
previous font stack. With the new one, on Ubuntu, it was revealed as
the Ubuntu font comes after Roboto.

[1]: https://github.com/odoo/odoo/commit/c0f2f670eb087991cc9a6a67f4beea5f12bd15f2

task-2995248

closes odoo/odoo#101533

X-original-commit: 9f8f8f2ef88aee746819469c918b2d31ec29d031
Related: odoo/enterprise#31985
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-29 11:13:10 +02:00
Lucas Lefèvre a3c69f2592 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/758a22f6 [FIX] chart: allow plugins to react to chart duplication
https://github.com/odoo/o-spreadsheet/commit/d8116451 [IMP] line charts: Introducing stacked line charts
https://github.com/odoo/o-spreadsheet/commit/8a428d31 [IMP] spreadsheet: Introducing Frozen panes
https://github.com/odoo/o-spreadsheet/commit/804a8a34 [IMP] notification: Add new notification type
https://github.com/odoo/o-spreadsheet/commit/733d8ecf [REV] composer: bad cursor placement on focus
https://github.com/odoo/o-spreadsheet/commit/6423a245 [FIX] collaborative: do not transform commands in other dimension

closes odoo/odoo#101396

Related: odoo/enterprise#31915
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-09-28 21:26:22 +02:00
Pierre Rousseau 24a38f2054 [FIX] spreadsheet: translate spreadsheet content
This commit dynamically translate some content in the spreadsheet.
Static translated terms are extracted from the spreadsheet data.

One might think we could translate the spreadsheet upfront, server side,
by translating the data before sending it to the client but it could lead to
unexpected behaviors though:
Let's say a chart has a translated title, if you copy-paste it from one sheet
to another, you still want the title to be translated/translatable.

In other words: manipulating things in the spreadsheet should be done on
the raw, untranslated, data.

X-original-commit: 53dc147504bfc3ddabef61a2bae8610f526bf6ac
Part-of: odoo/odoo#101120
2022-09-26 14:43:21 +02:00
Adrien Minne (adrm) 0152529bb9 [FIX] spreadsheet: traceback on copy Odoo Chart
Copying an odoo chart gave a traceback since the method `copyInSheetId` wasn't implemented in Odoo Charts.

Odoo task 2987656

closes odoo/odoo#100748

X-original-commit: c26b8ee12857253c90b62b14c0a86c60457af4c2
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Minne Adrien (adrm) <adrm@odoo.com>
2022-09-26 09:35:51 +02:00
Martin Trigaux 5150d003fd [I18N] *: export 16.0 source terms
closes odoo/odoo#101053

X-original-commit: 7d4c9d9736cc2ff0ee91dc17ea0f952c9a3dc65a
Related: odoo/enterprise#31752
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-24 15:00:56 +02:00
Pierre Rousseau 4bfaf9291e [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/739db5a3 [IMP] link: translate label
https://github.com/odoo/o-spreadsheet/commit/b29eeea3 [IMP] function: allow function name with underscore
https://github.com/odoo/o-spreadsheet/commit/33411f3e [IMP] chart: translate title and baselineDescr
https://github.com/odoo/o-spreadsheet/commit/9c22f40a [FIX] selection: do not reset selection on sheet deletion
https://github.com/odoo/o-spreadsheet/commit/d891ac1c [FIX] Selection: do not set current sheet selection to other sheets

closes odoo/odoo#100844

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-09-23 05:02:26 +02:00
Lucas Lefèvre 4c9de9b786 [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/dbe36052 [FIX] find_and_replace: select first match automatically
https://github.com/odoo/o-spreadsheet/commit/28476c9d [FIX] ClearFormat: clear format actually clears the format
https://github.com/odoo/o-spreadsheet/commit/b4dbb747 [FIX] grid: handle selectionInput modes on click events
https://github.com/odoo/o-spreadsheet/commit/179ff66d [IMP] functions: make ISTEXT/ISNUMBER/... compatible with Excel/GSheet
https://github.com/odoo/o-spreadsheet/commit/ce32cd66 [FIX] scorecard: display percentage between 0 and 0
https://github.com/odoo/o-spreadsheet/commit/44266c5b [IMP] style: add text cell wrapping option
https://github.com/odoo/o-spreadsheet/commit/9b08e99a [REF] renderer: extract font size computation
https://github.com/odoo/o-spreadsheet/commit/ebff300d [IMP] clipboard: paste on merge consistency
https://github.com/odoo/o-spreadsheet/commit/246de550 [IMP] evaluation: add error "unknown function"

closes odoo/odoo#100740

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-09-22 09:49:51 +02:00
Adrien Minne 4b06783080 [IMP] spreadsheet: dashboard filters finetuning
Improve the CSS of the global filters in dashboards

Odoo task 2988046

closes odoo/odoo#100749

X-original-commit: 629c36f9763669e500c2664ad44037d915c29b10
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-09-21 22:45:46 +02:00
Lucas Lefèvre d72fa35ced [IMP] spreadsheet_dashboard: use py test to validate dashboard data
use a python test to walk throuhg jsons instead of tours

Tours:
- you need to add one for each dashboard. It's a PITA and it doesn't scale
- they only check visible formulas since formulas are loaded only if they are in the viewport (I'm not even sure what is "visible" in chrome headless)
- they are slow
- can't check fields defined in global filters, links to odoo menu/views

`./odoo-bin --addons-path=../enterprise,./addons  -d odoo-db -u  --test-enable`

before: `59,76s user 5,78s system 29% cpu 3:43,15 total`
after: `15,12s user 1,20s system 86% cpu 18,912 total`

The Expenses dashboard was broken by https://github.com/odoo/odoo/pull/98914
But I want to merge this test right now.

Task 2980180

closes odoo/odoo#100757

X-original-commit: 17afe2987e4146b85187b31a34caf7146d5a7cf2
Related: odoo/enterprise#31598
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-09-21 21:41:48 +02:00
Martin Trigaux 1a8772769e [I18N] *: export 16.0 source terms
closes odoo/odoo#100573

Related: odoo/enterprise#31507
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-20 13:48:49 +02:00
Lucas Lefèvre 5ec97eb5a2 [FIX] spreadsheet: remove filter matching when chart is deleted
If you insert an odoo chart, match a filter with one of the
chart field, then delete the chart
=> the field matching is not removed and is still exported

The same goes for pivot and list matching when they are removed

closes odoo/odoo#100390

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-09-19 16:10:17 +02:00
Lucas Lefèvre f4b7265466 [FIX] spreadsheet: delete odoo link when chart is deleted
Create a chart and link an odoo menu to it.
Now delete the chart.
=> the link is not properly removed and is still exported

Part-of: odoo/odoo#100390
2022-09-19 16:10:16 +02:00
Lucas Lefèvre d08982684b [MOV] spreadsheet: move RecordSelector template to its own file
closes odoo/odoo#100246

Related: odoo/enterprise#31365
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-09-16 14:25:41 +02:00
Lucas Lefèvre d1160cf45a [REF] spreadsheet: rename X2ManyTagSelector component
It feels more natural with the new name;
The "X2ManyTags" things is because it used to use
a many2many tags fields under the hood.
1) It's no longer true
2) It's an implementation detail

Part-of: odoo/odoo#100246
2022-09-16 14:25:41 +02:00
Lucas Lefèvre 79b9c0e03e [REF] spreadsheet: convert record selector to wowl components
The X2ManyTagSelector component still used a legacy many2many tags
widget under the hood and an adapter layer on top.
With this commit, it uses new components

Part-of: odoo/odoo#100246
2022-09-16 14:25:41 +02:00
Pierre Rousseau af436cc93f [FIX] spreadsheet: adding a list correctly store linesNumber
Before this revision, the number of inserted lines was not saved in
the list datasource. This revision fixes that.

closes odoo/odoo#100198

Related: odoo/enterprise#31333
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-09-15 16:08:19 +02:00
Pierre Rousseau 6909640d90 [REF] spreadsheet: move migrate code from import to migration
Before this revision, the code to ensure that a list has a name was done
in the import function instead of the migration process.

Part-of: odoo/odoo#100198
2022-09-15 16:08:19 +02:00
Pierre Rousseau c873acc6dd [REF] spreadsheet: rename plugins
Before this revision, it was quite confusing to know which plugin was
the Core one and the UI one.
Having {Pivot|List}CorePlugin and {Pivot|List}UIPlugin is self explanatory.

Part-of: odoo/odoo#100198
2022-09-15 16:08:18 +02:00
Pierre Rousseau 7101ebb9f7 [FIX] spreadsheet: correctly apply filter on chart in dashboard mode
Before this commit, a global filter did not update the domain of a chart
in dashboard mode.

Task-id 2961578

closes odoo/odoo#100047

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-09-15 10:03:00 +02:00
Gorash 39ea7a1fab [IMP] web/all: XML templates are now declared into the python manifest.
Adapt all manifest, split some XML file and update JavaScript files.

Part-of: odoo/odoo#95500
2022-09-14 20:25:01 +02:00
Pierre Rousseau ad2701d216 [MOV] spreadsheet: move template code to enterprise
Spreadsheet template feature is a feature enterprise but some part of
the code is located in community following a split in the modules.
The code is moved where it belongs.

closes odoo/odoo#100120

Related: odoo/enterprise#31292
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-09-14 16:18:14 +02:00
Adrien Minne ec8f2f6246 [IMP] spreadsheet: add last 90/180 days gloabl filters
Add a relative global filter for the last 90 days, and one for the last
180 days.

Odoo task 2968572

closes odoo/odoo#100085

Related: odoo/enterprise#30949
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-09-14 13:39:51 +02:00
Rémi Rahir 19295506fd [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/fd4cd7cf [FIX] style: use cell computed style to compute the text width
https://github.com/odoo/o-spreadsheet/commit/d0f02506 [IMP] link: do not display hover in dashboard mode
https://github.com/odoo/o-spreadsheet/commit/adc180a9 [IMP] InteractiveTests: Moved sort interactive tests to ui helper tests
https://github.com/odoo/o-spreadsheet/commit/e2f1f436 [IMP] menu_items_actions: default chart title
https://github.com/odoo/o-spreadsheet/commit/f19fdbfa [FIX] composer: ctrl clears topbar composer selection
https://github.com/odoo/o-spreadsheet/commit/c4ec1d78 [IMP] selection: dont select chart when it's updated
https://github.com/odoo/o-spreadsheet/commit/14b899ab [FIX] CF: Fix preview test for single color cf
https://github.com/odoo/o-spreadsheet/commit/5de0414b [FIX] charts: duplicating a sheet preserves figure dimensions
https://github.com/odoo/o-spreadsheet/commit/fe2e93f0 [FIX] scorecard: use evaluated format for baseline value

closes odoo/odoo#100049

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-09-13 10:30:26 +02:00
Lucas LefèvreandPierre Rousseau cb5cca73a8 [ADD] spreadsheet_dashboard: introduce spreadsheet based dashboards
Our reporting dashboards are too tedious to use for the average user, and
doesn't allow for edition or advanced computations.

Using spreadsheet formulas allows almost endless possibilities.

Task-id 2799682

Part-of: odoo/odoo#97606
Co-authored-by: Lucas Lefèvre <lul@odoo.com>
Co-authored-by: Pierre Rousseau <pro@odoo.com>
2022-09-10 02:54:53 +02:00