Skip to content

Odoo18 upgrade - #31

Open
marcos-mendez wants to merge 1 commit into
turnkeylinux-apps:masterfrom
popsolutions:odoo18-upgrade
Open

Odoo18 upgrade#31
marcos-mendez wants to merge 1 commit into
turnkeylinux-apps:masterfrom
popsolutions:odoo18-upgrade

Conversation

@marcos-mendez

@marcos-mendez marcos-mendez commented Mar 16, 2026

Copy link
Copy Markdown

Upgrade Odoo appliance from v16 to v18

Summary

This PR upgrades the Odoo TurnKey appliance from Odoo 16 (Debian backports) to Odoo 18 (official nightly repository), with production-optimized configuration and WebSocket support.

What changed

Installation source

  • Before: odoo-16 package from bookworm-backports
  • After: odoo package from https://nightly.odoo.com/18.0/nightly/deb/
  • Updates are now available via standard apt-get upgrade

New features

  • WebSocket proxy via mod_proxy_wstunnel — required for Odoo 18 live chat, Discuss module, and real-time notifications
  • Custom addons directory at /opt/odoo/custom-addons — makes it easy to install OCA modules without touching system paths
  • rtlcss installed globally — needed for right-to-left language support
  • wkhtmltopdf 0.12.6 — patched QT version for proper PDF report generation with headers/footers

Configuration improvements (odoo.conf)

  • proxy_mode = True — proper header handling behind Apache
  • workers = 2 — multi-process mode (enables gevent for WebSocket)
  • gevent_port = 8072 — dedicated port for WebSocket/longpolling
  • Memory limits and timeouts tuned for typical TurnKey deployments
  • logrotate = True

Apache config

  • Added ProxyPass /websocket ws://127.0.0.1:8072/websocket for WebSocket
  • HTTP → HTTPS redirect
  • Proper X-Forwarded-Proto and X-Forwarded-Port headers

Inithook (odoo.py)

  • Confirmed compatibility with Odoo 18's pbkdf2_sha512 password hashing
  • Added systemctl restart odoo after password change to ensure it takes effect
  • Minor cleanup

Requirements met

Requirement Status
Python 3.10+ ✅ Python 3.11 (Bookworm native)
PostgreSQL 12+ ✅ PostgreSQL 15 (Bookworm native)
Debian Bookworm ✅ TurnKey v18.x base
wkhtmltopdf 0.12.6 ✅ Installed from GitHub releases

Testing

Tested via Docker container simulating the TurnKey build process:

  • Odoo 18 starts and serves the login page
  • Database TurnkeylinuxExample created with base modules
  • WebSocket endpoint (/websocket) responds
  • Adminer accessible on port 12322
  • apt-get upgrade updates Odoo from nightly repo

Future considerations

  • Nginx as reverse proxy: We also tested an Nginx-based configuration which provides better performance for WebSocket and static file caching. Happy to contribute that as a follow-up if there's interest (see discussion in the forums).
  • Trixie (Debian 13): All changes are forward-compatible. When TurnKey v19 ships, the only adjustment needed is the php-fpm socket path.

Related


Special thanks to @JedMeister and @UncleDan for the existing v18.x appliance work.

Contribution by Marcos Méndez @ POPSOLUTIONS

Major changes:
- Odoo 18 from official nightly apt repo (was v16 from backports)
- Added WebSocket proxy support for live chat/notifications
- Updated odoo.conf with production-optimized defaults
- Added /opt/odoo/custom-addons for OCA/custom modules
- Updated inithook for Odoo 18 password hashing
- Installed rtlcss and wkhtmltopdf 0.12.6
- Updated README and changelog
@marcos-mendez marcos-mendez reopened this Mar 16, 2026
@marcos-mendez

Copy link
Copy Markdown
Author

@JedMeister This allow odoo 18 in debian 12. Im starting to work to helpyou on that matter to be able to work on trixie

Big hug

@l-arnold

Copy link
Copy Markdown

Thanks for this work @marcos-mendez — I haven't tested yet but have reviewed the code carefully across both PRs. Should we discuss how we bring the best of both (Odoo 16 and Odoo 18 targeted) forward as we flesh out the tkl19 build? See the related discussion at turnkeylinux/tracker#2111.
Would you like me to do any testing on this in the meantime?

(same comment going also to the odoo 16 focused PR)

@marcos-mendez

Copy link
Copy Markdown
Author

I Think 18 is already stable enought. OCA has migrated almost everything there. Shouldnt be a problem 18. Ifsomeone wants 16 just use TKL18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants