From 28d090fd5fecd8e64dd9abc3fdf8d415335ac278 Mon Sep 17 00:00:00 2001 From: Gorash Date: Thu, 23 Jun 2022 12:05:55 +0200 Subject: [PATCH] [IMP] qweb: document 't-cache' and 't-nocache' directives debug mode related with: https://github.com/odoo/odoo/pull/88276 --- .../reference/frontend/framework_overview.rst | 17 ++++++++++++++--- content/developer/reference/frontend/qweb.rst | 10 +++++++--- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/content/developer/reference/frontend/framework_overview.rst b/content/developer/reference/frontend/framework_overview.rst index d05c82112..c5264c60f 100644 --- a/content/developer/reference/frontend/framework_overview.rst +++ b/content/developer/reference/frontend/framework_overview.rst @@ -606,9 +606,10 @@ for two main purposes: - provide some additional tools to help developer debug the Odoo interface. The `debug` mode is described by a string. An empty string means that the `debug` -mode is not active. Otherwise, it is active. If the string contains `assets` or -`tests`, then the corresponding specific sub modes are activated (see below). Both -modes can be active at the same time, for example with the string `assets,tests`. +mode is not active. Otherwise, it is active. If the string contains `assets`, +`disable-t-cache` or `tests`, then the corresponding specific sub modes are +activated (see below). Both modes can be active at the same time, for example +with the string `assets,tests`. The `debug` mode current value can be read in the :ref:`environment`: `env.debug`. @@ -635,6 +636,16 @@ The `debug=assets` sub mode is useful to debug javascript code: once activated, the :ref:`assets` bundles are no longer minified, and source-maps are generated as well. This makes it useful to debug all kind of javascript code. +.. _frontend/framework/t_cache_debug_mode: + +Disable `t-cache` +----------------- + +The `debug=disable-t-cache` sub mode is useful to debug python `t-cache` and +`t-nocache` directives. By activating this debugging mode, the contents of the +`t-cache` directives will be rendered each time. It is therefore possible to +compare the real time rendering with that which is cached. + .. _frontend/framework/tests_debug_mode: Tests mode diff --git a/content/developer/reference/frontend/qweb.rst b/content/developer/reference/frontend/qweb.rst index e057422ee..4960b949f 100644 --- a/content/developer/reference/frontend/qweb.rst +++ b/content/developer/reference/frontend/qweb.rst @@ -684,9 +684,9 @@ Will render (counter = 1)::
(views: 10)
-Here the ```` tag that contains the container will always be rendered. While -the rest is as a single string in the cache. The counter is not updated by the -``t-set`` out of the ``t-nocache`` +Here the ``
`` and ```` tags will always be rendered. While the rest +is as a single string in the cache. The counter is not updated by the ``t-set`` +out of the ``t-nocache`` ``t-nocache-*`` add some primitive values in the cache ''''''''''''''''''''''''''''''''''''''''''''''''''''''' @@ -713,6 +713,10 @@ Example:: The value ``cached_value`` is cached with the cached template part of ``t-cache="records"`` and add to the scoped root values each time. +.. seealso:: + - :ref:`Debug mode ` + + Helpers -------