December 2018
Beginner to intermediate
404 pages
10h 14m
English
To modify the actual presentation of the web page, we need to extend the QWeb template being used.
We will be extending the library_app.book_list_template to show additional information on the books that are not available.
Add the library_member/views/book_list_template.xml file by using the following code:
<odoo> <template id="book_list_extended" name="Extended Book List" inherit_id="library_app.book_list_template"> <xpath expr="//span[@t-field='book.publisher_id']" position="after"> <t t-if="not book.is_available"> <b>(Not Available)</b> </t> </xpath> </template></odoo>
Web page templates are XML documents, just like the other Odoo View types, and we can use xpath to locate elements and then manipulate them, just ...
Read now
Unlock full access