Skip to content
Extraits de code Groupes Projets
Valider d7b3f20b rédigé par Benjamin's avatar Benjamin
Parcourir les fichiers

add attestations

parent 9f64485c
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
'views/training_session_view.xml', 'views/training_session_view.xml',
'report/layout_template.xml', 'report/layout_template.xml',
'report/report_agreement.xml', 'report/report_agreement.xml',
'report/report_attestation.xml',
'report/report_attendance_sheet.xml', 'report/report_attendance_sheet.xml',
'report/report_program.xml', 'report/report_program.xml',
], ],
......
...@@ -17,6 +17,8 @@ class TrainingProgram(models.Model): ...@@ -17,6 +17,8 @@ class TrainingProgram(models.Model):
means = fields.Text(string='Moyens Pédagogiques') means = fields.Text(string='Moyens Pédagogiques')
control = fields.Text(string='Suivi') control = fields.Text(string='Suivi')
evaluation = fields.Text(string='Modalités évaluation') evaluation = fields.Text(string='Modalités évaluation')
nature = fields.Text(string="Nature de l'action")
acquis = fields.Text(string="Acquis de la formation")
students_profile = fields.Text(string='Profil des stagiaires') students_profile = fields.Text(string='Profil des stagiaires')
session_ids = fields.Many2many( session_ids = fields.Many2many(
comodel_name='training.course.session', comodel_name='training.course.session',
......
...@@ -8,6 +8,7 @@ from odoo import models, fields ...@@ -8,6 +8,7 @@ from odoo import models, fields
class TrainingSession(models.Model): class TrainingSession(models.Model):
_name = 'training.session' _name = 'training.session'
_description = 'Training sessions' _description = 'Training sessions'
_order = "sequence,id"
_rec_name = 'session_id' _rec_name = 'session_id'
session_id = fields.Many2one( session_id = fields.Many2one(
......
...@@ -47,6 +47,7 @@ class Training(models.Model): ...@@ -47,6 +47,7 @@ class Training(models.Model):
date_end = fields.Date(string='Fin de la formation') date_end = fields.Date(string='Fin de la formation')
convention = fields.Binary(string="Convention") convention = fields.Binary(string="Convention")
date_convention = fields.Date(string="Date Convention") date_convention = fields.Date(string="Date Convention")
date_attestation = fields.Date(string="Date Attestation")
hours = fields.Integer( hours = fields.Integer(
string='Durée (h)', string='Durée (h)',
compute='_compute_sessions', compute='_compute_sessions',
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</p> </p>
<p>ET</p> <p>ET</p>
<p> <p>
<span t-field="doc.customer_id.name" /> - <span t-field="doc.customer_id.street" /> - <span t-field="doc.customer_id.zip" /> <span t-field="doc.customer_id.city" />. <strong><span t-field="doc.customer_id.name" /></strong> - <span t-field="doc.customer_id.street" /> - <span t-field="doc.customer_id.zip" /> <span t-field="doc.customer_id.city" />.
</p> </p>
<p>Il est établi la présente convention de formation en application des dispositions de la sixième partie du Code du Travail (article L6353-1 à 2 et R6353-1) portant organisation de la formation professionnelle continue tout au long de la vie.</p> <p>Il est établi la présente convention de formation en application des dispositions de la sixième partie du Code du Travail (article L6353-1 à 2 et R6353-1) portant organisation de la formation professionnelle continue tout au long de la vie.</p>
...@@ -80,8 +80,8 @@ ...@@ -80,8 +80,8 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td><span t-field="doc.course_id.name" /></td> <td><span t-field="doc.course_id.name" /></td>
<td><span t-esc="doc.cost" /></td> <td><span t-esc="doc.cost" /></td>
<td><span t-esc="doc.cost * 0.2" /></td> <td><span t-esc="doc.cost * 0.2" /></td>
<td><span t-esc="doc.cost * 1.2" /></td> <td><span t-esc="doc.cost * 1.2" /></td>
</tr> </tr>
......
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="qweb_attestation_pdf">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="doc">
<t t-foreach="doc.student_ids" t-as="student">
<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>ATTESTATION DE FIN DE FORMATION</h1>
</div>
<div class="col-xs-12" style="margin-top: 20px;">
<p>Je soussigné, Benjamin RIVIER, agissant en qualité de gérant au sein de l’organisme de formation Le Filament, enregistré sous le numéro 73310810731, atteste que :</p>
<p><strong><span t-field="student.student_id.name" /></strong></p>
<p>Salarié(e) de la société <strong><span t-field="doc.customer_id.name" /></strong>, située au <span t-field="doc.customer_id.street" />, <span t-field="doc.customer_id.zip" /> <span t-field="doc.customer_id.city" />,</p>
<p>A suivi la formation suivante :</p>
<h2 class="text-center"><span t-field="doc.course_id.name" /></h2>
<h3>OBJECTIFS DE LA FORMATION</h3>
<p t-field="doc.course_id.objective" />
<h3>NATURE DE L’ACTION DE FORMATION</h3>
<p t-field="doc.course_id.nature" />
<h3>MODALITÉS DE LA FORMATION</h3>
<table class="table table-striped">
<tbody>
<tr>
<td style="width: 120px;"><strong>Dates</strong></td>
<td>Du <span t-field="doc.date_begin" /> au <span t-field="doc.date_end" /></td>
<td style="width: 120px;"><strong>Lieu</strong></td>
<td><span t-field="doc.place" /></td>
</tr>
<tr>
<td style="width: 120px;"><strong>Durée</strong></td>
<td><span t-esc="doc.hours" /> heures</td>
<td style="width: 120px;"><strong>Intervenant(s)</strong></td>
<td>
<t t-set="trainers" t-value="doc._get_trainers()"/>
<t t-foreach="trainers" t-as="trainer">
<span t-field="trainer.lastname" /> <span t-field="trainer.firstname" />,
</t>
</td>
</tr>
</tbody>
</table>
<h3>ACQUIS DE LA FORMATION</h3>
<p t-field="doc.course_id.acquis" />
</div>
<div class="col-xs-offset-8 col-xs-4" style="margin-top: 20px;">
Pour valoir ce que de droit <br/>
Fait à Toulouse, le <span t-field="doc.date_attestation" />
</div>
</div>
</div>
</div>
</t>
</t>
</t>
</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_attestation_pdf"
name="lefilament_training.qweb_attestation_pdf"
model="training.training"
string="Formation - Attestations"
report_type="qweb-pdf"
attachment_use="False"
paperformat="paperformat_a4_training"
/>
</data>
</odoo>
\ No newline at end of file
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<span t-field="doc.course_id.students_profile" /> <span t-field="doc.course_id.students_profile" />
</div> </div>
<div class="text-center"> <div class="text-center">
<img src="/lefilament_training/static/src/img/logo-datadock.jpg" style="max-width: 180px;" class="mt64" /> <img src="/lefilament_training/static/src/img/logo-datadock.jpg" style="max-width: 80px;" class="mt64" />
</div> </div>
</div> </div>
</div> </div>
......
...@@ -11,11 +11,21 @@ ...@@ -11,11 +11,21 @@
src: url(../fonts/Lato/Lato-Light.ttf); src: url(../fonts/Lato/Lato-Light.ttf);
font-weight: 300; font-weight: 300;
} }
@font-face {
font-family: Lato;
src: url(../fonts/Lato/Lato-Bold.ttf);
font-weight: bold;
}
@font-face { @font-face {
font-family: Lekton; font-family: Lekton;
src: url(../fonts/Lekton/Lekton-Regular.ttf); src: url(../fonts/Lekton/Lekton-Regular.ttf);
font-weight: normal; font-weight: normal;
} }
@font-face {
font-family: Lekton;
src: url(../fonts/Lekton/Lekton-Bold.ttf);
font-weight: bold;
}
/*************************** /***************************
/** Variables /** Variables
......
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
<field name="control" /> <field name="control" />
<field name="evaluation" /> <field name="evaluation" />
<field name="students_profile" /> <field name="students_profile" />
<field name="nature" />
<field name="acquis" />
</group> </group>
</page> </page>
</notebook> </notebook>
......
...@@ -75,6 +75,9 @@ ...@@ -75,6 +75,9 @@
</group> </group>
</page> </page>
<page name="attestation" string="Attestation"> <page name="attestation" string="Attestation">
<group>
<field name="date_attestation" />
</group>
</page> </page>
<page name="orders" string="Commandes"> <page name="orders" string="Commandes">
<field name="order_ids" readonly="1" /> <field name="order_ids" readonly="1" />
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter