Odoo Help


How to modify ViewManager?

Marek Toman
on 4/24/13, 9:45 AM 3,751 views

hi, I want to modify ViewManager header in addons/web/static/xml/base.xml by module. based on this article: help.openerp.com/question/2615/how-to-remove-manage-databases/ I created own module like this:


   'qweb' : ['static/src/xml/base.xml', ],


<?xml version="1.0" encoding="UTF-8"?>
    <t t-extend="ViewManager">
        <t t-jquery="table.oe_view_manager_header" t-operation="replace">
            <table class="oe_view_manager_header">
                <col width="20%" />
                <col width="35%" />
                <col width="15%" />
                <col width="30%" />
                <tr class="oe_header_row oe_header_row_top">
                    <td colspan="2">
                        <h2 class="oe_view_title" t-if="widget.flags.display_title !== false">
                            <span class="oe_view_title_text oe_breadcrumb_title" />
                    <td colspan="2">
                        <div class="oe_view_manager_view_search" t-opentag="true" />
                <tr class="oe_header_row">
                        <div class="oe_view_manager_buttons" />
                    <!-- removed COLSPAN="2" here -->
                        <div class="oe_view_manager_sidebar" />
                    <!-- added <TD> here -->
                        some text
                    <!-- end of edit -->
                        <ul class="oe_view_manager_switch oe_button_group oe_right">
                            <t t-if="widget.views_src.length > 1" t-foreach="widget.views_src" t-as="view">
                                <li class="oe_e">
                                    <a t-attf-class="oe_vm_switch_#{view.view_type}" t-att-data-view-type="view.view_type" t-att-title="view.button_label" />
                        <div class="oe_view_manager_pager oe_right" />

But I cannot manage to get this working. Header just never changes. If I try to edit another view (e.g. web-kanban) Im succesful, but dont know why it is not possible to replace any div or table in ViewManager. Tried to install that module, tried to load it with --load=mymodule,web but no success.


Hiral Patel (hip)

--Hiral Patel (hip)--
| 2 1 5
--Hiral Patel (hip)--

Hiral Patel (hip)
On 8/7/13, 4:32 AM


You need to write your code in between :

<t t-name="ViewManagerAction" t-extend="ViewManager">


As 'ViewManager' is extended in 'ViewManagerAction', You need to make change in 'ViewManagerAction' and not in 'ViewManager'.

On 8/7/13, 12:17 AM

Hi I have same problem with you but after ViewManager I add

<t t-name="ViewManagerAction" t-extend="ViewManager">


It work for me maybe it will work for you :D

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 4/24/13, 9:45 AM
Seen: 3751 times
Last updated: 3/16/15, 8:10 AM