summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-03-04 15:16:10 +0100
committerChristophe Simonis <chs@odoo.com>2015-03-04 15:16:10 +0100
commitbc2fd0515b2ee0dafe05d95a76eccb99b35a418c (patch)
tree0cf1fdbaa92b178ce51db635242e611e7d62173e /doc
parent94c33caa784e3017285b55dc68c6726ed50b5f94 (diff)
parent017f346dd36e421877b2a7dfb94b5f805c435238 (diff)
[MERGE] forward port of branch 8.0 up to 017f346
Diffstat (limited to 'doc')
-rw-r--r--doc/cla/individual/LeartS.md11
-rw-r--r--doc/cla/individual/Yenthe666.md11
-rw-r--r--doc/reference/qweb.rst34
3 files changed, 53 insertions, 3 deletions
diff --git a/doc/cla/individual/LeartS.md b/doc/cla/individual/LeartS.md
new file mode 100644
index 00000000000..e5b17efc9ac
--- /dev/null
+++ b/doc/cla/individual/LeartS.md
@@ -0,0 +1,11 @@
+Italy, 3 March 2015
+
+I hereby agree to the terms of the Odoo Individual Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+Leonardo Donelli learts92@gmail.com https://github.com/LeartS
diff --git a/doc/cla/individual/Yenthe666.md b/doc/cla/individual/Yenthe666.md
new file mode 100644
index 00000000000..a28acee7006
--- /dev/null
+++ b/doc/cla/individual/Yenthe666.md
@@ -0,0 +1,11 @@
+Belgium, 02/03/2015
+
+I hereby agree to the terms of the Odoo Individual Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+Yenthe Van Ginneken yenthevg@gmail.com https://github.com/Yenthe666
diff --git a/doc/reference/qweb.rst b/doc/reference/qweb.rst
index 30ef4c25196..81b3966a0fd 100644
--- a/doc/reference/qweb.rst
+++ b/doc/reference/qweb.rst
@@ -335,6 +335,17 @@ website's rich text edition.
``t-field-options`` can be used to customize fields, the most common option
is ``widget``, other options are field- or widget-dependent.
+debugging
+---------
+
+``t-debug``
+ invokes a debugger using PDB's ``set_trace`` API. The parameter should
+ be the name of a module, on which a ``set_trace`` method is called::
+
+ <t t-debug="pdb"/>
+
+ is equivalent to ``importlib.import_module("pdb").set_trace()``
+
Helpers
-------
@@ -477,13 +488,30 @@ The javascript QWeb implementation provides a few debugging hooks:
``t-log``
takes an expression parameter, evaluates the expression during rendering
- and logs its result with ``console.log``
+ and logs its result with ``console.log``::
+
+ <t t-set="foo" t-value="42"/>
+ <t t-log="foo"/>
+
+ will print ``42`` to the console
``t-debug``
- triggers a debugger breakpoint during template rendering
+ triggers a debugger breakpoint during template rendering::
+
+ <t t-if="a_test">
+ <t t-debug="">
+ </t>
+
+ will stop execution if debugging is active (exact condition depend on the
+ browser and its development tools)
``t-js``
the node's body is javascript code executed during template rendering.
Takes a ``context`` parameter, which is the name under which the rendering
- context will be available in the ``t-js``'s body
+ context will be available in the ``t-js``'s body::
+
+ <t t-set="foo" t-value="42"/>
+ <t t-js="ctx">
+ console.log("Foo is", ctx.foo);
+ </t>
Helpers
-------