In opportunity kanban view I want to remove certain element. It is a span in web_kanban template with t-name="Kanban.Group". I followed this thread How to inherit a template with no ID in Odoo? and related documentation.
I put this
<t t-extend="KanbanView.Group">
<t t-jquery="span.o_kanban_config" t-operation="replace"></t>
</t>
in opportunities kanban template and I also made it a separate xml:
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template>
<t t-extend="KanbanView.Group">
<t t-jquery="span.o_kanban_config" t-operation="replace"></t>
</t>
</template>
</odoo>
(in this case I appended its name to module's manifest - in 'qweb' list). None of these approaches worked.
Contrary to what I have read about template inheritance, I also tried to use <t t-extend="web_kanban.template">
, just in case Odoo needs the modules name just like when inheriting classic views...
Did I do something wrong or miss something? Is there a better/more suitable way to update template?
SOLVED
Finally it works.
I created a separate xml. As I decided to have folding arrows I put this code in it:
<template>
<t t-extend="KanbanView.Group">
<t t-jquery=".o_kanban_config.dropdown" t-operation="inner">
<a class="o_kanban_toggle_fold" href="#"><i class="fa fa-arrows-h"/></a>
</t>
</t>
</template>
I added a declaration to openerp.py manifest:
'qweb':[
'views/updated_kanban.xml',
],
Now only a folding arrow is displayed, no other options (Edit, duplicate etc.).