SlideShare a Scribd company logo
1 of 35
Download to read offline
Create Themes for Website
By Fabien Pinckaers - Founder & CEO, Odoo
Topics
1. Introduction
Classical workflow
Odoo's CMS workflow
2. Tutorial
Starting with a single page
Snippets
Options
Custom Css
3. Examples
·
·
·
·
·
·
Introduction
Classical workflow
Start a new project.
Working with Odoo CMS
Start a new project.
Classical workflow
Add new features or pages.
Working with Odoo CMS
Add new features or pages.
Tutorial
A Theme?
A Theme is an Odoo's MODULEA Theme is an Odoo's MODULE
(Without Python Logic)
Structure of a Theme
My Theme
static
src
js, css, font, xml, img
views
my_theme.xml
snippets.xml
options.xml
pages.xml (static pages)
[...]
·
·
·
·
·
·
·
·
·
·
Simple HTML page
Starting with an HTML page
Let's start with the homepage.
views/pages.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
[...]
<template<template id="website.homepage" name="Homepage" page="True">>
<html><html>
<head><head>
<title><title>Title</title></title>
</head></head>
<body><body>
<h1><h1> Hello, World!
</h1></h1>
</body></body>
</html></html>
</template></template>
[...]
Starting with an HTML page
Add the Odoo context : ( with Bootstrap front-end
framework, Edition bar, Snippets, etc. )
views/pages.xml
1
2
3
4
5
6
7
[...]
<template<template id="website.homepage" name="Homepage" page="True">>
<t<t t-call="website.layout">>
<h1><h1> Hello, World!</h1></h1>
</t></t>
</template></template>
[...]
Starting with an HTML page
It's possible to create all the pages like this way.
views/pages.xml
1
2
3
4
5
6
7
8
[...]>
<template<template id="website.homepage" name="Homepage" page="True">>
<t<t t-call="website.layout">>
<div<div id="wrap" class="oe_structure">>
<!-- Your HTML code here -->
</div></div>
</t></t>
[...]
Adding the class "oe_structure" allows you to use this cool
feature: SnippetsSnippets.
Snippets
Build with snippets
But instead of creating all the pages this way, we think
about using "Building Blocks".
We call them "SnippetsSnippets".
Block of html code usable everywhere.
Draggable in your page.
Can contain Javascript or/and Css logics.
·
·
·
A very Simple Snippet
Structure of a snippet.
views/snippets.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[...]
<template<template id="my_theme_snippets" inherit_id="website.snippets" name="My Theme snippets">>
<xpath<xpath expr="//div[@id='snippet_structure']" position="inside">>
<div><div>
<!-- Thumbnail -->
<div<div class="oe_snippet_thumbnail">>
<img<img class="oe_snippet_thumbnail_img"
src="/my_theme/static/src/img/snippet/snippet_thumbs.png"/>/>
<span<span class="oe_snippet_thumbnail_title">>My Snippet</span></span>
</div></div>
<!-- Snippet Body -->
<section<section class="oe_snippet_body mt_simple_snippet">>
<div<div class="container">>
<hr<hr />/>
<h1<h1 class="text-center mb32 mt32">>This is a simple snippet</h1></h1>
<hr<hr />/>
</div></div>
</section></section>
</div></div>
</xpath></xpath>
</template></template>
[...]
Customize my Snippet
We can customize this simple snippet with Sass/Css.
static/src/css/my_theme.sass
1
2
3
4
5
6
// Pure compass imports
@import@import "compass/css3"
@import@import "bootstrap"
// Create CSS only for snippet
@import@import "my_theme-snippet.sass"
static/src/css/my_theme-snippet.sass
1
2
3
4
5
6
7
8
9
10
@font-face@font-face
font-family:: 'BebasNeue'
src:: url('/my_theme/static/src/font/BebasNeue Bold.ttf')
src:: local(("BebasNeue Book")),,
urlurl(('/my_theme/static/src/font/BebasNeue Bold.ttf')) formatformat(("truetype"))
.mt_simple_snippet
h1h1
font-family:: 'BebasNeue'
font-size:: 55emem
Customize my Snippet
To insert this new Css we need to extend the theme
template and replace the default bootstrap by our new Css.
views/my_theme.xml
1
2
3
4
5
6
7
[...]
<template<template id="theme" inherit_id="website.theme" name="My Theme Assets">>
<xpath<xpath expr="//link[@id='bootstrap_css']" position="replace">>
<link<link rel="stylesheet" type="text/css" href="/my_theme/static/src/css/my_theme.css" />/>
</xpath></xpath>
</template></template>
[...]
Snippet & Javascript
It's possible to add javascript logicjavascript logic when a snippet has
been dropped or appears in the page.
static/src/js/snippet.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
((functionfunction()() {{
'use strict';;
varvar website == openerp..website;;
website..openerp_website == {};{};
website..snippet..animationRegistry..my_snippet == website..snippet..Animation..extend({({
selector :: ".mt_simple_snippet",,
start:: functionfunction(){(){
varvar h1 == thisthis..$el..find(("h1"););
varvar h1_width == h1..width();();
h1..css(('width',,00););
h1..animate(( {{ width:: h1_width },}, 30003000 ););
},},
});});
})();})();
Snippet & Javascript
Just inherits from "website.assets_frontend" template to
enable it.
views/my_theme.xml
1
2
3
4
5
6
7
8
[...]
<template<template id="assets_frontend" inherit_id="website.assets_frontend"
name="My Theme Front End Assets">>
<xpath<xpath expr="." position="inside">>
<script<script src="/my_theme/static/src/js/snippet.js"></script>></script>
</xpath></xpath>
</template></template>
[...]
Organize my snippets
You can create a new snippet section or insert your snippet
into an already present section.
New section views/snippet.xml
1
2
3
4
5
6
7
8
9
[...]
<template<template id="snippets" inherit_id="website.snippets" name="My Simple Snippet">>
<xpath<xpath expr="//ul[@class='nav navbar-nav nav-tabs']" position="inside">>
<li><li>
<a<a href="#snippet_my_snippet" data-toggle="tab">>My Snippet</a></a>
</li></li>
</xpath></xpath>
</template></template>
[...]
Insert into "Structure" section.
1
2
3
4
5
6
7
[...]
<template<template id="my_theme_snippets" inherit_id="website.snippets" name="My Theme snippets">>
<xpath<xpath expr="//div[@id='snippet_structure']" position="inside">>
<div><div><!-- Your snippet --></div></div>
</xpath></xpath>
</template></template>
[...]
Options
Add Options
We can add options for every snippets or blocks.
In our case, we add 2 options ( patterns background) for the
snippet created before.
views/options.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[...]
<template<template id="my_theme_snippet_option" name="My Snippet Options"
inherit_id="website.snippet_options">>
<xpath<xpath expr="." position="inside">>
<div<div data-snippet-option-id="my_theme_snippet_option"
data-selector=".mt_simple_snippet"
data-selector-children=".oe_structure">>
<li<li class="dropdown-submenu">>
<a<a tabindex="-1" href="#">>Pattern</a></a>
<ul<ul class="dropdown-menu">>
<li<li data-value="tweed"><a>><a>Tweed</a></li></a></li>
<li<li data-value="sprinkles"><a>><a>Sprinkles</a></li></a></li>
</ul></ul>
</li></li>
</div></div>
</xpath></xpath>
[...]
Add Options
In fact, it adds a class-name to the data-selector.
And now, simply create the Css to have the desired result.
static/src/css/my_theme-options.sass
1
2
3
4
5
6
7
8
9
10
11
12
13
14
.mt_simple_snippet
&&.tweed
background-image:: url(/my_theme/static/src/img/backgrounds/patterns/tweed2.png)
h1h1
color:: rgb((255255,,255255,,255255))
hrhr
border-top:: 11pxpx solid dashed rgba((255255,,255255,,255255,.,.88))
&&.sprinkles
background-image:: url(/my_theme/static/src/img/backgrounds/patterns/sprinkles.png)
h1h1
color:: rgb((120120,,120120,,120120))
+text-shadow+text-shadow((00 00 55pxpx rgba((00,,00,,00,.,.33))))
hrhr
border-top:: 11pxpx solid solid rgba((00,,00,,00,.,.88))
Custom Css
We can override Bootstrap variables to create your theme.
static/src/css/my_theme.sass
1
2
3
4
5
6
7
8
9
10
11
12
13
// Override Bootstrap variables
$brand-primary:: rgb((120120,,120120,,120120))
$brand-success:: rgb((9494,,148148,,162162))
// Pure compass imports
@import@import "compass/css3"
@import@import "bootstrap"
// Create CSS only for snippet
@import@import "my_theme-snippet.sass"
// Create CSS only for options
@import@import "my_theme-options.sass"
Summary
Summary
Infinite customizations
Easy to understand
Template inherits
Bootstrap based
Only imagination is your limit
Robust Odoo back-end behind
... and so much things will come... and so much things will come :):)
·
·
·
·
·
·
Example
Thank you
And we are hiring a webdesigner. Contact
cde@odoo.com for more informations.

More Related Content

What's hot

Odoo 3D Product View with Google Model-Viewer
Odoo 3D Product View with Google Model-ViewerOdoo 3D Product View with Google Model-Viewer
Odoo 3D Product View with Google Model-ViewerOdoo
 
Deploying & Scaling your Odoo Server
Deploying & Scaling your Odoo ServerDeploying & Scaling your Odoo Server
Deploying & Scaling your Odoo ServerOdoo
 
Odoo - CMS dynamic widgets
Odoo - CMS dynamic widgetsOdoo - CMS dynamic widgets
Odoo - CMS dynamic widgetsOdoo
 
Impact of the New ORM on Your Modules
Impact of the New ORM on Your ModulesImpact of the New ORM on Your Modules
Impact of the New ORM on Your ModulesOdoo
 
Developing New Widgets for your Views in Owl
Developing New Widgets for your Views in OwlDeveloping New Widgets for your Views in Owl
Developing New Widgets for your Views in OwlOdoo
 
ASP.NET Web API
ASP.NET Web APIASP.NET Web API
ASP.NET Web APIhabib_786
 
Empower your App by Inheriting from Odoo Mixins
Empower your App by Inheriting from Odoo MixinsEmpower your App by Inheriting from Odoo Mixins
Empower your App by Inheriting from Odoo MixinsOdoo
 
External dependencies ,pre init hook &amp; post init hook in odoo
External dependencies ,pre init hook &amp; post init hook in odooExternal dependencies ,pre init hook &amp; post init hook in odoo
External dependencies ,pre init hook &amp; post init hook in odooCeline George
 
Empower your App by Inheriting from Odoo Mixins
Empower your App by Inheriting from Odoo MixinsEmpower your App by Inheriting from Odoo Mixins
Empower your App by Inheriting from Odoo MixinsOdoo
 
CQRS and Event Sourcing in a Symfony application
CQRS and Event Sourcing in a Symfony applicationCQRS and Event Sourcing in a Symfony application
CQRS and Event Sourcing in a Symfony applicationSamuel ROZE
 
Introduction to the linux command line.pdf
Introduction to the linux command line.pdfIntroduction to the linux command line.pdf
Introduction to the linux command line.pdfCesleySCruz
 
Getting Started With Linux Administration
Getting Started With Linux AdministrationGetting Started With Linux Administration
Getting Started With Linux AdministrationEdureka!
 
Oracle apex training
Oracle apex trainingOracle apex training
Oracle apex trainingVasudha India
 
Asynchronous JS in Odoo
Asynchronous JS in OdooAsynchronous JS in Odoo
Asynchronous JS in OdooOdoo
 
Tools for Solving Performance Issues
Tools for Solving Performance IssuesTools for Solving Performance Issues
Tools for Solving Performance IssuesOdoo
 
How to Build Custom Module in Odoo 15
How to Build Custom Module in Odoo 15How to Build Custom Module in Odoo 15
How to Build Custom Module in Odoo 15Celine George
 
Odoo icon smart buttons
Odoo   icon smart buttonsOdoo   icon smart buttons
Odoo icon smart buttonsTaieb Kristou
 

What's hot (20)

Odoo 3D Product View with Google Model-Viewer
Odoo 3D Product View with Google Model-ViewerOdoo 3D Product View with Google Model-Viewer
Odoo 3D Product View with Google Model-Viewer
 
Deploying & Scaling your Odoo Server
Deploying & Scaling your Odoo ServerDeploying & Scaling your Odoo Server
Deploying & Scaling your Odoo Server
 
Odoo - CMS dynamic widgets
Odoo - CMS dynamic widgetsOdoo - CMS dynamic widgets
Odoo - CMS dynamic widgets
 
Impact of the New ORM on Your Modules
Impact of the New ORM on Your ModulesImpact of the New ORM on Your Modules
Impact of the New ORM on Your Modules
 
Developing New Widgets for your Views in Owl
Developing New Widgets for your Views in OwlDeveloping New Widgets for your Views in Owl
Developing New Widgets for your Views in Owl
 
ASP.NET Web API
ASP.NET Web APIASP.NET Web API
ASP.NET Web API
 
Empower your App by Inheriting from Odoo Mixins
Empower your App by Inheriting from Odoo MixinsEmpower your App by Inheriting from Odoo Mixins
Empower your App by Inheriting from Odoo Mixins
 
External dependencies ,pre init hook &amp; post init hook in odoo
External dependencies ,pre init hook &amp; post init hook in odooExternal dependencies ,pre init hook &amp; post init hook in odoo
External dependencies ,pre init hook &amp; post init hook in odoo
 
Empower your App by Inheriting from Odoo Mixins
Empower your App by Inheriting from Odoo MixinsEmpower your App by Inheriting from Odoo Mixins
Empower your App by Inheriting from Odoo Mixins
 
CQRS and Event Sourcing in a Symfony application
CQRS and Event Sourcing in a Symfony applicationCQRS and Event Sourcing in a Symfony application
CQRS and Event Sourcing in a Symfony application
 
Introduction to the linux command line.pdf
Introduction to the linux command line.pdfIntroduction to the linux command line.pdf
Introduction to the linux command line.pdf
 
Getting Started With Linux Administration
Getting Started With Linux AdministrationGetting Started With Linux Administration
Getting Started With Linux Administration
 
Oracle apex training
Oracle apex trainingOracle apex training
Oracle apex training
 
Asynchronous JS in Odoo
Asynchronous JS in OdooAsynchronous JS in Odoo
Asynchronous JS in Odoo
 
Laravel 5 framework
Laravel 5 frameworkLaravel 5 framework
Laravel 5 framework
 
Tools for Solving Performance Issues
Tools for Solving Performance IssuesTools for Solving Performance Issues
Tools for Solving Performance Issues
 
Widgets in odoo
Widgets in odooWidgets in odoo
Widgets in odoo
 
How to Build Custom Module in Odoo 15
How to Build Custom Module in Odoo 15How to Build Custom Module in Odoo 15
How to Build Custom Module in Odoo 15
 
