Name:
[FIX] web_responsive, viin_brand_common: unbreak the tours #14456 re-enables
State:
Killed
finished in 235m
PR State:
merged
PR Author:
David Tran
PR Author Email:
PR:
#670
Committer:
David Tran
Committer Email:
david.tran@tvtmarine.com
Commit:
03e698013378cb7b8dd37c2c49405b4be02e1e5f
Description:
[FIX] viin_brand_common: stop prepending brand to every tab title
Every real page title got "Viindoo - " prepended to it, because
WebClient.setup() injected a PERMANENT titleParts entry
(zopenerp: "Viindoo") whenever session.viin_brand is set. Core only
ever composes the literal "Odoo" as the EMPTY-CASE FALLBACK -
Object.values(titleParts).join(" - ") || "Odoo" in
web/static/src/core/browser/title_service.js - it never appears
beside a real title. website's SEO dialog rendered
"Viindoo - Hello, world!" instead of "Hello, world!", failing core's
own test_website_event_pages_seo tour (runbot 223907, target G1 of
run tour-reenable-14456).
Remove the permanent setParts() injection - webclient.js had no
other purpose, so it is deleted - and instead patch core's "title"
service itself (new static/src/core/browser/title_service.js) so
ONLY the empty-case fallback is rebranded: core computes the title
exactly as it always does, and only when core's own getParts() shows
titleParts is empty does the patch replace the trailing "Odoo" with
"Viindoo". A real title composed by core is never touched. Still
gated on the server-stamped session.viin_brand marker (introduced by
f35f41c) so core's own QUnit/Hoot suites, whose mock sessions lack
the marker, keep asserting the plain "Odoo" title.
NOT verified against a live Hoot/QUnit run: this environment has no
spare RAM to build an instance (a foreign run owns the only live
one). RED-today / green-after was argued by reading
title_service.js's composition and hand-tracing titleParts for both
scenarios in the companion test, never executed.
Branch:
18.0
Age:
Up-time: