-
-
Notifications
You must be signed in to change notification settings - Fork 66
[18.0][MIG] spreadsheet_oca: Migration to 18.0 #65
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
Conversation
4ba6790 to
c493841
Compare
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.
| spreadsheet_model.dispatch("ADD_PIVOT", { | ||
| pivotId: dataSourceId, | ||
| definition: pivot_info, | ||
| }); | ||
| const dataSource = spreadsheet_model.getters.getPivotDataSource(dataSourceId); | ||
| await dataSource.load(); |
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.
Hi @odoowired,
When installing your changes, I get an error over here:
UncaughtPromiseError > OwlError
Uncaught Promise > An error occured in the owl lifecycle (see this Error's "cause" property)
Occured on localhost:8069 on 2025-08-20 08:13:15 GMT
OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)
OwlError@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:728:1
handleError@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:972:101
handleError@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1619:29
initiateRender@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1064:19
async*createComponent/<@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1617:80
template@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js line 1574 > Function:12:21
_render@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:996:96
render@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:995:6
initiateRender@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1065:47
async*createComponent/<@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1617:80
template@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js line 1574 > Function:9:27
_render@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:996:96
render@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:995:6
initiateRender@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1065:47
async*createComponent/<@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1617:80
template@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js line 1574 > Function:14:43
_render@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:996:96
render@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:995:6
render@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1073:56
async*render@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1120:33
setup/this.onActionManagerUpdate@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:9933:101
trigger@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:764:63
_updateUI@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:10046:133
_executeClientAction@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:10062:181
async*doAction@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:10077:192
async*_executeClientAction@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:10062:275
async*doAction@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:10077:192
async*doActionButton@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:10088:255
async*execute@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:9690:314
async*executeButtonCallback@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:9683:40
onClickViewButton@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:9693:487
Caused by: TypeError: can't access property "measures", definition is undefined
checkDuplicatedMeasureIds@http://localhost:8069/web/assets/a83aebc/spreadsheet.o_spreadsheet.min.js:8275:63
allowDispatch@http://localhost:8069/web/assets/a83aebc/spreadsheet.o_spreadsheet.min.js:8236:347
checkDispatchAllowedCoreCommand/results<@http://localhost:8069/web/assets/a83aebc/spreadsheet.o_spreadsheet.min.js:11749:96
checkDispatchAllowedCoreCommand@http://localhost:8069/web/assets/a83aebc/spreadsheet.o_spreadsheet.min.js:11749:73
checkDispatchAllowed@http://localhost:8069/web/assets/a83aebc/spreadsheet.o_spreadsheet.min.js:11747:73
dispatch@http://localhost:8069/web/assets/a83aebc/spreadsheet.o_spreadsheet.min.js:11755:41
importDataPivot@http://localhost:8069/web/assets/a83aebc/spreadsheet.o_spreadsheet.min.js:12954:661
importData@http://localhost:8069/web/assets/a83aebc/spreadsheet.o_spreadsheet.min.js:12958:84
setup/<@http://localhost:8069/web/assets/a83aebc/spreadsheet.o_spreadsheet.min.js:12922:1160
async*initiateRender/<@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1063:80
initiateRender@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1063:69
createComponent/<@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1617:80
template@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js line 1574 > Function:12:21
_render@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:996:96
render@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:995:6
initiateRender@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1065:47
async*createComponent/<@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1617:80
template@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js line 1574 > Function:9:27
_render@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:996:96
render@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:995:6
initiateRender@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1065:47
async*createComponent/<@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1617:80
template@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js line 1574 > Function:14:43
_render@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:996:96
render@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:995:6
render@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1073:56
async*render@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:1120:33
setup/this.onActionManagerUpdate@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:9933:101
trigger@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:764:63
_updateUI@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:10046:133
_executeClientAction@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:10062:181
async*doAction@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:10077:192
async*_executeClientAction@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:10062:275
async*doAction@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:10077:192
async*doActionButton@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:10088:255
async*execute@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:9690:314
async*executeButtonCallback@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:9683:40
onClickViewButton@http://localhost:8069/web/assets/2e8099d/web.assets_web.min.js:9693:487
By looking deeper into the code, I think "ADD_PIVOT" need the complete pivot object, which is why this error is triggered.
And I'm not sure the line after is still valid, i.e. I don't find any getPivotDataSource method anymore in Odoo 18
To reproduce the error, I just tried to insert a pivot view with some measures in a dashboard and the error pops up.
PS : I locally rollbacked some of your changes to match previous formatting to better see the real changes. I can share that to you if you want to merge it that way. I don't know what is the standard over that
| var message = _l("Add to spreadsheet"); | ||
| if (this.containsDuplicatedGroupBys()) { | ||
| message = _l("Duplicated groupbys in pivot are not supprted"); | ||
| } else if (this.isComparingInfo()) { | ||
| message = _l("Comparisons in pivot are not supprted"); |
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.
To fix @tarteo error, you can do this
| var message = _l("Add to spreadsheet"); | |
| if (this.containsDuplicatedGroupBys()) { | |
| message = _l("Duplicated groupbys in pivot are not supprted"); | |
| } else if (this.isComparingInfo()) { | |
| message = _l("Comparisons in pivot are not supprted"); | |
| var message = _t("Add to spreadsheet"); | |
| if (this.containsDuplicatedGroupBys()) { | |
| message = _t("Duplicated groupbys in pivot are not supprted"); | |
| } else if (this.isComparingInfo()) { | |
| message = _t("Comparisons in pivot are not supprted"); |
After updating the import
import {_t} from "@web/core/l10n/translation";
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.
@TheToto42 Thanks, I will add it now :)
With this change we are adding an extra layer of security. Without it, any user was able to sniff how all happened using something like:
const any_spreadsheet_id = 1234;
const channel = "spreadsheet_oca;spreadsheet.spreadsheet;" + any_spreadsheet_id;
bus_service.addChannel(channel);
bus_service.addEventListener("spreadsheet_oca", (message) => /* every revision arrives here */
With the change, we verify the access to the model with a similar logic to `web_editor` fields
…init logic to set default locale of new sheets
Currently translated at 100.0% (102 of 102 strings) Translation: spreadsheet-17.0/spreadsheet-17.0-spreadsheet_oca Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-17-0/spreadsheet-17-0-spreadsheet_oca/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: spreadsheet-17.0/spreadsheet-17.0-spreadsheet_oca Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-17-0/spreadsheet-17-0-spreadsheet_oca/
Currently translated at 100.0% (119 of 119 strings) Translation: spreadsheet-17.0/spreadsheet-17.0-spreadsheet_oca Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-17-0/spreadsheet-17-0-spreadsheet_oca/it/
c493841 to
da03df0
Compare
|
Hi @odoowired, thanks for your contribution to this. After testing your PR I also observed similar issues and have a partially working prototype that fixes some of them. Fixed
Issues remaining
|
|
@chrisandrewmann Thanks, I will include them. are you for some luck in the OCA days today or tomorrow? |
@odoowired I've fixed the Pivot date group-by issue. |
|
@odoowired @tarteo Don't worry about doing anything with this. I've been busy over the last few days and have a fully working prototype with all previous issues solved, and a few new improvements added. Also have a version of spreadsheet_dashboard_oca which adds the ability to "Add to Dashboard" from the spreadsheet itself. |
|
Please publish it, as we are waiting for a fully functional one. |
da03df0 to
6e24fe4
Compare
6e24fe4 to
b123d41
Compare
|
@chrisandrewmann Got some delays trying to fix on page refresh. But looks like everything is working. Let me know if you have other fixes that I could add here |
There's too many changes to do it that way. I'll have to do a new PR and you can compare them. |
|
New PR submitted #72 |
|
@pedrobaeza @etobella This PR can be closed now since #72 has been merged please? |



No description provided.