Modifying an existing handler
When you install the website module, the /website/info
path displays some information about your Odoo instance. In this recipe, we override this in order to change this information page's layout, and also to change what is displayed.
Getting ready
Install the website
module and inspect the /website/info
path. Now, craft a new module that depends on website
and uses the following code.
How to do it...
We'll have to adapt the existing template and override the existing handler:
- Override the
qweb
template in a file calledviews/templates.xml
:
<?xml version="1.0" encoding="UTF-8"?> <odoo> <template id="show_website_info" inherit_id="website.show_website_info"> <xpath expr="//dl[@t-foreach='apps']" position="replace"> <table class="table"> <tr t-foreach="apps" t-as="app"> <th> <a t-att-href="app.website"> <t t-esc="app.name" /></a> ...