From ce5a8d554dbbe7f5ec7cbaa879c802f7e533b2c9 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Mon, 3 Jun 2024 11:43:51 +0200 Subject: [PATCH] [IMP] reference/user interface: kanban: can_open attribute (Part of) task `3650117` Part-of: odoo/documentation#9604 Related: odoo/odoo#167751 Related: odoo/enterprise#63714 Signed-off-by: Aaron Bohy (aab) --- .../reference/user_interface/view_architectures.rst | 10 ++++++++++ .../tutorials/server_framework_101/14_qwebintro.rst | 6 ++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/content/developer/reference/user_interface/view_architectures.rst b/content/developer/reference/user_interface/view_architectures.rst index 03b1a306a..924284ab1 100644 --- a/content/developer/reference/user_interface/view_architectures.rst +++ b/content/developer/reference/user_interface/view_architectures.rst @@ -2485,6 +2485,16 @@ Optional attributes can be added to the root element `kanban` to customize the v :type: str :default: `''` +.. attribute:: can_open + :noindex: + + By default, clicking on a kanban card opens the corresponding record in a form view. + This behavior can be disabled by setting the attribute `can_open` to `False`. + + :requirement: Optional + :type: bool + :default: `True` + .. include:: view_architectures/root_attribute_sample.rst .. include:: view_architectures/root_attribute_banner_route.rst diff --git a/content/developer/tutorials/server_framework_101/14_qwebintro.rst b/content/developer/tutorials/server_framework_101/14_qwebintro.rst index b4643eb57..5a3b3416f 100644 --- a/content/developer/tutorials/server_framework_101/14_qwebintro.rst +++ b/content/developer/tutorials/server_framework_101/14_qwebintro.rst @@ -45,7 +45,7 @@ looks like: -
+
@@ -58,8 +58,6 @@ Let's break down this example: least one root template ``kanban-box``, which will be rendered once for each record. - ````: ```` is a placeholder element for QWeb directives. In this case, it is used to set the ``name`` of the template to ``kanban-box`` -- ``
``: the ``oe_kanban_global_click`` makes the ``
`` - clickable to open the record. - ````: this will add the ``name`` field to the view. .. exercise:: Make a minimal kanban view. @@ -79,7 +77,7 @@ conditionally, we can use the ``t-if`` directive (see :ref:`reference/qweb/condi -
+
This is new!