[Odoo12 official developer documentation] [] [a] theme tutorial

Odoo advocating freedom. For developers, odoo there is sufficient space for free play; for the user, odoo corresponding functions can be customized according to their own needs.

Ready to create your own theme yet? well. Before you start, you have to understand some things. This tutorial will guide you to create a theme of odoo.

 

Website Design Notes

This description will outline the basics of odoo theme created.

odoo team created a strong framework, you do not need to know the specific syntax.

Management from the ordinary content to odoo

My header.php and where?

This is usually the first question from Wordpress or Joomla developers to odoo asked.

 

When using an ordinary CMS, often with several files (such as header.php, page.php, post.php, etc.) used to create the basic structure of the site. In these systems, the basic structure of these when you will be upgraded to ensure compatibility, as a design standard. So, even if you have spent hours writing these files, you have not even begun.

This does not happen when you create odoo theme.

odoo default theme structure

odoo with the default theme structure. It provides only minimal structure and layout. When you create your own theme, in fact, it is the second development on the basis of the default theme. In fact, it is always enabled in your settings, it is more like the infrastructure of the CMS we mentioned above, but you do not need to create and maintain it. It is automatically installed when you install odoo, because it is included in the Website Builder module, so it automatically integrated.

So, you can focus on website design, the default theme structure will provide inheritance and basic functions for you.

 

Main features:

  • Provides the basis for the layout of the page, blog and e-commerce
  • Website grower inheritance
  • Basic code snippet
  • AutoComplete Less / Sass compiler
  • Js and css files automatically to simplify and merge

The main technologies:

  • Boostrap
  • JQuery
  • jQuery UI
  • undersore.js

Under think "modular"

Odoo file is not a theme that contains html or php files, and modular framework which is written in xml. Before I never used xml? Do not worry, this will show you how to create your first theme use html knowledge base.

Use the classic web design process, you usually need to write the entire page layout. This will be a static page. Of course, you can update the content, but even the most basic adjustment, your customers need you to do.

Odoo create a theme that will change this view. You will create a block (code segment), and allow customers to choose their form of drag and drop, and create their own layouts. We will call this modular design.

Imagine, odoo theme is actually a series you have to create and landscaping elements and options. As a developer, your goal is to design these elements, in order to ensure that they achieve the desired results, regardless of the user where to place their final choice.

We look at our list tutorial elements:

 

Code segment (or create blocks)

HTML code. User-generated combination code via our website. For each code segment can be defined options and styles. Users can select them according to their needs.

 

Guess you like

Origin www.cnblogs.com/waterdroptec/p/11494523.html
Recommended