Odoo icon smart buttons
Odoo   icon smart buttonsOdoo   icon smart buttons
Odoo icon smart buttons
 
Express JS
Express JSExpress JS
Express JS
 

Viewers also liked

AWS初心者向けWebinar .NET開発者のためのAWS超入門
AWS初心者向けWebinar .NET開発者のためのAWS超入門AWS初心者向けWebinar .NET開発者のためのAWS超入門
AWS初心者向けWebinar .NET開発者のためのAWS超入門Amazon Web Services Japan
 
Take Better Care of Library Data and Spreadsheets with Google Visualization A...
Take Better Care of Library Data and Spreadsheets with Google Visualization A...Take Better Care of Library Data and Spreadsheets with Google Visualization A...
Take Better Care of Library Data and Spreadsheets with Google Visualization A...Bohyun Kim
 
Odoo (OpenERP) - Creating a module
Odoo (OpenERP) - Creating a moduleOdoo (OpenERP) - Creating a module
Odoo (OpenERP) - Creating a moduleTarun Behal
 
How to configure PyCharm for Odoo development in Windows?
How to configure PyCharm for Odoo development in Windows?How to configure PyCharm for Odoo development in Windows?
How to configure PyCharm for Odoo development in Windows?Celine George
 
Development Odoo Basic
Development Odoo BasicDevelopment Odoo Basic
Development Odoo BasicMario IC
 
Xml operations in odoo
Xml operations in odooXml operations in odoo
Xml operations in odooCeline George
 
Timesheet based payroll
Timesheet based payrollTimesheet based payroll
Timesheet based payrollCeline George
 
User Manual For Crafito Odoo Theme
User Manual For Crafito Odoo ThemeUser Manual For Crafito Odoo Theme
User Manual For Crafito Odoo ThemeAppJetty
 
Odoo - Backend modules in v8
Odoo - Backend modules in v8Odoo - Backend modules in v8
Odoo - Backend modules in v8Odoo
 

Viewers also liked (10)

AWS初心者向けWebinar .NET開発者のためのAWS超入門
AWS初心者向けWebinar .NET開発者のためのAWS超入門AWS初心者向けWebinar .NET開発者のためのAWS超入門
AWS初心者向けWebinar .NET開発者のためのAWS超入門
 
Take Better Care of Library Data and Spreadsheets with Google Visualization A...
Take Better Care of Library Data and Spreadsheets with Google Visualization A...Take Better Care of Library Data and Spreadsheets with Google Visualization A...
Take Better Care of Library Data and Spreadsheets with Google Visualization A...
 
Odoo (OpenERP) - Creating a module
Odoo (OpenERP) - Creating a moduleOdoo (OpenERP) - Creating a module
Odoo (OpenERP) - Creating a module
 
How to configure PyCharm for Odoo development in Windows?
How to configure PyCharm for Odoo development in Windows?How to configure PyCharm for Odoo development in Windows?
How to configure PyCharm for Odoo development in Windows?
 
Development Odoo Basic
Development Odoo BasicDevelopment Odoo Basic
Development Odoo Basic
 
Xml operations in odoo
Xml operations in odooXml operations in odoo
Xml operations in odoo
 
Timesheet based payroll
Timesheet based payrollTimesheet based payroll
Timesheet based payroll
 
Odoo Web Services
Odoo Web ServicesOdoo Web Services
Odoo Web Services
 
User Manual For Crafito Odoo Theme
User Manual For Crafito Odoo ThemeUser Manual For Crafito Odoo Theme
User Manual For Crafito Odoo Theme
 
Odoo - Backend modules in v8
Odoo - Backend modules in v8Odoo - Backend modules in v8
Odoo - Backend modules in v8
 

Similar to Create fully customized themes for Odoo websites

A High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI CompositionA High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI CompositionAlexey Gravanov
 
Ilivanov Alexander.How to make best theme.DrupalCamp Kyiv 2011
Ilivanov Alexander.How to make best theme.DrupalCamp Kyiv 2011Ilivanov Alexander.How to make best theme.DrupalCamp Kyiv 2011
Ilivanov Alexander.How to make best theme.DrupalCamp Kyiv 2011camp_drupal_ua
 
Prioritize your critical css and images to render your site fast velocity ny...
Prioritize your critical css and images to render your site fast  velocity ny...Prioritize your critical css and images to render your site fast  velocity ny...
Prioritize your critical css and images to render your site fast velocity ny...Jan-Willem Maessen
 
20190118_NetadashiMeetup#8_React2019
20190118_NetadashiMeetup#8_React201920190118_NetadashiMeetup#8_React2019
20190118_NetadashiMeetup#8_React2019Makoto Mori
 
Magento 2 theming - knowledge sharing session by suman kc
Magento 2 theming - knowledge sharing session by suman kcMagento 2 theming - knowledge sharing session by suman kc
Magento 2 theming - knowledge sharing session by suman kcSuman KC
 
Introduction Django
Introduction DjangoIntroduction Django
Introduction DjangoWade Austin
 
