October 2019
Beginner to intermediate
504 pages
12h 57m
English
For testing purposes, it was fine to output some text to our web page to verify that our controller is working. When you are designing a full website, however, this can be very tedious, and it is considered bad practice to mix your Python code and logic with your HTML code that you will use to display your website. Templates allow us to more easily separate the programming logic of our applications from the information we display.
Create a file to hold the template we will use to display our rush orders:
sudo nano template.xml
Enter the following code into the editor:
<odoo> <data> <template id="index"> <title>Rush Orders</title> <table> <t t-foreach="rushorders" t-as="rushorder"> <tr> <td><t t-esc="rushorder.name"/></td> ...
Read now
Unlock full access