Closed chrisandrewmann closed 1 month ago
Please rebase instead of doing pull for avoiding merge commits here in the PR.
Is this ready to be reviewed?
Yes it is.
Trying on runboat, I get this error trying to add a pivot to an spreadsheet:
OwlError: The following error occurred in onWillStart: "subTreeKeys.forEach is not a function"
OwlError@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:16490:5 (/web/static/lib/owl/owl.js:87)
wrapError@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:19008:23 (/web/static/lib/owl/owl.js:2605)
onWillStart@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:19051:29 (/web/static/lib/owl/owl.js:2648)
setup@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:53565:20 (/spreadsheet_oca/static/src/spreadsheet/bundle/spreadsheet_renderer.esm.js:92)
ComponentNode@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:18760:28 (/web/static/lib/owl/owl.js:2357)
createComponent/<@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:22172:28 (/web/static/lib/owl/owl.js:5769)
template@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js line 21943 > Function:16:21 (/web/static/lib/owl/owl.js:5540)
_render@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:18125:38 (/web/static/lib/owl/owl.js:1722)
render@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:18117:18 (/web/static/lib/owl/owl.js:1714)
initiateRender@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:18782:23 (/web/static/lib/owl/owl.js:2379)
Caused by: TypeError: subTreeKeys.forEach is not a function
_getSpreadsheetRows@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:51191:21 (/spreadsheet/static/src/pivot/pivot_model.js:589)
getTableStructure@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:50983:27 (/spreadsheet/static/src/pivot/pivot_model.js:381)
getTableStructure@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:50234:28 (/spreadsheet/static/src/pivot/pivot_data_source.js:121)
importDataPivot@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:53871:51 (/spreadsheet_oca/static/src/spreadsheet/bundle/spreadsheet_action.esm.js:196)
Trying on runboat, I get this error trying to add a pivot to an spreadsheet:
OwlError: The following error occurred in onWillStart: "subTreeKeys.forEach is not a function" OwlError@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:16490:5 (/web/static/lib/owl/owl.js:87) wrapError@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:19008:23 (/web/static/lib/owl/owl.js:2605) onWillStart@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:19051:29 (/web/static/lib/owl/owl.js:2648) setup@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:53565:20 (/spreadsheet_oca/static/src/spreadsheet/bundle/spreadsheet_renderer.esm.js:92) ComponentNode@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:18760:28 (/web/static/lib/owl/owl.js:2357) createComponent/<@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:22172:28 (/web/static/lib/owl/owl.js:5769) template@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js line 21943 > Function:16:21 (/web/static/lib/owl/owl.js:5540) _render@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:18125:38 (/web/static/lib/owl/owl.js:1722) render@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:18117:18 (/web/static/lib/owl/owl.js:1714) initiateRender@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:18782:23 (/web/static/lib/owl/owl.js:2379) Caused by: TypeError: subTreeKeys.forEach is not a function _getSpreadsheetRows@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:51191:21 (/spreadsheet/static/src/pivot/pivot_model.js:589) getTableStructure@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:50983:27 (/spreadsheet/static/src/pivot/pivot_model.js:381) getTableStructure@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:50234:28 (/spreadsheet/static/src/pivot/pivot_data_source.js:121) importDataPivot@http://oca-spreadsheet-16-0-pr34-0671a140d9e4.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:53871:51 (/spreadsheet_oca/static/src/spreadsheet/bundle/spreadsheet_action.esm.js:196)
Strange, just tried it and can't reproduce on Runboat. Maybe try again and clear cache as I rebased and force pushed
@pedrobaeza OK I'll test in Firefox too. Regards deleting the cells, I'm not sure how to but figured it's not bad to leave them in place for manual deletion as it behaves the same as enterprise when deleting.
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.
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?