diff --git a/__manifest__.py b/__manifest__.py index c105b7d7d6c73c624dce8cf4722ab0c4ca3a894e..4f271516e4392e002352dfde183619565bb88001 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -26,6 +26,7 @@ 'views/training_session_view.xml', 'report/layout_template.xml', 'report/report_agreement.xml', + 'report/report_attestation.xml', 'report/report_attendance_sheet.xml', 'report/report_program.xml', ], diff --git a/models/training_course.py b/models/training_course.py index 081c66c1d51c54d399a562fc76a439573f56d6f4..3661d4532a910aad2a196fcf62637fb6dc443210 100644 --- a/models/training_course.py +++ b/models/training_course.py @@ -17,6 +17,8 @@ class TrainingProgram(models.Model): means = fields.Text(string='Moyens Pédagogiques') control = fields.Text(string='Suivi') 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') session_ids = fields.Many2many( comodel_name='training.course.session', diff --git a/models/training_session.py b/models/training_session.py index 8a065bec26690e68548f6c682b404d1e3e14b00d..5ebbc5ad91a6ed9756612a268691c788b60656df 100644 --- a/models/training_session.py +++ b/models/training_session.py @@ -8,6 +8,7 @@ from odoo import models, fields class TrainingSession(models.Model): _name = 'training.session' _description = 'Training sessions' + _order = "sequence,id" _rec_name = 'session_id' session_id = fields.Many2one( diff --git a/models/training_training.py b/models/training_training.py index ce353a14d38b66f6fca5de25a3179b02eb6b3703..971b70a2cae1686be13c2459ac5d8d128833774d 100644 --- a/models/training_training.py +++ b/models/training_training.py @@ -47,6 +47,7 @@ class Training(models.Model): date_end = fields.Date(string='Fin de la formation') convention = fields.Binary(string="Convention") date_convention = fields.Date(string="Date Convention") + date_attestation = fields.Date(string="Date Attestation") hours = fields.Integer( string='Durée (h)', compute='_compute_sessions', diff --git a/report/report_agreement.xml b/report/report_agreement.xml index effab7c2c3d727db94e1b435ba76d84fad6d558a..2a754c92fe097c5b8cea77516b52b782770aef9d 100644 --- a/report/report_agreement.xml +++ b/report/report_agreement.xml @@ -30,7 +30,7 @@ </p> <p>ET</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>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 @@ </thead> <tbody> <tr> - <td><span t-field="doc.course_id.name" /> €</td> - <td><span t-esc="doc.cost" /></td> + <td><span t-field="doc.course_id.name" /></td> + <td><span t-esc="doc.cost" /> €</td> <td><span t-esc="doc.cost * 0.2" /> €</td> <td><span t-esc="doc.cost * 1.2" /> €</td> </tr> diff --git a/report/report_attestation.xml b/report/report_attestation.xml new file mode 100644 index 0000000000000000000000000000000000000000..14f2cb60541922947d833521e31588dd0c87e14e --- /dev/null +++ b/report/report_attestation.xml @@ -0,0 +1,100 @@ +<?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 diff --git a/report/report_program.xml b/report/report_program.xml index 0282893970d8648c26709a2c385fc5e972bb5ec6..dc1359a4b83c4b5c2879a027fdba1fda1d6e41f8 100644 --- a/report/report_program.xml +++ b/report/report_program.xml @@ -64,7 +64,7 @@ <span t-field="doc.course_id.students_profile" /> </div> <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> diff --git a/static/src/less/style.less b/static/src/less/style.less index 9c4c425923c871532f1a113eee6adbee633e55ca..48cd27927bf1d2f758ed52980c6f363b5e525628 100644 --- a/static/src/less/style.less +++ b/static/src/less/style.less @@ -11,11 +11,21 @@ src: url(../fonts/Lato/Lato-Light.ttf); font-weight: 300; } +@font-face { + font-family: Lato; + src: url(../fonts/Lato/Lato-Bold.ttf); + font-weight: bold; +} @font-face { font-family: Lekton; src: url(../fonts/Lekton/Lekton-Regular.ttf); font-weight: normal; } +@font-face { + font-family: Lekton; + src: url(../fonts/Lekton/Lekton-Bold.ttf); + font-weight: bold; +} /*************************** /** Variables diff --git a/views/training_course_view.xml b/views/training_course_view.xml index 3d58a19155fa11a6585ed39d336a5adec3410fbb..17f4354277dc4cc3c822e4416c76c351a7e9a439 100644 --- a/views/training_course_view.xml +++ b/views/training_course_view.xml @@ -31,6 +31,8 @@ <field name="control" /> <field name="evaluation" /> <field name="students_profile" /> + <field name="nature" /> + <field name="acquis" /> </group> </page> </notebook> diff --git a/views/training_training_view.xml b/views/training_training_view.xml index b878374c19d98f65a0b8a3862386d89f3e2be530..888023979bc24d1ccd7cb83a9a464f86cf7c296f 100644 --- a/views/training_training_view.xml +++ b/views/training_training_view.xml @@ -75,6 +75,9 @@ </group> </page> <page name="attestation" string="Attestation"> + <group> + <field name="date_attestation" /> + </group> </page> <page name="orders" string="Commandes"> <field name="order_ids" readonly="1" />