Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/developer/howtos/javascript_view.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ can be done in a few steps:

<kanban js_class="custom_kanban">
<templates>
<t t-name="kanban-box">
<t t-name="kanban-card">
<!--Your comment-->
</t>
</templates>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ looks like:

<kanban>
<templates>
<t t-name="kanban-box">
<t t-name="kanban-card">
<div>
<field name="name"/>
</div>
Expand All @@ -55,9 +55,9 @@ looks like:
Let's break down this example:

- ``<templates>``: defines a list of :ref:`reference/qweb` templates. Kanban views *must* define at
least one root template ``kanban-box``, which will be rendered once for each record.
- ``<t t-name="kanban-box">``: ``<t>`` is a placeholder element for QWeb directives. In this case,
it is used to set the ``name`` of the template to ``kanban-box``
least one root template ``kanban-card``, which will be rendered once for each record.
- ``<t t-name="kanban-card">``: ``<t>`` is a placeholder element for QWeb directives. In this case,
it is used to set the ``name`` of the template to ``kanban-card``
- ``<field name="name"/>``: this will add the ``name`` field to the view.

.. exercise:: Make a minimal kanban view.
Expand All @@ -76,7 +76,7 @@ conditionally, we can use the ``t-if`` directive (see :ref:`reference/qweb/condi
<kanban>
<field name="state"/>
<templates>
<t t-name="kanban-box">
<t t-name="kanban-card">
<div>
<field name="name"/>
<div t-if="record.state.raw_value == 'new'">
Expand Down