[FIX] report,*: correct reports without header/footer

Since 3d04e44880 [0], the class `article`
is used instead of `page`. As reports not using `external_layout` does
still manually used `page` class as wrapper, there were not rendered
properly. Force these reports to correctly wrap their content into an
`article` div by using a dedicated template.

Closes #15118

[0] more precisely https://git.io/vM58c
This commit is contained in:
mdi-odoo
2017-01-23 13:00:00 +01:00
committed by Christophe Simonis
parent e83a40f38b
commit 255de89330
9 changed files with 18 additions and 10 deletions
@@ -3,7 +3,7 @@
<!-- template use to render a Registration Badge -->
<template id="event_registration_report_template_badge">
<t t-call="report.html_container">
<t t-call="report.basic_layout">
<t t-foreach="docs" t-as="o">
<div class="page">
<div class="row">
@@ -55,7 +55,7 @@
<!-- template use to edit Event Badget (allow to set the HTML badge fields) -->
<template id="event_event_report_template_badge">
<t t-call="report.html_container">
<t t-call="report.basic_layout">
<div class="page">
<t t-foreach="docs" t-as="event">
<div class="row">
@@ -12,7 +12,7 @@
</record>
<template id="print_employee_badge">
<t t-call="report.html_container">
<t t-call="report.basic_layout">
<div class="page">
<t t-foreach="docs" t-as="employee">
<div class="col-sm-6">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_userlabel">
<t t-call="report.html_container">
<t t-call="report.basic_layout">
<div class="page">
<t t-foreach="docs" t-as="user">
<div class="col-xs-6 mb92">
@@ -33,7 +33,7 @@
</template>
<template id="report_productlabel">
<t t-call="report.html_container">
<t t-call="report.basic_layout">
<div class="page">
<t t-foreach="docs" t-as="product">
<t t-call="product.report_simple_label">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_producttemplatelabel">
<t t-call="report.html_container">
<t t-call="report.basic_layout">
<div class="page">
<t t-foreach="docs" t-as="template">
<t t-foreach="template.product_variant_ids" t-as="product">
+8
View File
@@ -362,4 +362,12 @@
</div>
</template>
<template id="basic_layout">
<t t-call="report.html_container">
<div class="article">
<t t-raw="0" />
</div>
</t>
</template>
</odoo>
@@ -9,7 +9,7 @@
</template>
<template id="report_location_barcode">
<t t-call="report.html_container">
<t t-call="report.basic_layout">
<div t-foreach="[docs[x:x+4] for x in xrange(0, len(docs), 4)]" t-as="page_docs" class="page page_stock_location_barcodes">
<t t-foreach="page_docs" t-as="o">
<t t-if="o.barcode"><t t-set="content" t-value="o.barcode"/></t>
+1 -1
View File
@@ -2,7 +2,7 @@
<odoo>
<data>
<template id="report_lot_barcode">
<t t-call="report.html_container">
<t t-call="report.basic_layout">
<t t-foreach="docs" t-as="o">
<t>
<div class="page">
@@ -2,7 +2,7 @@
<odoo>
<data>
<template id="report_package_barcode">
<t t-call="report.html_container">
<t t-call="report.basic_layout">
<t t-foreach="docs" t-as="o">
<t>
<div class="page">
@@ -51,7 +51,7 @@
</template>
<template id="report_package_barcode_small">
<t t-call="report.html_container">
<t t-call="report.basic_layout">
<t t-foreach="docs" t-as="o">
<t>
<div class="page">