From f0f4d9af2a1f9ae3ff0bdff47012b387f973ec38 Mon Sep 17 00:00:00 2001 From: Raf Geens Date: Thu, 10 Sep 2020 12:21:40 +0000 Subject: [IMP] doc: How to add a print action on a report record If you define a report using `` it will implicitly add that action to a Print menu in the model's views. If you use ```` 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 ``, 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 --- doc/reference/actions.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'doc/reference') 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 `` instead of a `` 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 -- cgit v1.2.3