Files
odoo_source/addons/website/data/website_demo.xml
T
Romain Derie 507db4e179 [REM] website: remove multi-website by country
Short summary:
- People can now use the snippets option to show/hide based on country
- We never use / test / maintain this feature, if it still works since
  its introduction 4 years ago that's by luck
- It is probably barely used, we never got a single question or issue
  about it

-----------

When we introduced the multi-website feature, it came with 2 main use
cases:
1. Multi website by domain -> Every website has its own domain and based
   on that we serve the expected website
2. Multi website by geoip -> Multiple website can have the same domain
   and based on GEOIP/country we serve the expected website

We never really supported, highlighted or promoted the geoip case.
We actually never use it ourselves when doing tests, and we don't
consider it when doing specs / improvements.
At most, only a very few people know about it in Odoo.

That GEOIP case is probably not useful at all, as displaying a whole new
website based on lang is not easy since nothing can be shared out of the
box -> Every website has its own COW records.

For instance, one could think of having its main website A and another
website B on which he just added 3 products specific to that website B
country.
But such a case won't even work properly, as any adaption on website A
won't be reflected on website B (design, theme etc).

closes odoo/odoo#99938

Related: odoo/upgrade#3892
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-15 18:22:00 +02:00

414 lines
29 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="bs_debug_view" model="ir.ui.view">
<field name="name">BS Debug</field>
<field name="type">qweb</field>
<field name="key">website.bs_debug_page_view</field>
<field name="arch" type="xml">
<t name="Debug" t-name="website.bs_debug_page_view">
<t t-call="website.layout">
<t t-set="odoo_theme_colors" t-value="[['o-color-1', 'Color 1'], ['o-color-2', 'Color 2'], ['o-color-3', 'Color 3'], ['o-color-4', 'Color 4'], ['o-color-5', 'Color 5']]"/>
<t t-set="bs_theme_colors" t-value="[['primary', 'Primary'], ['secondary', 'Secondary'], ['success', 'Success'], ['info', 'Info'], ['warning', 'Warning'], ['danger', 'Danger'], ['light', 'Light'], ['dark', 'Dark']]"/>
<t t-set="bs_gray_colors" t-value="[['white', 'White'], ['100', '100'], ['200', '200'], ['300', '300'], ['400', '400'], ['500', '500'], ['600', '600'], ['700', '700'], ['800', '800'], ['900', '900'], ['black', 'Black']]"/>
<div id="wrap" class="oe_structure">
<section class="py-2">
<div class="container">
<h1>Components</h1>
<div class="row">
<div class="col-md">
<h2>Badge</h2>
<t t-foreach="bs_theme_colors" t-as="color">
<span t-attf-class="badge mb-1 bg-#{color[0]}"><t t-esc="color[1]"/></span>
</t>
<h3 class="mt-2 h6">Pill</h3>
<t t-foreach="bs_theme_colors" t-as="color">
<span t-attf-class="badge mb-1 rounded-pill bg-#{color[0]}"><t t-esc="color[1]"/></span>
</t>
<h3 class="mt-2 h6">Link</h3>
<t t-foreach="bs_theme_colors" t-as="color">
<a href="#" t-attf-class="badge mb-1 bg-#{color[0]}"><t t-esc="color[1]"/></a>
</t>
<h3 class="mt-2 h6">Autosizing</h3>
<div class="h3">
<t t-foreach="bs_theme_colors" t-as="color">
<span t-attf-class="badge mb-1 bg-#{color[0]}"><t t-esc="color[1]"/></span>
</t>
</div>
<h2 class="mt-4">Button</h2>
<t t-foreach="bs_theme_colors" t-as="color">
<button type="button" t-attf-class="btn mb-1 btn-#{color[0]}"><t t-esc="color[1]"/></button>
</t>
<h3 class="mt-2 h6">Outline</h3>
<t t-foreach="bs_theme_colors" t-as="color">
<button type="button" t-attf-class="btn mb-1 btn-outline-#{color[0]}"><t t-esc="color[1]"/></button>
</t>
<h3 class="mt-2 h6">Small</h3>
<t t-foreach="bs_theme_colors" t-as="color">
<button type="button" t-attf-class="btn mb-1 btn-sm btn-#{color[0]}"><t t-esc="color[1]"/></button>
</t>
<h3 class="mt-2 h6">Large</h3>
<t t-foreach="bs_theme_colors" t-as="color">
<button type="button" t-attf-class="btn mb-1 btn-lg btn-#{color[0]}"><t t-esc="color[1]"/></button>
</t>
<h2 class="mt-4">Dropdown</h2>
<div class="dropdown">
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown">Toggle</button>
<div class="dropdown-menu">
<div class="dropdown-header">Header</div>
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Something else here</a>
<div class="dropdown-divider"/>
<a class="dropdown-item" href="#">Separated link</a>
</div>
</div>
<h2 class="mt-4">Navbar</h2>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="visually-hidden">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#">Disabled</a>
</li>
</ul>
<form class="d-flex align-items-center my-2 my-lg-0">
<input class="form-control me-sm-2" type="search" placeholder="Search" aria-label="Search"/>
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>
<h2 class="mt-4">Form</h2>
<form>
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email"/>
<small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
</div>
</form>
<h2 class="mt-4">Pagination</h2>
<nav>
<ul class="pagination">
<li class="page-item disabled">
<a class="page-link" href="#" tabindex="-1">Previous</a>
</li>
<li class="page-item">
<a class="page-link" href="#">1</a>
</li>
<li class="page-item active">
<a class="page-link" href="#">2 <span class="visually-hidden">(current)</span></a>
</li>
<li class="page-item">
<a class="page-link" href="#">3</a>
</li>
<li class="page-item">
<a class="page-link" href="#">Next</a>
</li>
</ul>
</nav>
</div>
<div class="col-md-auto">
<h2>Alert</h2>
<t t-foreach="bs_theme_colors" t-as="color">
<div t-attf-class="alert alert-#{color[0]}">
This is a "<t t-esc="color[1]"/>" alert with a <a href="#" class="alert-link">link</a>.
</div>
</t>
<h2 class="mt-4">Breadcrumb</h2>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item"><a href="#">Library</a></li>
<li class="breadcrumb-item active" aria-current="page">Data</li>
</ol>
</nav>
<h2 class="mt-4">Card</h2>
<div class="card">
<div class="card-header">
Card Header
</div>
<div class="card-body">
Card Body
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">Item 1</li>
<li class="list-group-item">Item 2</li>
</ul>
<div class="card-footer">
Card Footer
</div>
</div>
</div>
</div>
</div>
</section>
<section class="py-2">
<div class="container">
<h1>Utilities &amp; Typography</h1>
<div class="row">
<div class="col-md">
<div class="row g-0">
<t t-foreach="odoo_theme_colors" t-as="color">
<div t-attf-class="col-auto bg-#{color[0]}">
<div class="py-1 px-3"><t t-esc="color[1]"/></div>
</div>
</t>
</div>
<div class="row g-0 mt-2">
<t t-foreach="bs_theme_colors" t-as="color">
<div t-attf-class="col-auto bg-#{color[0]}">
<div class="py-1 px-3"><t t-esc="color[1]"/></div>
</div>
</t>
</div>
<div class="row g-0 mt-2">
<t t-foreach="bs_gray_colors" t-as="color">
<div t-attf-class="col-auto bg-#{color[0]}">
<div class="py-1 px-3"><t t-esc="color[1]"/></div>
</div>
</t>
</div>
<div class="row g-0 mt-4">
<t t-foreach="odoo_theme_colors" t-as="color">
<div t-attf-class="col-auto text-#{color[0]}">
<div class="py-1 px-3"><t t-esc="color[1]"/></div>
</div>
</t>
</div>
<div class="row g-0 mt-2">
<t t-foreach="bs_theme_colors" t-as="color">
<div t-attf-class="col-auto text-#{color[0]}">
<div class="py-1 px-3"><t t-esc="color[1]"/></div>
</div>
</t>
</div>
<div class="row g-0 mt-2">
<t t-foreach="bs_gray_colors" t-as="color">
<div t-attf-class="col-auto text-#{color[0]}">
<div class="py-1 px-3"><t t-esc="color[1]"/></div>
</div>
</t>
</div>
</div>
<div class="col-md-auto">
<h1>Headings 1</h1>
<h2>Headings 2</h2>
<h3>Headings 3</h3>
<h4>Headings 4</h4>
<h5>Headings 5</h5>
<h6>Headings 6</h6>
<p>Paragraph with <strong>bold</strong>, <span class="text-muted">muted</span> and <em>italic</em> texts</p>
<p><a href="#">Link</a></p>
<p><button type="button" class="btn btn-link">Link button</button></p>
</div>
</div>
</div>
</section>
</div>
</t>
</t>
</field>
</record>
<record id="color_combinations_debug_view" model="ir.ui.view">
<field name="name">Color Combinations Debug</field>
<field name="type">qweb</field>
<field name="key">website.color_combinations_debug_page_view</field>
<field name="arch" type="xml">
<t name="Debug" t-name="website.color_combinations_debug_page_view">
<t t-call="website.layout">
<div id="#wrap" class="oe_structure" style="background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAH0lEQVQYV2NkQAL/GRikGGF8KOcZWADGAbEZkTkgAQDXKwcebKRDwQAAAABJRU5ErkJggg==) repeat;">
<section class="py-1">
<div class="container">
<div class="d-flex mb-3">
<div class="card w-100">
<div class="card-body">
<table class="table table-borderless">
<tr>
<th colspan="2" class="align-middle">Theme Colors</th>
<td t-foreach="[1, 2, 3, 4, 5]" t-as="i">
<div class="d-flex">
<span t-attf-class="border p-3 me-1 bg-o-color-#{i}"></span>
<div class="flex-grow-1 align-self-center">
<h5 class="m-0">o-color-<t t-esc="i"/></h5>
</div>
</div>
</td>
</tr>
<tr>
<th colspan="2" class="align-middle">BTS Base Colors</th>
<td t-foreach="['primary', 'secondary', 'light', 'dark']" t-as="i">
<div class="d-flex">
<span t-attf-class="border p-3 me-1 bg-#{i}"></span>
<div class="flex-grow-1 align-self-center">
<h5 class="m-0" t-esc="i"></h5>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="row">
<div class="col-6 mt-3" t-foreach="[1, 2, 3, 4, 5]" t-as="i">
<div t-attf-class="o_cc o_cc#{i} p-3 border">
<div class="row">
<div class="col-7">
<h2>
Preset <t t-esc="i"/>
</h2>
<p>Paragraph text. Lorem <b>ipsum dolor sit amet</b>, consectetur adipiscing elit. <i>Integer posuere erat a ante</i>. <a href="#">Link text</a></p>
<p class="text-muted">Text muted. Lorem <b>ipsum dolor sit amet</b>, consectetur.</p>
<p class="small">Small text. Lorem <b>ipsum dolor sit amet</b>, consectetur adipiscing elit. <i>Integer posuere erat a ante</i>.</p>
</div>
<div class="col-5 border-start">
<a href="#" class="mb-3 btn-block btn btn-primary">btn-primary</a>
<a href="#" class="mb-3 btn-block btn btn-secondary">btn-secondary</a>
<a href="#" class="mb-3 btn-block btn btn-outline-primary">btn-outline-primary</a>
<a href="#" class="mb-3 btn-block btn btn-outline-secondary">btn-outline-secondary</a>
</div>
</div>
<hr class="my-4"/>
<div class="row">
<div class="col-7">
<div class="form-group row">
<label class="col-2 col-form-label">Label</label>
<div class="col-10">
<input type="email" class="form-control" placeholder="placeholder"/>
<small id="emailHelp" class="form-text text-muted">Form field help text</small>
</div>
</div>
<div class="card w-100 mb-3">
<div class="card-body">
<h4 class="card-title">H4 Card title</h4>
<h5 class="card-subtitle mb-2 text-muted">H5 Card subtitle</h5>
<p class="card-text">Paragraph. <a href="#">text link</a></p>
<t t-foreach="['primary','secondary', 'info', 'warning', 'danger', 'success']" t-as="btn">
<a href="#" t-attf-class="mb-2 btn-sm btn btn-#{btn}" t-esc="'btn-' + btn"/>
</t>
</div>
</div>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Breadcrumb</a></li>
<li class="breadcrumb-item"><a href="#">Library</a></li>
<li class="breadcrumb-item active">Data</li>
</ol>
</nav>
<small>TABS</small>
<ul class="nav nav-tabs mb-3">
<li class="nav-item">
<a class="nav-link active" href="#">Active</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#">Disabled</a>
</li>
</ul>
<div class="progress">
<div class="progress-bar" style="width: 25%;">25%</div>
</div>
</div>
<div class="col-5 border-start">
<div t-foreach="['info', 'warning', 'danger', 'success']" t-as="btn">
<a href="#" t-attf-class="mb-2 btn-block btn btn-#{btn}" t-esc="'btn-' + btn"/>
<a href="#" t-attf-class="mb-3 btn-block btn btn-outline-#{btn}" t-esc="'btn-outline-' + btn"/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</t>
</t>
</field>
</record>
<record id="snippets_debug_view" model="ir.ui.view">
<field name="name">Snippet Debug</field>
<field name="type">qweb</field>
<field name="key">website.snippets_debug_page_view</field>
<field name="arch" type="xml">
<t name="Debug" t-name="website.snippets_debug_page_view">
<t t-call="website.layout">
<style>
#snippets_menu, #o_scroll > .o_panel > .o_panel_header {
display: none !important;
}
[data-oe-type="snippet"]:not([data-module-id])::before {
content: attr(name);
display: block;
padding: 16px;
background-color: lightgray;
color: black;
font-size: 24px;
}
[data-oe-type="snippet"]:not([data-module-id])::after {
content: "";
display: table;
clear: both;
}
</style>
<div id="wrap" class="oe_structure">
<t t-call="website.snippets"/>
</div>
</t>
</t>
</field>
</record>
</data>
<data noupdate="1">
<record id="website2" model="website">
<field name="name">My Website 2</field>
<field name="sequence">20</field>
</record>
<!-- BS Debug Page -->
<!-- Showcase all (most?) BS components and utilities -->
<record id="bs_debug_page" model="website.page">
<field name="url">/website/demo/bootstrap</field>
<field name="is_published">False</field>
<field name="view_id" ref="bs_debug_view"/>
</record>
<!-- Presets Debug Page -->
<record id="color_combinations_debug_page" model="website.page">
<field name="url">/website/demo/color-combinations</field>
<field name="is_published">False</field>
<field name="view_id" ref="color_combinations_debug_view"/>
</record>
<!-- Snippet Debug Page -->
<!-- Showcase all snippets -->
<record id="snippets_debug_page" model="website.page">
<field name="url">/website/demo/snippets</field>
<field name="is_published">False</field>
<field name="view_id" ref="snippets_debug_view"/>
</record>
</data>
</odoo>