Conversation
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
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% (102 of 102 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/
|
Thanks @etobella. In spreadsheet_oca on Community V16 (and V17 Enterprise), you are able go to "Format > Number > Custom currency", to set a currency other than USD. On Enterprise you do it by going to File > Settings and changing the locale: |
CarlosRoca13
left a comment
There was a problem hiding this comment.
Thanks @etobella! Can you execute pre-commit?
CarlosRoca13
left a comment
There was a problem hiding this comment.
When I tried to add a dynamic table from a pivot view I'm getting next error:
OwlError: The following error occurred in onWillStart: "row.map is not a function"
Error
at wrapError (http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/web.assets_web.js:10180:23) (/web/static/lib/owl/owl.js:2631)
at onWillStart (http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/web.assets_web.js:10224:29) (/web/static/lib/owl/owl.js:2675)
at SpreadsheetRenderer.setup (http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:69959:5) (/spreadsheet_oca/static/src/spreadsheet/bundle/spreadsheet_renderer.esm.js:89)
at new ComponentNode (http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/web.assets_web.js:9928:28) (/web/static/lib/owl/owl.js:2379)
at http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/web.assets_web.js:13524:28 (/web/static/lib/owl/owl.js:5975)
at ActionSpreadsheetOca.template (eval at compile (http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/web.assets_web.js:13248:20), <anonymous>:16:16) (/web/static/lib/owl/owl.js:5699)
at Fiber._render (http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/web.assets_web.js:9278:38) (/web/static/lib/owl/owl.js:1729)
at Fiber.render (http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/web.assets_web.js:9270:18) (/web/static/lib/owl/owl.js:1721)
at ComponentNode.initiateRender (http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/web.assets_web.js:9950:23) (/web/static/lib/owl/owl.js:2401)
Caused by: TypeError: row.map is not a function
at http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:67186:24 (/spreadsheet/static/src/pivot/pivot_table.js:85)
at Array.map (<anonymous>)
at new SpreadsheetPivotTable (http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:67182:27) (/spreadsheet/static/src/pivot/pivot_table.js:81)
at PivotCorePlugin.handle (http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:67828:31) (/spreadsheet/static/src/pivot/plugins/pivot_core_plugin.js:91)
at Model.dispatchToHandlers (http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:57848:25) (/spreadsheet/static/src/o_spreadsheet/o_spreadsheet.js:57731)
at http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:57792:30 (/spreadsheet/static/src/o_spreadsheet/o_spreadsheet.js:57675)
at StateObserver.recordChanges (http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:55841:13) (/spreadsheet/static/src/o_spreadsheet/o_spreadsheet.js:55724)
at Model.dispatch (http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:57788:62) (/spreadsheet/static/src/o_spreadsheet/o_spreadsheet.js:57671)
at ActionSpreadsheetOca.importDataPivot (http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:70316:23) (/spreadsheet_oca/static/src/spreadsheet/bundle/spreadsheet_action.esm.js:250)
at async ActionSpreadsheetOca.importData (http://oca-spreadsheet-17-0-pr59-1b4cf23a9dc5.runboat.odoo-community.org/web/assets/debug/spreadsheet.o_spreadsheet.js:70333:7) (/spreadsheet_oca/static/src/spreadsheet/bundle/spreadsheet_action.esm.js:267)
I have set next configuration to get the error:
|
Ref #59 (comment) I've got a working POC which fixes this. How do you want me to provide it? @etobella
|
|
Make a PR an I can review it |
|
@CarlosRoca13 The error is related to some functionality that was added to limit the rows and columns. I fixed it for rows, but the same patch is not working for columns. I will investigate why 😢 |
Set default currency for new sheets. Fix crash on insertDynamicPivot. Fix typos (noficiation > notification). Add feature to delete pivots and lists from sheet via button on sidebars.
198dfad to
8ace503
Compare
chrisandrewmann
left a comment
There was a problem hiding this comment.
Crashes when adding new chart to sheet
| get menuProps() { | ||
| const menu = this.env.model.getters.getChartOdooMenu(this.props.figureId); | ||
| var result = { | ||
| record: this.record, |
There was a problem hiding this comment.
Causes crash when adding a new chart to sheet.
Replace with fieldString: _t("Menu Items"),
| import {Many2XAutocomplete} from "@web/views/fields/relational_utils"; | ||
| import {patch} from "@web/core/utils/patch"; | ||
| import {useService} from "@web/core/utils/hooks"; | ||
|
|
There was a problem hiding this comment.
Add import {_t} from "@web/core/l10n/translation";
| import {Domain} from "@web/core/domain"; | ||
| import {Many2XAutocomplete} from "@web/views/fields/relational_utils"; | ||
| import {useService} from "@web/core/utils/hooks"; | ||
|
|
There was a problem hiding this comment.
Add import {_t} from "@web/core/l10n/translation";
| get menuProps() { | ||
| const menu = this.env.model.getters.getChartOdooMenu(this.props.figureId); | ||
| var result = { | ||
| record: this.record, |
There was a problem hiding this comment.
Causes crash when adding a new chart to sheet.
Replace with fieldString: _t("Menu Items"),
| class SpreadsheetDownloadXLSX(Controller): | ||
| @route("/spreadsheet/xlsx", type="http", auth="user", methods=["POST"]) | ||
| def download_spreadsheet_xlsx(self, zip_name, files, **kw): | ||
| files = json.loads(files) |
There was a problem hiding this comment.
Crashes when exporting to XLSX when filestorage object not JSON.
Add this line above:
if hasattr(files, "read"): files = files.read().decode("utf-8")
chrisandrewmann
left a comment
There was a problem hiding this comment.
Downloading XLSX crashes, small amendment to download_spreadsheet_xlsx
|
@etobella I've been using the module on my own environment, using it daily to put it through it's paces, have had to make several other changes today, but i'm aware they are stacking up on this PR along with all my previous suggestions. Not sure if you managed to fix the error that @CarlosRoca13 reported about rows/columns mapping? So far it's working really well, only area I'm not able to figure out is how to modernise the date filter to incorporate the V17 changes (From/To range and newly reworked fixed periods). But it's working fine as is for now. |
|
Yes, please, supersede this PR creating one respecting the current work, and adding yours in top. |
Thanks @pedrobaeza |
|
Fetch this branch, add your changes on a commit on top, and push to your fork, proposing a new PR and mentioning this one. |
|
Superseded by #60 |



Finishes migration of #40