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
closesodoo/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>
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
closesodoo/odoo#104304
X-original-commit: fd88fc1bbad4c0cdb44cf634b6a5621eb7597e0d
Related: odoo/enterprise#33322
Signed-off-by: David Beguin (dbe) <dbe@odoo.com>
Make the xlsx import display warning for things that couldn't be imported,
but only if Odoo is in debug mode.
Odoo task 3035674
closesodoo/odoo#103671
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
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
closesodoo/odoo#103270
X-original-commit: 27e58050aacf0ae525f1e1b6fec7b69133781312
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Signed-off-by: Minne Adrien (adrm) <adrm@odoo.com>
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
closesodoo/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>
Field `measure` in `PIVOT.HEADER` functions are not actual res.model
fields but are used to display the fieldName of the measured field.
closesodoo/odoo#102979
X-original-commit: 6de4b2c4c058babb4e3ee0b60212aa4a9ccec119
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
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
closesodoo/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>
After this revision, the core and ui plugins are clearly identified.
X-original-commit: c2aea83092cda1c95ebbef423ce265451f67babe
Part-of: odoo/odoo#102688
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
Fixed the style of some filters inputs (namely date filters) and
added placeholders for dashboard mode.
task 2995579
closesodoo/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>
Allow users to use stacked line charts. The chart.js configuration
is mimicking the one inside Odoo community.
task 2888350
closesodoo/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>
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
closesodoo/odoo#102204
X-original-commit: 15e0c8aba57d4e0a8c58f288a4e96f0bc884736c
Related: odoo/enterprise#32303
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
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
closesodoo/odoo#102118
X-original-commit: 15af10c207d6a359a58b5778bd414ff7b543a020
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
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
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
closesodoo/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>
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
closesodoo/odoo#101533
X-original-commit: 9f8f8f2ef88aee746819469c918b2d31ec29d031
Related: odoo/enterprise#31985
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
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
Copying an odoo chart gave a traceback since the method `copyInSheetId` wasn't implemented in Odoo Charts.
Odoo task 2987656
closesodoo/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>
Improve the CSS of the global filters in dashboards
Odoo task 2988046
closesodoo/odoo#100749
X-original-commit: 629c36f9763669e500c2664ad44037d915c29b10
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
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
closesodoo/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>
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
closesodoo/odoo#100390
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
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
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
Before this revision, the number of inserted lines was not saved in
the list datasource. This revision fixes that.
closesodoo/odoo#100198
Related: odoo/enterprise#31333
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
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
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
Before this commit, a global filter did not update the domain of a chart
in dashboard mode.
Task-id 2961578
closesodoo/odoo#100047
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
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.
closesodoo/odoo#100120
Related: odoo/enterprise#31292
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Add a relative global filter for the last 90 days, and one for the last
180 days.
Odoo task 2968572
closesodoo/odoo#100085
Related: odoo/enterprise#30949
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
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>