Per discussion: the marketing homepage looked polished but the rest of the public site (the admission form, contact us, the backend login screen) was still bare stock Odoo, and the site nav still showed stock Odoo's own default logo/favicon rather than Metatroncube's real ones. This brings the same design system (Manrope + Work Sans, the navy/indigo palette) to all three pages and wires up the two supplied brand assets - static/img/logo.png (the wordmark, used as website.logo, so it renders in every page's nav automatically) and static/img/favicon.png (the cube mark, website.favicon). Loaded via a post_init_hook (hooks.py) rather than a plain <record>: website's two stock demo sites (website.default_website, website.website2) are both noupdate=True, and Python is the tool that isn't gated by that the way a <record>/<function> tag would be on an already-installed database (see hooks.py's own docstring for the exact mechanism and its fresh-install-only limitation). Admissions keeps its exact form markup/field names/model untouched - only the surrounding hero and "what happens next" strip are new, added via position="before"/"after" around the existing <section> so the stock s_website_form JS widget this page depends on is never touched. Restyling contact us and the login screen surfaced a chain of real, separate placeholder-content bugs, each found by looking at the next page down rather than assuming the previous fix was complete: 1. website.contactus's sidebar hardcodes "My Company" and a fake US street address - shared/DEMO_SCRIPT.md explicitly bans placeholder content, and it had been live here the whole time. Reading res_company fields instead means it shows whichever school is actually active, same as the admission form's own live program list. 2. website.footer_custom - the footer on EVERY page, not just contact us - carries the identical yourcompany.example.com / +1 555-555-5556 placeholder, plus a "Products/Services/Legal" link list to nowhere and dead social icons. Fixing #1 alone would have left this sitting directly underneath it on every single page. 3. website.header_text_element, the nav bar's own phone/email widget, carries the same fake number - a fourth, separate occurrence, this time in the header. First pass here fixed only its "phone_mail" variant, assumed (wrongly) to be what this site's header actually uses; the live page still showed the fake number afterward. It turned out both nav slots (desktop, mobile) use the plain default branch instead - caught only by re-checking the real page rather than trusting that assumption, and fixed every variant that carries contact info this time, not just the one guessed at. 4. Underneath all three page-level fixes: base.main_company itself still carried stock Odoo's own demo phone (+1 555-555-5556) and email (info@yourcompany.com) - the page-level fixes above only surfaced this because they read real company data for the first time; the data itself needed fixing too. Real Indian/Canadian contact details added to both demo companies in mc_theme_demo.xml. 5. web.login_layout hardcodes its own separate "Powered by Odoo" link - a third distinct occurrence, different from the portal sidebar text and the web.brand_promotion badge already fixed, reached by the very first screen anyone doing this demo sees. Full suite (all 9 modules + web_responsive) re-verified together after every fix in this chain: 0 failed, 0 error(s), tests up to 93. One correction to this session's own earlier work: mc_cast_users_demo.xml claimed <function> "isn't subject to" the noupdate/mode guard that blocks a plain <record> on an already-installed database - false, odoo/tools/convert.py's _tag_function has the exact same "if self.noupdate and self.mode != 'init': return" check. What actually fixed that earlier bug was applying the change as a one-off manual Python snippet, not the tag choice - the same manual-application pattern used again here for base.main_company's contact fields on the already-running school_demo database. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
138 lines
8.4 KiB
XML
138 lines
8.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- website.footer_custom (stock Odoo's default footer, active on
|
|
every website page - homepage, admissions, contact us, all of
|
|
them) hardcodes a "Products / Services / Legal" link list that
|
|
goes nowhere (href="#"), a generic "we are a team of
|
|
passionate people" paragraph, dead social icons pointing at
|
|
unconfigured /website/social/* routes, and the same
|
|
yourcompany.example.com / +1 555-555-5556 placeholder already
|
|
fixed on the contact us page itself - all of it visible on
|
|
every single page of the site, not just one. Real find: fixing
|
|
the contact us page alone left this identical placeholder
|
|
content sitting in the footer underneath it.
|
|
|
|
Replaced with real links into this app (Home, Admissions,
|
|
Contact us) and the active school's own name/contact info via
|
|
res_company, the same dynamic source the contact us page uses -
|
|
no fixed Metatroncube branding here, this footer is genuinely
|
|
per-school content and swaps with the active company like the
|
|
admission form does. -->
|
|
<!-- A fourth occurrence, in the header this time, not the footer:
|
|
website.header_text_element is Odoo's generic, reusable
|
|
"phone/email nav widget" snippet - a library of variants
|
|
(sentence, list, phone_mail, mail, mail_stretched, a default)
|
|
every one of which hardcodes +1 555-555-5556 /
|
|
info@yourcompany.example.com. Found only by looking at the
|
|
live nav bar after the footer fix above made it obvious the
|
|
same fake number was still showing up higher on the page.
|
|
|
|
First pass here fixed only "phone_mail", assumed to be this
|
|
site's active variant - wrong. The two spots actually
|
|
rendering on the live page (desktop nav, mobile offcanvas nav)
|
|
both turned out to use the plain default (t-else) branch
|
|
instead, still showing the fake number after that first fix,
|
|
caught by re-checking the real page rather than trusting the
|
|
assumption. Fixing every variant with a phone or email in it
|
|
(phone_mail, mail, mail_stretched, the default) rather than
|
|
guessing again which one a given header configuration
|
|
actually selects - "list" and "sentence" carry no contact
|
|
info at all and are left alone. -->
|
|
<template id="header_phone_mail_branding" inherit_id="website.header_text_element" name="Header phone/email - real company info">
|
|
<!-- phone_mail: both phone and email, no icon/text lookalikes -->
|
|
<xpath expr="//t[@t-elif="_txt_elt_content == 'phone_mail'"]//a[starts-with(@href,'tel:')]" position="attributes">
|
|
<attribute name="href"></attribute>
|
|
<attribute name="t-attf-href">tel:#{res_company.phone}</attribute>
|
|
</xpath>
|
|
<xpath expr="//t[@t-elif="_txt_elt_content == 'phone_mail'"]//a[@t-attf-href][contains(@t-attf-href,'tel')]//span[hasclass('o_force_ltr')]" position="replace">
|
|
<span class="o_force_ltr" t-esc="res_company.phone"/>
|
|
</xpath>
|
|
<xpath expr="//t[@t-elif="_txt_elt_content == 'phone_mail'"]//a[starts-with(@href,'mailto:')]" position="attributes">
|
|
<attribute name="href"></attribute>
|
|
<attribute name="t-attf-href">mailto:#{res_company.email}</attribute>
|
|
</xpath>
|
|
<xpath expr="//t[@t-elif="_txt_elt_content == 'phone_mail'"]//a[@t-attf-href][contains(@t-attf-href,'mailto')]/small" position="replace">
|
|
<small>
|
|
<i class="fa fa-1x fa-fw fa-envelope me-1"/>
|
|
<t t-esc="res_company.email"/>
|
|
</small>
|
|
</xpath>
|
|
|
|
<!-- mail: email only -->
|
|
<xpath expr="//t[@t-elif="_txt_elt_content == 'mail'"]//a[starts-with(@href,'mailto:')]" position="attributes">
|
|
<attribute name="href"></attribute>
|
|
<attribute name="t-attf-href">mailto:#{res_company.email}</attribute>
|
|
</xpath>
|
|
<xpath expr="//t[@t-elif="_txt_elt_content == 'mail'"]//a[@t-attf-href]/small" position="replace">
|
|
<small><i class="fa fa-1x fa-fw fa-envelope me-1"/> <t t-esc="res_company.email"/></small>
|
|
</xpath>
|
|
|
|
<!-- mail_stretched: phone only, the "stretched clickable nav pill" look -->
|
|
<xpath expr="//t[@t-elif="_txt_elt_content == 'mail_stretched'"]//a[starts-with(@href,'tel:')]" position="attributes">
|
|
<attribute name="href"></attribute>
|
|
<attribute name="t-attf-href">tel:#{res_company.phone}</attribute>
|
|
</xpath>
|
|
<xpath expr="//t[@t-elif="_txt_elt_content == 'mail_stretched'"]//a[@t-attf-href]//span[hasclass('o_force_ltr')]" position="replace">
|
|
<span class="o_force_ltr"><small t-esc="res_company.phone"/></span>
|
|
</xpath>
|
|
|
|
<!-- the default branch: phone only - this is the one actually
|
|
rendering on this site's own header, both desktop and
|
|
mobile. -->
|
|
<xpath expr="//t[@t-else][not(@t-elif)]//a[starts-with(@href,'tel:')]" position="attributes">
|
|
<attribute name="href"></attribute>
|
|
<attribute name="t-attf-href">tel:#{res_company.phone}</attribute>
|
|
</xpath>
|
|
<xpath expr="//t[@t-else][not(@t-elif)]//a[@t-attf-href]//span[hasclass('o_force_ltr')]" position="replace">
|
|
<span class="o_force_ltr"><small t-esc="res_company.phone"/></span>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="footer_branding" inherit_id="website.footer_custom" name="Footer - real links, no placeholder">
|
|
<xpath expr="//div[@id='footer']" position="replace">
|
|
<div id="footer" class="oe_structure oe_structure_solo border text-break" t-ignore="true" t-if="not no_footer" style="--box-border-left-width: 0px; --box-border-right-width: 0px;">
|
|
<style>
|
|
.mc-footer{ font-family:'Work Sans', system-ui, sans-serif; }
|
|
.mc-footer h5{ font-family:'Manrope', system-ui, sans-serif; font-weight:800; }
|
|
.mc-footer .ico{ display:inline-flex; width:16px; }
|
|
</style>
|
|
<section class="s_text_block pt40 pb16 mc-footer" data-snippet="s_text_block" data-name="Container">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-3 pt24 pb24">
|
|
<h5>Quick Links</h5>
|
|
<ul class="list-unstyled">
|
|
<li><a href="/">Home</a></li>
|
|
<li><a href="/admissions/apply">Admissions</a></li>
|
|
<li><a href="/contactus">Contact us</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="col-lg-5 pt24 pb24">
|
|
<h5 t-esc="res_company.name"/>
|
|
<p>Admissions, fees, attendance, timetable, exams and the parent portal - all in one connected system, all reachable from this site.</p>
|
|
</div>
|
|
<div class="col-lg-4 pt24 pb24">
|
|
<h5>Get in touch</h5>
|
|
<ul class="list-unstyled">
|
|
<li t-if="res_company.phone">
|
|
<span class="ico"><i class="fa fa-phone fa-fw me-2"/></span>
|
|
<a t-attf-href="tel:#{res_company.phone}"><span class="o_force_ltr" t-esc="res_company.phone"/></a>
|
|
</li>
|
|
<li t-if="res_company.email">
|
|
<span class="ico"><i class="fa fa-envelope fa-fw me-2"/></span>
|
|
<a t-attf-href="mailto:#{res_company.email}" t-esc="res_company.email"/>
|
|
</li>
|
|
<li t-if="res_company.city">
|
|
<span class="ico"><i class="fa fa-map-marker fa-fw me-2"/></span>
|
|
<span t-esc="res_company.city"/>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|