Jquery tutorial
Jquery tutorialJquery tutorial
Jquery tutorialBui Kiet
 
An Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI CompositionAn Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI CompositionDr. Arif Wider
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress WebsitesKyle Cearley
 
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...tdc-globalcode
 
TurboGears2 Pluggable Applications
TurboGears2 Pluggable ApplicationsTurboGears2 Pluggable Applications
TurboGears2 Pluggable ApplicationsAlessandro Molina
 
HTML5 Essential Training
HTML5 Essential TrainingHTML5 Essential Training
HTML5 Essential TrainingKaloyan Kosev
 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Eric Palakovich Carr
 
Joomla Beginner Template Presentation
Joomla Beginner Template PresentationJoomla Beginner Template Presentation
Joomla Beginner Template Presentationalledia
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!David Gibbons
 
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine DevelopmentEECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine DevelopmentFortySeven Media
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)christopherfross
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012crokitta
 
Responsive design in plone
Responsive design in ploneResponsive design in plone
Responsive design in ploneAlin Voinea
 

Similar to Create fully customized themes for Odoo websites (20)

A High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI CompositionA High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI Composition
 
Ilivanov Alexander.How to make best theme.DrupalCamp Kyiv 2011
Ilivanov Alexander.How to make best theme.DrupalCamp Kyiv 2011Ilivanov Alexander.How to make best theme.DrupalCamp Kyiv 2011
Ilivanov Alexander.How to make best theme.DrupalCamp Kyiv 2011
 
Prioritize your critical css and images to render your site fast velocity ny...
Prioritize your critical css and images to render your site fast  velocity ny...Prioritize your critical css and images to render your site fast  velocity ny...
Prioritize your critical css and images to render your site fast velocity ny...
 
20190118_NetadashiMeetup#8_React2019
20190118_NetadashiMeetup#8_React201920190118_NetadashiMeetup#8_React2019
20190118_NetadashiMeetup#8_React2019
 
Magento 2 theming - knowledge sharing session by suman kc
Magento 2 theming - knowledge sharing session by suman kcMagento 2 theming - knowledge sharing session by suman kc
Magento 2 theming - knowledge sharing session by suman kc
 
Introduction Django
Introduction DjangoIntroduction Django
Introduction Django
 
Jquery tutorial
Jquery tutorialJquery tutorial
Jquery tutorial
 
An Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI CompositionAn Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI Composition
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
 
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
 
TurboGears2 Pluggable Applications
TurboGears2 Pluggable ApplicationsTurboGears2 Pluggable Applications
TurboGears2 Pluggable Applications
 
HTML5 Essential Training
HTML5 Essential TrainingHTML5 Essential Training
HTML5 Essential Training
 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!
 
Discovering Django - zekeLabs
Discovering Django - zekeLabsDiscovering Django - zekeLabs
Discovering Django - zekeLabs
 
Joomla Beginner Template Presentation
Joomla Beginner Template PresentationJoomla Beginner Template Presentation
Joomla Beginner Template Presentation
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!
 
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine DevelopmentEECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
 
Responsive design in plone
Responsive design in ploneResponsive design in plone
Responsive design in plone
 

More from Odoo

Timesheet Workshop: The Timesheet App People Love!
Timesheet Workshop: The Timesheet App People Love!Timesheet Workshop: The Timesheet App People Love!
Timesheet Workshop: The Timesheet App People Love!Odoo
 
Keynote - Vision & Strategy
Keynote - Vision & StrategyKeynote - Vision & Strategy
Keynote - Vision & StrategyOdoo
 
Opening Keynote - Unveilling Odoo 14
Opening Keynote - Unveilling Odoo 14Opening Keynote - Unveilling Odoo 14
Opening Keynote - Unveilling Odoo 14Odoo
 
Extending Odoo with a Comprehensive Budgeting and Forecasting Capability
Extending Odoo with a Comprehensive Budgeting and Forecasting CapabilityExtending Odoo with a Comprehensive Budgeting and Forecasting Capability
Extending Odoo with a Comprehensive Budgeting and Forecasting CapabilityOdoo
 
Managing Multi-channel Selling with Odoo
Managing Multi-channel Selling with OdooManaging Multi-channel Selling with Odoo
Managing Multi-channel Selling with OdooOdoo
 
Product Configurator: Advanced Use Case
Product Configurator: Advanced Use CaseProduct Configurator: Advanced Use Case
Product Configurator: Advanced Use CaseOdoo
 
Accounting Automation: How Much Money We Saved and How?
Accounting Automation: How Much Money We Saved and How?Accounting Automation: How Much Money We Saved and How?
Accounting Automation: How Much Money We Saved and How?Odoo
 
Rock Your Logistics with Advanced Operations
Rock Your Logistics with Advanced OperationsRock Your Logistics with Advanced Operations
Rock Your Logistics with Advanced OperationsOdoo
 
Transition from a cost to a flow-centric organization
Transition from a cost to a flow-centric organizationTransition from a cost to a flow-centric organization
Transition from a cost to a flow-centric organizationOdoo
 
