Skip to content
Browse files

[MERGE] forward port branch 10.0 up to 6cf4f49

  • Loading branch information...
KangOl committed Feb 19, 2019
2 parents c1fe9f1 + 6cf4f49 commit 9b735d0057f723c90553a7d99c0b666be4864224
Showing with 34 additions and 2 deletions.
  1. +2 −2 addons/stock/views/stock_picking_views.xml
  2. +32 −0 doc/reference/reports.rst
@@ -55,8 +55,8 @@
<field name="use_existing_lots" groups="stock.group_production_lot"/>
<group string="Locations">
<field name="default_location_src_id" attrs="{'required': [('code', '=', 'internal')]}" domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]"/>
<field name="default_location_dest_id" attrs="{'required': [('code', 'in', ('internal', 'incoming'))]}" domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]"/>
<field name="default_location_src_id" attrs="{'required': [('code', '=', 'internal')]}"/>
<field name="default_location_dest_id" attrs="{'required': [('code', 'in', ('internal', 'incoming'))]}"/>
@@ -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.


<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"/>

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``).


@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

0 comments on commit 9b735d0

Please sign in to comment.
You can’t perform that action at this time.