diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-02-20 13:40:48 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-02-20 13:40:48 +0100 |
| commit | f1ff55bca1242af86cd5feedbf7c4793b96174a1 (patch) | |
| tree | 164453a9cf678e004c2ae82819c51fbd57c0b6ae /doc | |
| parent | 716a272480e649db721c081605368e1bccf8dc91 (diff) | |
| parent | de8cefcef4d456398e5028c52e3bd9db807e5f8a (diff) | |
[MERGE] forward port branch 11.0 up to de8cefcef4d
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/cla/corporate/invitu.md | 3 | ||||
| -rw-r--r-- | doc/cla/individual/naglis.md | 11 | ||||
| -rw-r--r-- | doc/reference/reports.rst | 32 |
3 files changed, 45 insertions, 1 deletions
diff --git a/doc/cla/corporate/invitu.md b/doc/cla/corporate/invitu.md index 3b15373c298..19207d3de2e 100644 --- a/doc/cla/corporate/invitu.md +++ b/doc/cla/corporate/invitu.md @@ -11,5 +11,6 @@ Signed, Cyril Vinh-Tung contact@invitu.com https://github.com/invitu List of contributors: -Cyril Vinh-Tung contact@invitu.com https://github.com/invitu +Cyril Vinh-Tung cyril@invitu.com https://github.com/cvinh +Tymofii Glukhov tima@invitu.com https://github.com/tglukhov diff --git a/doc/cla/individual/naglis.md b/doc/cla/individual/naglis.md new file mode 100644 index 00000000000..dde081dfaa1 --- /dev/null +++ b/doc/cla/individual/naglis.md @@ -0,0 +1,11 @@ +Lithuania, 2019-02-09 + +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, + +Naglis Jonaitis naglis@mailbox.org https://github.com/naglis diff --git a/doc/reference/reports.rst b/doc/reference/reports.rst index ed408a0d817..9b7d2e365e3 100644 --- a/doc/reference/reports.rst +++ b/doc/reference/reports.rst @@ -301,6 +301,38 @@ the function ``render_html`` and pass objects in the ``docargs`` dictionary: } return report_obj.render('module.report_name', docargs) +.. _reference/reports/custom_fonts: + +Custom fonts +============ +If you want to use custom fonts you will need to add your custom font and the related less/CSS to the ``web.reports_assets_common`` assets bundle. +Adding your custom font(s) to ``web.assets_common`` or ``web.assets_backend`` will not make your font available in QWeb reports. + +Example:: + + <template id="report_assets_common_custom_fonts" name="Custom QWeb fonts" inherit_id="web.report_assets_common"> + <xpath expr="." position="inside"> + <link href="/your_module/static/src/less/fonts.less" rel="stylesheet" type="text/less"/> + </xpath> + </template> + +You will need to define your ``@font-face`` within this less file, even if you've used in another assets bundle (other than ``web.reports_assets_common``). + +Example:: + + @font-face { + font-family: 'MonixBold'; + src: local('MonixBold'), local('MonixBold'), url(/your_module/static/src/fonts/MonixBold-Regular.otf) format('opentype'); + } + + .h1-title-big { + font-family: MonixBold; + font-size: 60px; + color: #3399cc; + } + +After you've added the less into your assets bundle you can use the classes - in this example ``h1-title-big`` - in your custom QWeb report. + Reports are web pages ===================== |