Synchronization: The Supply Chain Response to Overcome the Crisis
Synchronization: The Supply Chain Response to Overcome the CrisisSynchronization: The Supply Chain Response to Overcome the Crisis
Synchronization: The Supply Chain Response to Overcome the CrisisOdoo
 
Running a University with Odoo
Running a University with OdooRunning a University with Odoo
Running a University with OdooOdoo
 
Down Payments on Purchase Orders in Odoo
Down Payments on Purchase Orders in OdooDown Payments on Purchase Orders in Odoo
Down Payments on Purchase Orders in OdooOdoo
 
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach food
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach foodOdoo Implementation in Phases - Success Story of a Retail Chain 3Sach food
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach foodOdoo
 
Migration from Salesforce to Odoo
Migration from Salesforce to OdooMigration from Salesforce to Odoo
Migration from Salesforce to OdooOdoo
 
Preventing User Mistakes by Using Machine Learning
Preventing User Mistakes by Using Machine LearningPreventing User Mistakes by Using Machine Learning
Preventing User Mistakes by Using Machine LearningOdoo
 
Becoming an Odoo Expert: How to Prepare for the Certification
Becoming an Odoo Expert: How to Prepare for the Certification Becoming an Odoo Expert: How to Prepare for the Certification
Becoming an Odoo Expert: How to Prepare for the Certification Odoo
 
Instant Printing of any Odoo Report or Shipping Label
Instant Printing of any Odoo Report or Shipping LabelInstant Printing of any Odoo Report or Shipping Label
Instant Printing of any Odoo Report or Shipping LabelOdoo
 
How Odoo helped an Organization Grow 3 Fold
How Odoo helped an Organization Grow 3 FoldHow Odoo helped an Organization Grow 3 Fold
How Odoo helped an Organization Grow 3 FoldOdoo
 
From Shopify to Odoo
From Shopify to OdooFrom Shopify to Odoo
From Shopify to OdooOdoo
 
Digital Transformation at Old MacDonald Farms: A Personal Story
Digital Transformation at Old MacDonald Farms: A Personal StoryDigital Transformation at Old MacDonald Farms: A Personal Story
Digital Transformation at Old MacDonald Farms: A Personal StoryOdoo
 

More from Odoo (20)

Timesheet Workshop: The Timesheet App People Love!
Timesheet Workshop: The Timesheet App People Love!Timesheet Workshop: The Timesheet App People Love!
Timesheet Workshop: The Timesheet App People Love!
 
Keynote - Vision & Strategy
Keynote - Vision & StrategyKeynote - Vision & Strategy
Keynote - Vision & Strategy
 
Opening Keynote - Unveilling Odoo 14
Opening Keynote - Unveilling Odoo 14Opening Keynote - Unveilling Odoo 14
Opening Keynote - Unveilling Odoo 14
 
Extending Odoo with a Comprehensive Budgeting and Forecasting Capability
Extending Odoo with a Comprehensive Budgeting and Forecasting CapabilityExtending Odoo with a Comprehensive Budgeting and Forecasting Capability
Extending Odoo with a Comprehensive Budgeting and Forecasting Capability
 
Managing Multi-channel Selling with Odoo
Managing Multi-channel Selling with OdooManaging Multi-channel Selling with Odoo
Managing Multi-channel Selling with Odoo
 
Product Configurator: Advanced Use Case
Product Configurator: Advanced Use CaseProduct Configurator: Advanced Use Case
Product Configurator: Advanced Use Case
 
Accounting Automation: How Much Money We Saved and How?
Accounting Automation: How Much Money We Saved and How?Accounting Automation: How Much Money We Saved and How?
Accounting Automation: How Much Money We Saved and How?
 
Rock Your Logistics with Advanced Operations
Rock Your Logistics with Advanced OperationsRock Your Logistics with Advanced Operations
Rock Your Logistics with Advanced Operations
 
Transition from a cost to a flow-centric organization
Transition from a cost to a flow-centric organizationTransition from a cost to a flow-centric organization
Transition from a cost to a flow-centric organization
 
Synchronization: The Supply Chain Response to Overcome the Crisis
Synchronization: The Supply Chain Response to Overcome the CrisisSynchronization: The Supply Chain Response to Overcome the Crisis
Synchronization: The Supply Chain Response to Overcome the Crisis
 
Running a University with Odoo
Running a University with OdooRunning a University with Odoo
Running a University with Odoo
 
Down Payments on Purchase Orders in Odoo
Down Payments on Purchase Orders in OdooDown Payments on Purchase Orders in Odoo
Down Payments on Purchase Orders in Odoo
 
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach food
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach foodOdoo Implementation in Phases - Success Story of a Retail Chain 3Sach food
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach food
 
Migration from Salesforce to Odoo
Migration from Salesforce to OdooMigration from Salesforce to Odoo
Migration from Salesforce to Odoo
 
Preventing User Mistakes by Using Machine Learning
Preventing User Mistakes by Using Machine LearningPreventing User Mistakes by Using Machine Learning
Preventing User Mistakes by Using Machine Learning
 
