From 30adc15795a682210df8044bf262d90462abd474 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20-=20Le=20Filament?= <remi@le-filament.com>
Date: Thu, 15 Feb 2024 14:07:38 +0100
Subject: [PATCH] [UPD] add place_requirement and other small fixes
---
models/training_training.py | 1 +
templates/report_agreement.xml | 11 ++++++++++-
views/training_training_view.xml | 1 +
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/models/training_training.py b/models/training_training.py
index f57d694..2014c20 100644
--- a/models/training_training.py
+++ b/models/training_training.py
@@ -107,6 +107,7 @@ class Training(models.Model):
)
place = fields.Char(string="Lieu de la formation")
place_detail = fields.Text(string="Détails du lieu")
+ place_requirement = fields.Text(string="Exigences du lieu")
company_id = fields.Many2one(
comodel_name="res.company",
string="Company",
diff --git a/templates/report_agreement.xml b/templates/report_agreement.xml
index 43ecdbb..a02d7d4 100644
--- a/templates/report_agreement.xml
+++ b/templates/report_agreement.xml
@@ -38,7 +38,7 @@
<div class="subblock">
<h3>ARTICLE 1 - OBJET ET CARACTERISTIQUES DE LA FORMATION</h3>
<p>
- En exécution de la présente convention, l’organisme LE FILAMENT s’engage à organiser l’action de formation intitulée : <strong><t t-out="doc.course_id.name" /></strong>
+ En exécution de la présente convention, l’organisme <t t-out="doc.company_id.name" /> s’engage à organiser l’action de formation intitulée : <strong><t t-out="doc.course_id.name" /></strong>
</p>
<p>
<span class="text-decoration-underline">Nature de l’action au sens de l’article L.6313-1 du code du travail</span> :<br />
@@ -85,6 +85,14 @@
<span t-field="doc.place" />
</td>
</tr>
+ <tr t-if="doc.training_type_id" style="border: 0px;">
+ <td style="width: 160px; border: 0px;">
+ Type de formation :
+ </td>
+ <td style="border: 0px;">
+ <span t-field="doc.training_type_id" />
+ </td>
+ </tr>
<tr>
<td style="width: 160px; border: 0px;">
Dates :
@@ -111,6 +119,7 @@
</tr>
</tbody>
</table>
+ <span t-if="doc.place_requirement" t-esc="doc.place_requirement" />
</div>
<div class="subblock">
<h3>ARTICLE 3 – STAGIAIRES BENEFICIAIRES DE L’ACTION</h3>
diff --git a/views/training_training_view.xml b/views/training_training_view.xml
index 9f16a0c..971430a 100644
--- a/views/training_training_view.xml
+++ b/views/training_training_view.xml
@@ -62,6 +62,7 @@
<field name="signin_function" required="1" />
<field name="place" required="1" />
<field name="place_detail" />
+ <field name="place_requirement" />
<field name="meanings" />
<field name="equipment" />
</group>
--
GitLab