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_ of the new xml template

Create myweb.xml

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

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
  • myweb.action is the template name that created using t-name attribute

Update the new template into _ _openerp_

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