I try to write a custom module where the web_kanban modul is inherited:
<template>
<t t-name="KanbanView">
<div class="oe_kanban_view">
<div class="oe_kanban_buttons"/>
<table class="oe_kanban_groups">
<tr class="oe_kanban_groups_headers">
<td class="oe_kanban_dummy_cell"><div/></td>
</tr>
<tr class="oe_kanban_groups_records">
<td class="oe_kanban_dummy_cell"><div/></td>
</tr>
</table>
</div>
</t>
[...]
</template>
For testing reasons I only added a div tag with an ID to check if my changes are visible:
<t t-extend="KanbanView">
<t t-jquery=".oe_kanban_view" t-operation="replace">
<div class="oe_kanban_view">
<div id="change_test"/>
<div class="oe_kanban_buttons"/>
<table class="oe_kanban_groups">
<tr class="oe_kanban_groups_headers">
<td class="oe_kanban_dummy_cell"><div/></td>
</tr>
<tr class="oe_kanban_groups_records">
<td class="oe_kanban_dummy_cell"><div/></td>
</tr>
</table>
</div>
</t>
</t>
I works fine in my custom module, but also affects different views in openERP!
For example: If I check the kanban View of [Settings / Installed Modules] I will also find:
<div id="change_test"></div>
Can someone explain this behavior? Do I understand the inheritance right?
[EDIT]
At http://doc.openerp.com/trunk/web/qweb/ I found this:
t-extend=template BODY
Parameters:
template (String) -- name of the template to extend
Works similarly to OpenERP models: if used on its own, will alter the specified template in-place; if used in conjunction with t-name will create a new template using the old one as a base.
But if i add a t-name like
<t t-extend="KanbanView" t-name="CustomKanbanView">
my custom template isn't used anymore. How do I tell openERP to use my CustomTemplate instead of the standard?