Create template UI

Qweb allow us to insert HTML, HTML5 to display in the openerp. To do this we need to
  1. create a xml file under static/src/xml
  2. load the template using the js file
  3. Update _ _openerp_ _.py of the new xml template

Create myweb.xml

  • Create myweb.xml under static/src/xml
  • Insert the following content into the xml file
template.png

attribute
description
t-name
name that identified by qweb to insert into the appropriate module. The format is <module name>.action
Eg. myweb.action (myweb is the module name)

Insert template into javascript

  • Add/Modify /static/src/js/first_module.js by replacing with the following content
    template.png
  • myweb.action is the template name that created using t-name attribute

Update the new template into _ _openerp_ _.py

  • add the xml template into _ _openerp_ _.py
    • 'qweb':['static/src/xml/*.xml'],