|
| 1 | +============================================ |
| 2 | +Report Wkhtmltopdf Paperformat from Template |
| 3 | +============================================ |
| 4 | + |
| 5 | +.. |
| 6 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 7 | + !! This file is generated by oca-gen-addon-readme !! |
| 8 | + !! changes will be overwritten. !! |
| 9 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 10 | + !! source digest: sha256:f51a84a5c23884b0f3e2f1eea0f66515c07344324f3dab70449ea0b437b66c17 |
| 11 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 12 | +
|
| 13 | +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png |
| 14 | + :target: https://odoo-community.org/page/development-status |
| 15 | + :alt: Beta |
| 16 | +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png |
| 17 | + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
| 18 | + :alt: License: AGPL-3 |
| 19 | +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github |
| 20 | + :target: https://github.com/OCA/reporting-engine/tree/16.0/report_wkhtmltopdf_paperformat_from_template |
| 21 | + :alt: OCA/reporting-engine |
| 22 | +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
| 23 | + :target: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_wkhtmltopdf_paperformat_from_template |
| 24 | + :alt: Translate me on Weblate |
| 25 | +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png |
| 26 | + :target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=16.0 |
| 27 | + :alt: Try me on Runboat |
| 28 | + |
| 29 | +|badge1| |badge2| |badge3| |badge4| |badge5| |
| 30 | + |
| 31 | +This is a technical module that allows to force a paperformat directly from the |
| 32 | +report QWeb template definition. |
| 33 | + |
| 34 | +This is useful in situations where the report content is dynamically chosen, depending |
| 35 | +on some record conditions, and a different paperformat needs to be used for each. |
| 36 | + |
| 37 | +In core, Odoo already allows to overwrite some paperformat values like the ``margin-top``, |
| 38 | +``header-spacing``, etc.. through special ``data-report-*`` attributes in the root ``html`` |
| 39 | +tag of the report QWeb template. This module extends this feature to allow to overwrite |
| 40 | +the paperformat itself. |
| 41 | + |
| 42 | +**Table of contents** |
| 43 | + |
| 44 | +.. contents:: |
| 45 | + :local: |
| 46 | + |
| 47 | +Usage |
| 48 | +===== |
| 49 | + |
| 50 | +In a report QWeb template, set the ``data_report_paperformat`` variable to the desired |
| 51 | +paperformat ``xmlid``. |
| 52 | + |
| 53 | +For example: |
| 54 | + |
| 55 | +.. code-block:: xml |
| 56 | +
|
| 57 | + <template id="report_invoice" inherit_id="account.report_invoice"> |
| 58 | + <xpath expr="//t[@t-call='web.html_container']" position="before"> |
| 59 | + <t t-set="data_report_paperformat">my_module.paperformat_custom</t> |
| 60 | + </xpath> |
| 61 | + </template> |
| 62 | +
|
| 63 | +Bug Tracker |
| 64 | +=========== |
| 65 | + |
| 66 | +Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_. |
| 67 | +In case of trouble, please check there if your issue has already been reported. |
| 68 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 69 | +`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_wkhtmltopdf_paperformat_from_template%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 70 | + |
| 71 | +Do not contact contributors directly about support or help with technical issues. |
| 72 | + |
| 73 | +Credits |
| 74 | +======= |
| 75 | + |
| 76 | +Authors |
| 77 | +~~~~~~~ |
| 78 | + |
| 79 | +* Camptocamp |
| 80 | + |
| 81 | +Contributors |
| 82 | +~~~~~~~~~~~~ |
| 83 | + |
| 84 | +* `Camptocamp <https://www.camptocamp.com>`_ |
| 85 | + |
| 86 | + * Iván Todorovich <ivan.todorovich@camptocamp.com> |
| 87 | + |
| 88 | +Maintainers |
| 89 | +~~~~~~~~~~~ |
| 90 | + |
| 91 | +This module is maintained by the OCA. |
| 92 | + |
| 93 | +.. image:: https://odoo-community.org/logo.png |
| 94 | + :alt: Odoo Community Association |
| 95 | + :target: https://odoo-community.org |
| 96 | + |
| 97 | +OCA, or the Odoo Community Association, is a nonprofit organization whose |
| 98 | +mission is to support the collaborative development of Odoo features and |
| 99 | +promote its widespread use. |
| 100 | + |
| 101 | +.. |maintainer-ivantodorovich| image:: https://github.com/ivantodorovich.png?size=40px |
| 102 | + :target: https://github.com/ivantodorovich |
| 103 | + :alt: ivantodorovich |
| 104 | + |
| 105 | +Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: |
| 106 | + |
| 107 | +|maintainer-ivantodorovich| |
| 108 | + |
| 109 | +This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/16.0/report_wkhtmltopdf_paperformat_from_template>`_ project on GitHub. |
| 110 | + |
| 111 | +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
0 commit comments