[base_rest] JavaScript asset paths incorrect causing 404 errors after v16→v18 migration
Module
base_rest
Describe the bug
The __manifest__.py file contains incorrect JavaScript asset paths that reference non-existent files, causing 404 errors in the frontend and breaking Swagger UI functionality. This prevents proper loading of JavaScript assets and causes uncaught promise errors in production.
The manifest references two non-existent JavaScript files:
base_rest/static/src/js/swagger_ui.js (incorrect path)
base_rest/static/src/js/swagger.js (file does not exist)
The actual JavaScript file is located at: base_rest/static/src/js/components/swagger_ui.js
To Reproduce
Affected versions: 18.0.1.1.1
Steps to reproduce the behavior:
- Install
base_rest module on Odoo 18.0
- Access any frontend page (e.g., website homepage)
- Open browser developer console
- Check for JavaScript errors in console and network tab
- Observe 404 errors for missing asset files:
Could not get content for base_rest/static/src/js/swagger_ui.js.
Could not get content for base_rest/static/src/js/swagger.js.
Expected behavior
JavaScript assets should load without errors. The web.assets_frontend should only reference existing files:
"assets": {
"web.assets_frontend": [
"base_rest/static/src/scss/base_rest.scss",
"base_rest/static/src/js/components/swagger_ui.js", # Correct path
],
},
Instead of the current incorrect configuration:
"assets": {
"web.assets_frontend": [
"base_rest/static/src/scss/base_rest.scss",
"base_rest/static/src/js/swagger_ui.js", # ❌ Wrong path
"base_rest/static/src/js/swagger.js", # ❌ File doesn't exist
],
},
Additional context
- OS: macOS Darwin 24.6.0
- Python version: 3.12
- Odoo version: 18.0
- Issue occurred after: Migration from Odoo v16 to v18
- Browser: Tested on Chrome, Firefox, Safari
- Impact: Prevents Swagger UI from loading, causes website form submission failures, and generates uncaught JavaScript promise errors
- File structure verification:
base_rest/static/src/
├── js/
│ └── components/
│ └── swagger_ui.js # ✅ Only existing JS file
└── scss/
└── base_rest.scss # ✅ Exists and correctly referenced
This appears to be a result of code reorganization during the v16→v18 migration where the JavaScript file was moved to a components/ subdirectory but the manifest was not updated accordingly.
[base_rest] JavaScript asset paths incorrect causing 404 errors after v16→v18 migration
Module
base_rest
Describe the bug
The
__manifest__.pyfile contains incorrect JavaScript asset paths that reference non-existent files, causing 404 errors in the frontend and breaking Swagger UI functionality. This prevents proper loading of JavaScript assets and causes uncaught promise errors in production.The manifest references two non-existent JavaScript files:
base_rest/static/src/js/swagger_ui.js(incorrect path)base_rest/static/src/js/swagger.js(file does not exist)The actual JavaScript file is located at:
base_rest/static/src/js/components/swagger_ui.jsTo Reproduce
Affected versions: 18.0.1.1.1
Steps to reproduce the behavior:
base_restmodule on Odoo 18.0Expected behavior
JavaScript assets should load without errors. The
web.assets_frontendshould only reference existing files:Instead of the current incorrect configuration:
Additional context
This appears to be a result of code reorganization during the v16→v18 migration where the JavaScript file was moved to a
components/subdirectory but the manifest was not updated accordingly.