summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRaf Geens <raf@odoo.com>2020-09-10 12:21:40 +0000
committerRaf Geens <raf@odoo.com>2020-09-10 15:20:07 +0000
commitf0f4d9af2a1f9ae3ff0bdff47012b387f973ec38 (patch)
treea259f0cab9f72b75d7fc15ba3b0366568f0c0fb9 /doc
parent9f171d44cd0d130c907797413b04406af8a1193e (diff)
[IMP] doc: How to add a print action on a report record
If you define a report using `<report>` it will implicitly add that action to a Print menu in the model's views. If you use ``<record>`` to do the same, that won't happen unless you also set `binding_model_id`. In older versions that wasn't really an issue because people mainly used `<report>`, but it was deprecated in 13.5, hence this update. And it applies to versions older than 13.5 as well, I tested until 11.0. X-original-commit: 6768d4190993e95b50785ac4ebf3be7213ef5e3f
Diffstat (limited to 'doc')
-rw-r--r--doc/reference/actions.rst11
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/reference/actions.rst b/doc/reference/actions.rst
index 6c425f7a45e..3801c6e3ab8 100644
--- a/doc/reference/actions.rst
+++ b/doc/reference/actions.rst
@@ -32,6 +32,8 @@ A client can get actions in 4 forms:
* A dictionary
treat as a client action descriptor and execute
+.. _reference/bindings:
+
Bindings
========
@@ -332,7 +334,14 @@ server actions:
Report Actions (``ir.actions.report``)
======================================
-Triggers the printing of a report
+Triggers the printing of a report.
+
+If you define your report through a `<record>` instead of a `<report>` tag and
+want the action to show up in the Print menu of the model's views, you will
+also need to specify ``binding_model_id`` from :ref:`reference/bindings`. It's
+not necessary to set ``binding_type`` to ``report``, since
+``ir.actions.report`` will implicitly default to that.
+
``name`` (mandatory)
only useful as a mnemonic/description of the report when looking for one