Becoming an Odoo Expert: How to Prepare for the Certification
Becoming an Odoo Expert: How to Prepare for the Certification Becoming an Odoo Expert: How to Prepare for the Certification
Becoming an Odoo Expert: How to Prepare for the Certification
 
Instant Printing of any Odoo Report or Shipping Label
Instant Printing of any Odoo Report or Shipping LabelInstant Printing of any Odoo Report or Shipping Label
Instant Printing of any Odoo Report or Shipping Label
 
How Odoo helped an Organization Grow 3 Fold
How Odoo helped an Organization Grow 3 FoldHow Odoo helped an Organization Grow 3 Fold
How Odoo helped an Organization Grow 3 Fold
 
From Shopify to Odoo
From Shopify to OdooFrom Shopify to Odoo
From Shopify to Odoo
 
Digital Transformation at Old MacDonald Farms: A Personal Story
Digital Transformation at Old MacDonald Farms: A Personal StoryDigital Transformation at Old MacDonald Farms: A Personal Story
Digital Transformation at Old MacDonald Farms: A Personal Story
 

Recently uploaded

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Recently uploaded (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Create fully customized themes for Odoo websites

  • 1. Create Themes for Website By Fabien Pinckaers - Founder & CEO, Odoo
  • 2. Topics 1. Introduction Classical workflow Odoo's CMS workflow 2. Tutorial Starting with a single page Snippets Options Custom Css 3. Examples · · · · · ·
  • 5. Working with Odoo CMS Start a new project.
  • 6. Classical workflow Add new features or pages.
  • 7. Working with Odoo CMS Add new features or pages.
  • 9. A Theme? A Theme is an Odoo's MODULEA Theme is an Odoo's MODULE (Without Python Logic)
  • 10. Structure of a Theme My Theme static src js, css, font, xml, img views my_theme.xml snippets.xml options.xml pages.xml (static pages) [...] · · · · · · · · · ·
  • 12. Starting with an HTML page Let's start with the homepage. views/pages.xml 1 2 3 4 5 6 7 8 9 10 11 12 13 [...] <template<template id="website.homepage" name="Homepage" page="True">> <html><html> <head><head> <title><title>Title</title></title> </head></head> <body><body> <h1><h1> Hello, World! </h1></h1> </body></body> </html></html> </template></template> [...]
  • 13. Starting with an HTML page Add the Odoo context : ( with Bootstrap front-end framework, Edition bar, Snippets, etc. ) views/pages.xml 1 2 3 4 5 6 7 [...] <template<template id="website.homepage" name="Homepage" page="True">> <t<t t-call="website.layout">> <h1><h1> Hello, World!</h1></h1> </t></t> </template></template> [...]
  • 14. Starting with an HTML page It's possible to create all the pages like this way. views/pages.xml 1 2 3 4 5 6 7 8 [...]> <template<template id="website.homepage" name="Homepage" page="True">> <t<t t-call="website.layout">> <div<div id="wrap" class="oe_structure">> <!-- Your HTML code here --> </div></div> </t></t> [...] Adding the class "oe_structure" allows you to use this cool feature: SnippetsSnippets.
  • 16. Build with snippets But instead of creating all the pages this way, we think about using "Building Blocks". We call them "SnippetsSnippets". Block of html code usable everywhere. Draggable in your page. Can contain Javascript or/and Css logics. · · ·
  • 17.
  • 18.
  • 19. A very Simple Snippet Structure of a snippet. views/snippets.xml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 [...] <template<template id="my_theme_snippets" inherit_id="website.snippets" name="My Theme snippets">> <xpath<xpath expr="//div[@id='snippet_structure']" position="inside">> <div><div> <!-- Thumbnail --> <div<div class="oe_snippet_thumbnail">> <img<img class="oe_snippet_thumbnail_img" src="/my_theme/static/src/img/snippet/snippet_thumbs.png"/>/> <span<span class="oe_snippet_thumbnail_title">>My Snippet</span></span> </div></div> <!-- Snippet Body --> <section<section class="oe_snippet_body mt_simple_snippet">> <div<div class="container">> <hr<hr />/> <h1<h1 class="text-center mb32 mt32">>This is a simple snippet</h1></h1> <hr<hr />/> </div></div> </section></section> </div></div> </xpath></xpath> </template></template> [...]
  • 20. Customize my Snippet We can customize this simple snippet with Sass/Css. static/src/css/my_theme.sass 1 2 3 4 5 6 // Pure compass imports @import@import "compass/css3" @import@import "bootstrap" // Create CSS only for snippet @import@import "my_theme-snippet.sass" static/src/css/my_theme-snippet.sass 1 2 3 4 5 6 7 8 9 10 @font-face@font-face font-family:: 'BebasNeue' src:: url('/my_theme/static/src/font/BebasNeue Bold.ttf') src:: local(("BebasNeue Book")),, urlurl(('/my_theme/static/src/font/BebasNeue Bold.ttf')) formatformat(("truetype")) .mt_simple_snippet h1h1 font-family:: 'BebasNeue' font-size:: 55emem
  • 21. Customize my Snippet To insert this new Css we need to extend the theme template and replace the default bootstrap by our new Css. views/my_theme.xml 1 2 3 4 5 6 7 [...] <template<template id="theme" inherit_id="website.theme" name="My Theme Assets">> <xpath<xpath expr="//link[@id='bootstrap_css']" position="replace">> <link<link rel="stylesheet" type="text/css" href="/my_theme/static/src/css/my_theme.css" />/> </xpath></xpath> </template></template> [...]
  • 22. Snippet & Javascript It's possible to add javascript logicjavascript logic when a snippet has been dropped or appears in the page. static/src/js/snippet.js 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ((functionfunction()() {{ 'use strict';; varvar website == openerp..website;; website..openerp_website == {};{}; website..snippet..animationRegistry..my_snippet == website..snippet..Animation..extend({({ selector :: ".mt_simple_snippet",, start:: functionfunction(){(){ varvar h1 == thisthis..$el..find(("h1");); varvar h1_width == h1..width();(); h1..css(('width',,00);); h1..animate(( {{ width:: h1_width },}, 30003000 );); },}, });}); })();})();
  • 23. Snippet & Javascript Just inherits from "website.assets_frontend" template to enable it. views/my_theme.xml 1 2 3 4 5 6 7 8 [...] <template<template id="assets_frontend" inherit_id="website.assets_frontend" name="My Theme Front End Assets">> <xpath<xpath expr="." position="inside">> <script<script src="/my_theme/static/src/js/snippet.js"></script>></script> </xpath></xpath> </template></template> [...]
  • 24. Organize my snippets You can create a new snippet section or insert your snippet into an already present section. New section views/snippet.xml 1 2 3 4 5 6 7 8 9 [...] <template<template id="snippets" inherit_id="website.snippets" name="My Simple Snippet">> <xpath<xpath expr="//ul[@class='nav navbar-nav nav-tabs']" position="inside">> <li><li> <a<a href="#snippet_my_snippet" data-toggle="tab">>My Snippet</a></a> </li></li> </xpath></xpath> </template></template> [...] Insert into "Structure" section. 1 2 3 4 5 6 7 [...] <template<template id="my_theme_snippets" inherit_id="website.snippets" name="My Theme snippets">> <xpath<xpath expr="//div[@id='snippet_structure']" position="inside">> <div><div><!-- Your snippet --></div></div> </xpath></xpath> </template></template> [...]
  • 26. Add Options We can add options for every snippets or blocks. In our case, we add 2 options ( patterns background) for the snippet created before. views/options.xml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [...] <template<template id="my_theme_snippet_option" name="My Snippet Options" inherit_id="website.snippet_options">> <xpath<xpath expr="." position="inside">> <div<div data-snippet-option-id="my_theme_snippet_option" data-selector=".mt_simple_snippet" data-selector-children=".oe_structure">> <li<li class="dropdown-submenu">> <a<a tabindex="-1" href="#">>Pattern</a></a> <ul<ul class="dropdown-menu">> <li<li data-value="tweed"><a>><a>Tweed</a></li></a></li> <li<li data-value="sprinkles"><a>><a>Sprinkles</a></li></a></li> </ul></ul> </li></li> </div></div> </xpath></xpath> [...]
  • 27. Add Options In fact, it adds a class-name to the data-selector. And now, simply create the Css to have the desired result. static/src/css/my_theme-options.sass 1 2 3 4 5 6 7 8 9 10 11 12 13 14 .mt_simple_snippet &&.tweed background-image:: url(/my_theme/static/src/img/backgrounds/patterns/tweed2.png) h1h1 color:: rgb((255255,,255255,,255255)) hrhr border-top:: 11pxpx solid dashed rgba((255255,,255255,,255255,.,.88)) &&.sprinkles background-image:: url(/my_theme/static/src/img/backgrounds/patterns/sprinkles.png) h1h1 color:: rgb((120120,,120120,,120120)) +text-shadow+text-shadow((00 00 55pxpx rgba((00,,00,,00,.,.33)))) hrhr border-top:: 11pxpx solid solid rgba((00,,00,,00,.,.88))
  • 28. Custom Css We can override Bootstrap variables to create your theme. static/src/css/my_theme.sass 1 2 3 4 5 6 7 8 9 10 11 12 13 // Override Bootstrap variables $brand-primary:: rgb((120120,,120120,,120120)) $brand-success:: rgb((9494,,148148,,162162)) // Pure compass imports @import@import "compass/css3" @import@import "bootstrap" // Create CSS only for snippet @import@import "my_theme-snippet.sass" // Create CSS only for options @import@import "my_theme-options.sass"
  • 30. Summary Infinite customizations Easy to understand Template inherits Bootstrap based Only imagination is your limit Robust Odoo back-end behind ... and so much things will come... and so much things will come :):) · · · · · ·
  • 32.
  • 33.
  • 34.
  • 35. Thank you And we are hiring a webdesigner. Contact cde@odoo.com for more informations.