-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IMP] spreadsheet_oca: Add ability to delete pivots and lists via button, set name on new pivots #34
Conversation
Please rebase instead of doing pull for avoiding merge commits here in the PR. |
fb1d611
to
0671a14
Compare
Is this ready to be reviewed? |
Yes it is. |
Trying on runboat, I get this error trying to add a pivot to an spreadsheet:
|
Strange, just tried it and can't reproduce on Runboat. Maybe try again and clear cache as I rebased and force pushed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems a problem of my Firefox browser. Trying on Chrome, it's working. Tried the new option. It works, although the cells get with #ERROR
after deleting the pivot. Shouldn't they be emptied?
@pedrobaeza |
Have tested in Firefox locally with no issues. Just rebased again as automated translations meant it was behind again. Also i've made a small amendment by setting the Pivot name, otherwise it was "Undefined" which makes no sense as it's hard to identify them apart. |
When adding a pivot table to a spreadsheet, it does not maintain the specified order because the sortedColumn option is not being completed. Steps to reproduce the issue: 1. Go to a pivot table 2. Change the default order 3. Add to the spreadsheet The added table will not have preserved the order.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_oca Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_oca/
…ture order of fields
The error is happening because the dashboard where the data has to be added is not being showed. With this changes the field to define the dashboard is required and is showed. Added a way to limit the search to the dashboards that can be edited
On dashboards exists tables that are updated dynamically, with this changes we have the option to generate this dynamic tables using the pivot inserter. Added a button to duplicate and change to dynamic table the selected table on spreadsheet editor. If a table with multiple row goups generated, the way to generate the dynamic table will be set the number of rows for each level of indentation. Example: 2 rowGroupBys 3 number of rows - val1 - subval1.1 - subval1.2 - subval1.3 - val2 - subval2.1 - subval2.2 - subval2.3 - val3 - subval3.1 - subval3.2 - subval3.3
Since this changes the field datasource_name does not work with tree and graph. Now the datasource_name is set as data name for the created data. Furthermore, the capability to create dynamic tables has no sense on tree and graph, so it has been limited for pivots.
Currently translated at 100.0% (16 of 16 strings) Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_dashboard_oca Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_dashboard_oca/it/
Currently translated at 100.0% (95 of 95 strings) Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_oca Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_oca/it/
Currently translated at 100.0% (16 of 16 strings) Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_dashboard_oca Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_dashboard_oca/pt/
Currently translated at 100.0% (95 of 95 strings) Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_oca Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_oca/pt/
translation terms
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_oca Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_oca/
With these changes, we have added the ability to make the columns dynamic, just as is done with the rows. To add this type of table, we will need to select the dynamic columns option and choose the number of columns to insert. Keep in mind that if multiple column levels are selected, the chosen number will apply to each of these levels. In addition to this, the wizard that opens with the spreadsheet button has been updated to allow us to choose the type of dynamism we expect in the inserted table.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_oca Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_oca/
Currently translated at 100.0% (99 of 99 strings) Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_oca Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_oca/it/
Currently translated at 63.6% (63 of 99 strings) Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_oca Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_oca/fr/
If any module males a primary template from the ones where the button is added, the button wasn't be shown previously. That's because the inheritance and load order works in OWL. The way to fix this is to make this load order deterministic specifying to be loaded after the corresponding template for being taken into account for primary views. This also required to split the templates file into several ones.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_oca Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_oca/
Steps to reproduce the error: 1. Go to a pivot 2. Remove all groups of columns to set only the measure 3. Add the pivot to a spreadsheet with dynamic columns and a number of columns An error will be thrown
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_oca Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_oca/
Currently translated at 100.0% (101 of 101 strings) Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_oca Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_oca/it/
Incorrect rebasing it seems |
Currently there is no way to delete pivots or lists in the GUI after creation. Pivots are also created with name "undefined".
I added a button and relevant methods to delete, but couldn't find a way to programmatically close the sidepanel without causing it to crash due to OWL lifecycle error, when using closeSidePanel()
Only solution I found was to force the "filter" sidebar to load in place after deletion of pivot /list using:
this.env.openSidePanel("FilterPanel", {});
Otherwise it works, but maybe someone with more OWL knowledge can improve.
Also added a name for newly created pivots, using the title.
Comments welcome.
Future note: I noticed that community is missing a way to rename Pivots, something Enterprise has. Maybe good for future?