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>
64 lines
3.6 KiB
XML
64 lines
3.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- The closing beat (O9 acceptance): swap to the second demo school
|
|
in under five minutes. Every field touched here is stock
|
|
res.company - logo, primary/secondary colour, name, address - so
|
|
the "swap" is just switching the active company in Odoo's own
|
|
company selector; nothing about this module invents new
|
|
branding plumbing. Two full schools already exist because
|
|
shared/DEMO_SCRIPT.md names both by design ("St. Aloysius Public
|
|
School, Coimbatore" and "Waterloo Heights Academy, Ontario" -
|
|
same data shape, different names/currency/board).
|
|
|
|
base.main_company's currency is deliberately NOT changed here.
|
|
Found by testing the full 9-module suite installed together,
|
|
not this module alone: mc_education_fees's chart-of-accounts
|
|
setup (via its `account` dependency) posts journal items for
|
|
the main company before mc_education_theme's demo data runs,
|
|
and account.company.write() hard-blocks a currency change once
|
|
journal items exist ("You cannot change the currency of the
|
|
company since some journal items already exist") - correctly
|
|
so, retroactively changing a currency after transactions are
|
|
posted would be wrong. This is a real constraint on company
|
|
setup generally, not a demo-data quirk: currency belongs at
|
|
true initial company setup, before any financial module has
|
|
run, never as a later "apply a theme" change. The brand-new
|
|
second company below has no such history, so its currency is
|
|
set safely at creation. -->
|
|
<!-- phone/email/street: found missing while restyling the public
|
|
website - the contact us page and site footer now genuinely
|
|
read these fields live (see mc_education_theme's
|
|
contactus_templates.xml/footer_templates.xml), which is
|
|
exactly what surfaced that this record was still carrying
|
|
stock Odoo's own demo company's placeholder phone
|
|
(+1 555-555-5556), email (info@yourcompany.com) and a fake US
|
|
street address underneath the parts that WERE branded (name,
|
|
city, colours, logo). shared/DEMO_SCRIPT.md bans placeholder
|
|
content outright; a page that reads real data doesn't fix that
|
|
on its own if the data underneath is still fake. -->
|
|
<record id="base.main_company" model="res.company">
|
|
<field name="name">St. Aloysius Public School</field>
|
|
<field name="street">45 Avinashi Road</field>
|
|
<field name="city">Coimbatore</field>
|
|
<field name="country_id" ref="base.in"/>
|
|
<field name="phone">+91 422 435 6789</field>
|
|
<field name="email">info@staloysiuscbe.edu.in</field>
|
|
<field name="primary_color">#1B3A5C</field>
|
|
<field name="secondary_color">#D4A017</field>
|
|
<field name="logo" type="base64" file="mc_education_theme/static/demo/logo_st_aloysius.png"/>
|
|
</record>
|
|
|
|
<record id="demo_company_waterloo_heights" model="res.company">
|
|
<field name="name">Waterloo Heights Academy</field>
|
|
<field name="street">75 University Avenue West</field>
|
|
<field name="city">Waterloo</field>
|
|
<field name="country_id" ref="base.ca"/>
|
|
<field name="currency_id" ref="base.CAD"/>
|
|
<field name="phone">+1 519 888 4400</field>
|
|
<field name="email">info@waterlooheights.ca</field>
|
|
<field name="primary_color">#1E5C3A</field>
|
|
<field name="secondary_color">#C0C0C0</field>
|
|
<field name="logo" type="base64" file="mc_education_theme/static/demo/logo_waterloo_heights.png"/>
|
|
</record>
|
|
</odoo>
|