Attempting to export items to CSV or XSLX format (e.g. products list) fails with the following error message in the front end: ``` UncaughtClientError > TypeError Uncaught Javascript Error > invalid parameter format TypeError: invalid parameter format parse@https://erp-stage.poype.io/web/assets/1563-d1f4fe4/web.assets_common.min.js:4547:45 get_file/xhr.onload@https://erp-stage.poype.io/web/assets/1563-d1f4fe4/web.assets_common.min.js:4678:241 ``` No error appears in the server's log. The same issue is reported upstream: https://github.com/odoo/odoo/issues/94110. A comment there points that the reason is incompatible version of `Werkzeug` module. https://github.com/odoo/odoo/blob/15.0/requirements.txt lists `Werkzeug==0.16.1` dependency for Python 3.9 and lower. This port applies corrections to some Odoo modules to work with the current 2.* version of Werkzeug. To fix this issue, either adjustments need to be similarly applied to the relevant js generation code, or the whole thing reverted to use Werkzeug 0.16.
(In reply to Dimitri Kaparis from comment #0) Could you test change line into js file instead of delete it? Look at https://github.com/odoo/odoo/issues/103232 it is a similar issue on odoo 16 but it replace the "if" line to the following: (index == -1 && index !== string.length) Test it and tell me if it works for you
(In reply to Jose Alonso Cardenas Marquez from comment #1) The above issue references file `addons/web/static/src/core/network/download.js` line 225. The file is installed by the port at `/usr/local/lib/python3.9/site-packages/odoo/addons/web/static/src/core/network/download.js`. The mentioned condition is on line 220, the whole block is: ``` if (index !== -1 && index !== string.length) { throw new TypeError("invalid parameter format"); } ``` As directed, I changed the condition line to: `if (index == -1 && index !== string.length) {` This did not solve the issue for my install and the error persists, also after rebooting the server and clearing cache and site data of the browser.
(In reply to Dimitri Kaparis from comment #2) I know it is a download.js file but the same function check/validation is used by addons/web/static/src/legacy/js/libs/content-disposition.js I mean you must change this similar line at content-disposition.js too instead of remove them
(In reply to Jose Alonso Cardenas Marquez from comment #3) Changing the same condition in file `/usr/local/lib/python3.9/site-packages/odoo/addons/web/static/src/legacy/js/libs/content-disposition.js`, line 214 solved the issue for me. A quick test with that change shows item exports are running successfully.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=5870c06b97934edd150809f8c75cff0d2345fd29 commit 5870c06b97934edd150809f8c75cff0d2345fd29 Author: Jose Alonso Cardenas Marquez <acm@FreeBSD.org> AuthorDate: 2022-11-15 16:44:46 +0000 Commit: Jose Alonso Cardenas Marquez <acm@FreeBSD.org> CommitDate: 2022-11-15 16:47:03 +0000 finance/odoo: Fix issues with latest version of py-werkzeug - Fix path to odoo.conf file PR: 267331 266478 Reported by: Dimitri Kaparis <dimitri .at. kaparis.name> finance/odoo/Makefile | 5 ++++- finance/odoo/files/odoo.in | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-)
Committed thanks!