← Back to Pull requests

[20.0][ADD] hotel_website: hotel website booking #257

Open
vadan-serpentcs opened this pull request with 7757 lines diff across 54 files
View on GitHub
vadan-serpentcs vadan-serpentcs commented on Oct 30, 2026 12:48 UTC
Author

New module: a guest-facing hotel website for the vertical-hotel suite.

Depends on #250 (vertical_hotel) and #252 (hotel_reservation), including their guest register commits; installed through test-requirements.txt until they are merged. The "Detect unreleased dependencies" check fails on purpose until then.

What it does


  • homepage with booking bar; Rooms & Suites with photos, capacity, amenities, price and live availability per room type for the chosen dates; a page per room type with gallery and reviews

  • a stay (cart) in the session, a guest details form with accompanying guests, and a "request received" page

  • the request is a draft reservation (Booked Online) with one line per requested room type and the guests on its Guests tab; the front desk's Confirm assigns free rooms of those types and runs the usual confirmation

  • portal: /my/reservations; website settings for check-in / check-out times

  • availability uses the back office rule (hotel.room._get_booked_rooms)
  • Tests


    Route and booking tests + browser tests (dates widget; full visitor flow with accompanying guests); tested on 20.0 without demo data together with the other hotel modules.

    Diff: 7757 lines (+7757 / -0) across 54 files Reviewer: None requested Review duration: 53482m
    All Vouch review confidence checks passed
    Residual risk 0.45 = Change Risk (0.91) × (1 − Review Confidence (0.51)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.91 · 7757 lines diff across 54 files
    0.91
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.23 · 2 substantive comment(s)
    0.23
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 10%
    50%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.400
    Shallow Review Depth shallow_review_depth
    0.269
    No Reviewer Assigned no_reviewer_assigned
    0.120
    Mass File Touch mass_file_touch
    0.080
    Real PR Conversation Timeline
    3 items
    Rad0van Rad0van commented on Nov 10, 2026 19:44 UTC
    Contributor

    _(ran) = reproduced on a 20.0 database with all eight modules of #250–#257 installed together; (read) = from reading the code, not executed._

    No hole found in the booking flow itself: prices, pricelist and partner never come from the client, the cart is re-validated server-side, CSRF tokens are there. What worries me before this is exposed publicly:

    1. Anonymous checkout is unthrottled (read): each POST to /rooms/checkout creates a partner and a draft reservation and sends an e-mail to the address typed in. No captcha, no rate limit — a mail relay and a way to flood the front desk. website_cf_turnstile is in 20.0.

    2. Reviews publish themselves (is_published defaults to True) and any portal account can post any number, with no stay.

    3. Nothing holds a room: a request is a draft with a room type, drafts are ignored by availability and never expire, so several guests can be told "request received" for the last room. Fine as a request form if the page says so; not as a booking engine.

    4. Images are inlined as base64 on every /rooms and homepage hit (_hotel_type_images reads image_1024 of every room) — megabytes of uncacheable HTML. /web/image URLs would cache.

    5. It restyles every website of the database (title, header brand, footer, homepage; no website_id anywhere) and loads Google Fonts from Google's CDN, which is a GDPR problem for EU sites.

    6. Assets: 23 MB, of which 81 of 96 files under static/src/image (9.6 MB, including a 7.5 MB video) are referenced nowhere; no licence or credit is stated for the photos; static/description carries banners for other products. Can the photos' licence be stated, and the unused ones dropped?

    7. No i18n/*.pot; room-type pages are excluded from the sitemap.

    vadan-serpentcs vadan-serpentcs commented on Nov 25, 2026 07:50 UTC
    Author

    @Rad0van
    Thanks for the thorough review. All seven are addressed in 63626eb:
    1. The request form uses the website's captcha (data-captcha + _verify_request_recaptcha_token, so reCAPTCHA or Turnstile, whichever is set up), plus a limit that works without one: 5 requests a day per address, 3 open requests per e-mail.
    2. Reviews stay unpublished until the hotel publishes them, and only guests with a confirmed reservation or folio of that room type can review it, once.
    3. Kept as a request form: the pages and the acknowledgement now say no room is held until the hotel confirms. Unconfirmed requests are cancelled after a few days (setting, 3 by default) and the guest is told.
    4. Photos are /web/image URLs; room types and rooms bookable online allow that through _can_return_content.
    5. The hotel layout (homepage, brand, title, copyright) is a per-website setting, on for the first website only. The module no longer loads any font and uses the theme's fonts; Odoo's own theme font settings are left to the website.
    6. The unused images and the video are gone (81 files), and so is the app store page with the other products' banners. The module is 5.5 MB now. The photos are credited in readme/CREDITS.md.
    7. .pot added, and room type pages are in the sitemap.

    Reviewers
    None requested
    Assignees
    vadan-serpentcs vadan-serpentcs
    Labels
    risk: medium confidence: 50.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 90.5% (HIGH) · Higher = larger blast radius
    90.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 50.7% · Lower = rushed or shallow review
    50.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 44.6% · Moderate risk
    44.6%