Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
9091 Lượt xem

I'd like to add a template to show project's description when in project.task kanban view.

I've found that there are templates like KanbanView.buttons, ~.Group, ~.LoadMore.

I guess there should be somewhere to append those templates into kanban view but unfortunately, I cannot find it.

What I did is

my_template.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<templates>
<t t-name="eric-kanban-view">
<div>This is Eric's kanban view</div>
</t>
</templates>
</data>
</openerp>

project.xml

<record id="project_task_custom_kanban" model="ir.ui.view">
<field name="inherit_id" ref="project.view_task_kanban"/>
<field name="model">project.task</field>
<field name="arch" type="xml">
<xpath expr="//templates" position="before">
<t t-call="eric-kanban-view"/>
</xpath>
</field>
</record>

But nothing happened.






Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

it seems like whatever you have wrote outside of template but it should be inside the templates.

for example :

<xpath expr="//template" position="inside">

Hope this will help.

Thanks.


Ảnh đại diện
Huỷ bỏ
Tác giả

Thanks for the answer. then is there a way to add a template outside of a template?

Kanban it self is single template, now I don't know what you exactly require

Tác giả

I want to put a new template in between header including create button and search and kanban view.

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 18
1165
1
thg 4 25
1485
2
thg 3 22
6717
4
thg 10 21
7078
1
thg 12 19
8144