From e20ee266f90836b8a07484e8db67bf667f3fe11e Mon Sep 17 00:00:00 2001
From: Benjamin <35699580+benj-filament@users.noreply.github.com>
Date: Tue, 18 Jun 2019 16:44:13 +0200
Subject: [PATCH] modif rapports

---
 report/layout_template.xml         |  3 +--
 report/report_agreement.xml        | 24 +++++++++++++++++++++++-
 report/report_attendance_sheet.xml | 12 ++++++++++--
 report/report_program.xml          | 10 +++++++++-
 4 files changed, 43 insertions(+), 6 deletions(-)

diff --git a/report/layout_template.xml b/report/layout_template.xml
index 2f90029..f49b362 100644
--- a/report/layout_template.xml
+++ b/report/layout_template.xml
@@ -37,10 +37,9 @@
         <t t-set="company" t-value="res_company"></t>
     </t>
 
-    <t t-call="lefilament_training.training_layout_header" />
+    <!-- <t t-call="lefilament_training.training_layout_header" /> -->
     <t t-raw="0" />
     <t t-call="lefilament_training.training_layout_footer" />
-    <!-- <t t-call="report.external_layout_footer" /> -->
 </template>
 
 </odoo>
diff --git a/report/report_agreement.xml b/report/report_agreement.xml
index 2f590db..effab7c 100644
--- a/report/report_agreement.xml
+++ b/report/report_agreement.xml
@@ -8,6 +8,14 @@
                     <t t-call="lefilament_training.training_layout">
                         <div class="page">
                             <div class="row convention">
+                                <div class="col-xs-6">
+                                    <img src="/lefilament_training/static/src/img/logo-lefilament.png" style="max-width: 180px;"/>
+                                </div>
+                                <div class="col-xs-6 text-right" style="margin-top: 40px;">
+                                    Le Filament<br/>
+                                    32 Rue Riquet, 31000 Toulouse<br/>
+                                    OF n°73 31 081 07 31<br/>
+                                </div>
                                 <div class="col-xs-12" >
                                     <div class="col-xs-12 text-center">
                                         <h1>CONVENTION DE FORMATION PROFESSIONNELLE N°<span t-field="doc.agreement_number" /></h1>
@@ -122,13 +130,27 @@
             </t>
         </template>
 
+        <record id="paperformat_a4_training" model="report.paperformat">
+            <field name="name">A4 Sans Header</field>
+            <field name="default" eval="True"/>
+            <field name="format">A4</field>
+            <field name="orientation">Portrait</field>
+            <field name="margin_top">10</field>
+            <field name="margin_bottom">25</field>
+            <field name="margin_left">10</field>
+            <field name="margin_right">10</field>
+            <field name="header_line" eval="False"/>
+            <field name="header_spacing">0</field>
+            <field name="dpi">90</field>
+        </record>
+
 	    <report id="report_agreement_pdf"
             name="lefilament_training.qweb_agreement_pdf"
             model="training.training"
             string="Formation - Convention"
             report_type="qweb-pdf"
             attachment_use="False"
-            paperformat="report.paperformat_euro"
+            paperformat="paperformat_a4_training"
 	    />
 
     </data>
diff --git a/report/report_attendance_sheet.xml b/report/report_attendance_sheet.xml
index c9e1c2a..0fbf793 100644
--- a/report/report_attendance_sheet.xml
+++ b/report/report_attendance_sheet.xml
@@ -9,6 +9,14 @@
                         <div class="page">
                             <div class="row attendance">
                                 <div class="col-xs-12 content-pdf" >
+                                    <div class="col-xs-6">
+                                        <img src="/lefilament_training/static/src/img/logo-lefilament.png" style="max-width: 180px;"/>
+                                    </div>
+                                    <div class="col-xs-6 text-right" style="margin-top: 40px;">
+                                        Le Filament<br/>
+                                        32 Rue Riquet, 31000 Toulouse<br/>
+                                        OF n°73 31 081 07 31<br/>
+                                    </div>
                                     <div class="col-xs-12 text-center">
                                         <h1>
                                             FORMATION : <span t-field="doc.course_id.name" />
@@ -91,12 +99,12 @@
             <field name="default" eval="True"/>
             <field name="format">A4</field>
             <field name="orientation">Landscape</field>
-            <field name="margin_top">35</field>
+            <field name="margin_top">10</field>
             <field name="margin_bottom">25</field>
             <field name="margin_left">10</field>
             <field name="margin_right">10</field>
             <field name="header_line" eval="False"/>
-            <field name="header_spacing">35</field>
+            <field name="header_spacing">0</field>
             <field name="dpi">90</field>
         </record>
 
diff --git a/report/report_program.xml b/report/report_program.xml
index 596cb8e..0282893 100644
--- a/report/report_program.xml
+++ b/report/report_program.xml
@@ -8,6 +8,14 @@
                     <t t-call="lefilament_training.training_layout">
                         <div class="page">
                             <div class="row convention">
+                                <div class="col-xs-6">
+                                    <img src="/lefilament_training/static/src/img/logo-lefilament.png" style="max-width: 180px;"/>
+                                </div>
+                                <div class="col-xs-6 text-right" style="margin-top: 40px;">
+                                    Le Filament<br/>
+                                    32 Rue Riquet, 31000 Toulouse<br/>
+                                    OF n°73 31 081 07 31<br/>
+                                </div>
                                 <div class="col-xs-12" >
                                     <div class="col-xs-12 text-center">
                                         <h1><span t-field="doc.course_id.name" /></h1>
@@ -72,7 +80,7 @@
             string="Formation - Programme"
             report_type="qweb-pdf"
             attachment_use="False"
-            paperformat="report.paperformat_euro"
+            paperformat="paperformat_a4_training"
 	    />
 
     </data>
-- 
GitLab