From 369482da7e4911aab56b923921051c975670a11a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20-=20Le=20Filament?= <remi@le-filament.com>
Date: Wed, 2 Oct 2024 12:27:52 +0200
Subject: [PATCH] [MIG] version 17.0

---
 .eslintrc.yml                         |   3 +-
 .flake8                               |  12 --
 .gitignore                            |  11 ++
 .isort.cfg                            |  13 --
 .pre-commit-config.yaml               |  67 +++++----
 .pylintrc                             |  12 +-
 .pylintrc-mandatory                   |  12 +-
 .ruff.toml                            |  30 ++++
 __manifest__.py                       |   2 +-
 data/training_data.xml                |   2 +-
 models/account_move.py                |   2 +-
 models/res_company.py                 |   2 +-
 models/res_company_training_logo.py   |   2 +-
 models/res_config_settings.py         |   2 +-
 models/res_partner.py                 |   2 +-
 models/sale_order.py                  |   2 +-
 models/training_course.py             |   2 +-
 models/training_session.py            |   2 +-
 models/training_student.py            |   2 +-
 models/training_training.py           |   8 +-
 security/training_security.xml        |   2 +-
 templates/report_agreement.xml        | 181 ++++++++++++++++++------
 templates/report_attendance_sheet.xml |  82 ++++++++---
 templates/report_attestation.xml      |  62 +++++++--
 templates/report_config_settings.xml  |   8 +-
 templates/report_convocation.xml      |  94 ++++++++++---
 templates/report_program.xml          |  75 +++++++---
 views/account_move_view.xml           |   2 +-
 views/menus.xml                       |   3 +
 views/res_company_view.xml            |   2 +-
 views/res_config_settings_view.xml    | 190 +++++++++-----------------
 views/res_partner_view.xml            |   2 +-
 views/sale_order_view.xml             |   2 +-
 views/training_course_view.xml        |   2 +-
 views/training_session_view.xml       |   2 +-
 views/training_training_view.xml      |  13 +-
 views/training_type_view.xml          |   2 +-
 37 files changed, 574 insertions(+), 340 deletions(-)
 delete mode 100644 .flake8
 delete mode 100644 .isort.cfg
 create mode 100644 .ruff.toml

diff --git a/.eslintrc.yml b/.eslintrc.yml
index 9429bc6..0b38203 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -4,7 +4,7 @@ env:
 
 # See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
 parserOptions:
-  ecmaVersion: 2019
+  ecmaVersion: 2022
 
 overrides:
   - files:
@@ -22,6 +22,7 @@ globals:
   odoo: readonly
   openerp: readonly
   owl: readonly
+  luxon: readonly
 
 # Styling is handled by Prettier, so we only need to enable AST rules;
 # see https://github.com/OCA/maintainer-quality-tools/pull/618#issuecomment-558576890
diff --git a/.flake8 b/.flake8
deleted file mode 100644
index e397e8e..0000000
--- a/.flake8
+++ /dev/null
@@ -1,12 +0,0 @@
-[flake8]
-max-line-length = 88
-max-complexity = 16
-# B = bugbear
-# B9 = bugbear opinionated (incl line length)
-select = C,E,F,W,B,B9
-# E203: whitespace before ':' (black behaviour)
-# E501: flake8 line length (covered by bugbear B950)
-# W503: line break before binary operator (black behaviour)
-ignore = E203,E501,W503
-per-file-ignores=
-    __init__.py:F401
diff --git a/.gitignore b/.gitignore
index 9c283fd..c9f4238 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@ __pycache__/
 *.py[cod]
 /.venv
 /.pytest_cache
+/.ruff_cache
 
 # C extensions
 *.so
@@ -23,6 +24,16 @@ var/
 .installed.cfg
 *.egg
 *.eggs
+.copier-answers.yml
+
+# Debian packages
+*.deb
+
+# Redhat packages
+*.rpm
+
+# MacOS packages
+*.dmg
 
 # Installer logs
 pip-log.txt
diff --git a/.isort.cfg b/.isort.cfg
deleted file mode 100644
index 0ec187e..0000000
--- a/.isort.cfg
+++ /dev/null
@@ -1,13 +0,0 @@
-[settings]
-; see https://github.com/psf/black
-multi_line_output=3
-include_trailing_comma=True
-force_grid_wrap=0
-combine_as_imports=True
-use_parentheses=True
-line_length=88
-known_odoo=odoo
-known_odoo_addons=odoo.addons
-sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER
-default_section=THIRDPARTY
-ensure_newline_before_comments = True
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index da24b78..f58f2c6 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -12,6 +12,12 @@ exclude: |
   /static/(src/)?lib/|
   # Repos using Sphinx to generate docs don't need prettying
   ^docs/_templates/.*\.html$|
+  # Don't bother non-technical authors with formatting issues in docs
+  readme/.*\.(rst|md)$|
+  # Ignore build and dist directories in addons
+  /build/|/dist/|
+  # Ignore test files in addons
+  /tests/samples/.*|
   # You don't usually want a bot to modify your legal texts
   (LICENSE.*|COPYING.*)
 default_language_version:
@@ -31,34 +37,38 @@ repos:
         name: en.po files cannot exist
         entry: found a en.po file
         language: fail
-        files: '[a-zA-Z0-9_]*/i18n/en\.po$'
+        files:
+          '[a-zA-Z0-9_]*/i18n/en\.po$'
+          #  - repo: https://github.com/sbidoul/whool
+          #    rev: v0.5
+          #    hooks:
+          #      - id: whool-init
   - repo: https://github.com/oca/maintainer-tools
-    rev: 4cd2b852214dead80822e93e6749b16f2785b2fe
+    rev: d5fab7ee87fceee858a3d01048c78a548974d935
     hooks:
       # update the NOT INSTALLABLE ADDONS section above
       - id: oca-update-pre-commit-excluded-addons
       - id: oca-fix-manifest-website
         args: ["https://le-filament.com"]
-  - repo: https://github.com/myint/autoflake
-    rev: v1.6.1
-    hooks:
-      - id: autoflake
+      - id: oca-gen-addon-readme
         args:
-          - --expand-star-imports
-          - --ignore-init-module-imports
-          - --in-place
-          - --remove-all-unused-imports
-          - --remove-duplicate-keys
-          - --remove-unused-variables
-  - repo: https://github.com/psf/black
-    rev: 22.8.0
+          - --addons-dir=.
+          - --branch=17.0
+          - --org-name=lefilament
+          - --repo-name=template_module
+          - --if-source-changed
+          - --keep-source-digest
+          - --convert-fragments-to-markdown
+      # - id: oca-gen-external-dependencies
+  - repo: https://github.com/OCA/odoo-pre-commit-hooks
+    rev: v0.0.25
     hooks:
-      - id: black
+      - id: oca-checks-odoo-module
+      - id: oca-checks-po
   - repo: https://github.com/pre-commit/mirrors-prettier
     rev: v2.7.1
     hooks:
       - id: prettier
-        exclude: ^templates/
         name: prettier (with plugin-xml)
         additional_dependencies:
           - "prettier@2.7.1"
@@ -96,27 +106,14 @@ repos:
       - id: check-xml
       - id: mixed-line-ending
         args: ["--fix=lf"]
-  - repo: https://github.com/asottile/pyupgrade
-    rev: v2.38.2
-    hooks:
-      - id: pyupgrade
-        args: ["--keep-percent-format"]
-  - repo: https://github.com/PyCQA/isort
-    rev: 5.12.0
-    hooks:
-      - id: isort
-        name: isort except __init__.py
-        args:
-          - --settings=.
-        exclude: /__init__\.py$
-  - repo: https://github.com/PyCQA/flake8
-    rev: 3.9.2
+  - repo: https://github.com/astral-sh/ruff-pre-commit
+    rev: v0.1.3
     hooks:
-      - id: flake8
-        name: flake8
-        additional_dependencies: ["flake8-bugbear==21.9.2"]
+      - id: ruff
+        args: [--fix, --exit-non-zero-on-fix]
+      - id: ruff-format
   - repo: https://github.com/OCA/pylint-odoo
-    rev: 7.0.2
+    rev: v9.0.4
     hooks:
       - id: pylint_odoo
         name: pylint with optional checks
diff --git a/.pylintrc b/.pylintrc
index 71c476d..4fb9ba5 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -5,12 +5,12 @@ load-plugins=pylint_odoo
 score=n
 
 [ODOOLINT]
-readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
-manifest_required_authors=Le Filament
-manifest_required_keys=license
-manifest_deprecated_keys=description,active
-license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
-valid_odoo_versions=16.0
+readme-template-url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
+manifest-required-authors=Le Filament
+manifest-required-keys=license
+manifest-deprecated-keys=description,active
+license-allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
+valid-odoo-versions=17.0
 
 [MESSAGES CONTROL]
 disable=all
diff --git a/.pylintrc-mandatory b/.pylintrc-mandatory
index ed2c217..42885e9 100644
--- a/.pylintrc-mandatory
+++ b/.pylintrc-mandatory
@@ -4,12 +4,12 @@ load-plugins=pylint_odoo
 score=n
 
 [ODOOLINT]
-readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
-manifest_required_authors=Le Filament
-manifest_required_keys=license
-manifest_deprecated_keys=description,active
-license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
-valid_odoo_versions=16.0
+readme-template-url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
+manifest-required-authors=Le Filament
+manifest-required-keys=license
+manifest-deprecated-keys=description,active
+license-allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
+valid-odoo-versions=17.0
 
 [MESSAGES CONTROL]
 disable=all
diff --git a/.ruff.toml b/.ruff.toml
new file mode 100644
index 0000000..0240c75
--- /dev/null
+++ b/.ruff.toml
@@ -0,0 +1,30 @@
+
+target-version = "py310"
+fix = true
+
+[lint]
+extend-select = [
+    "B",
+    "C90",
+    "E501",  # line too long (default 88)
+    "I",  # isort
+    "UP",  # pyupgrade
+]
+exclude = ["setup/*"]
+
+[format]
+exclude = ["setup/*"]
+
+[per-file-ignores]
+"__init__.py" = ["F401", "I001"]  # ignore unused and unsorted imports in __init__.py
+"__manifest__.py" = ["B018"]  # useless expression
+
+[isort]
+section-order = ["future", "standard-library", "third-party", "odoo", "odoo-addons", "first-party", "local-folder"]
+
+[isort.sections]
+"odoo" = ["odoo"]
+"odoo-addons" = ["odoo.addons"]
+
+[mccabe]
+max-complexity = 16
diff --git a/__manifest__.py b/__manifest__.py
index 0369414..99a7677 100644
--- a/__manifest__.py
+++ b/__manifest__.py
@@ -1,6 +1,6 @@
 {
     "name": "Le Filament - Training",
-    "version": "16.0.1.0.0",
+    "version": "17.0.1.0.0",
     "summary": "Training sessions managment",
     "license": "AGPL-3",
     "author": "Le Filament",
diff --git a/data/training_data.xml b/data/training_data.xml
index a3ebeb0..fee9b9c 100644
--- a/data/training_data.xml
+++ b/data/training_data.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
      License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo noupdate="1">
     <!-- Training sequences -->
diff --git a/models/account_move.py b/models/account_move.py
index 89b7477..3e0b12b 100644
--- a/models/account_move.py
+++ b/models/account_move.py
@@ -1,4 +1,4 @@
-# Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+# Copyright 2019- Le Filament (https://le-filament.com)
 # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
 
 from odoo import fields, models
diff --git a/models/res_company.py b/models/res_company.py
index 4c40b56..de06d39 100644
--- a/models/res_company.py
+++ b/models/res_company.py
@@ -1,4 +1,4 @@
-# © 2023 Le Filament (<http://www.le-filament.com>)
+# Copyright 2023- Le Filament (https://le-filament.com)
 # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
 
 from odoo import fields, models
diff --git a/models/res_company_training_logo.py b/models/res_company_training_logo.py
index eda5a94..455675f 100644
--- a/models/res_company_training_logo.py
+++ b/models/res_company_training_logo.py
@@ -1,4 +1,4 @@
-# © 2023 Le Filament (<http://www.le-filament.com>)
+# Copyright 2023- Le Filament (https://le-filament.com)
 # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
 
 from odoo import fields, models
diff --git a/models/res_config_settings.py b/models/res_config_settings.py
index 6d3b649..2de3e3d 100644
--- a/models/res_config_settings.py
+++ b/models/res_config_settings.py
@@ -1,4 +1,4 @@
-# © 2023 Le Filament (<http://www.le-filament.com>)
+# Copyright 2023- Le Filament (https://le-filament.com)
 # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
 
 from odoo import fields, models
diff --git a/models/res_partner.py b/models/res_partner.py
index 5f7263c..ec2d9f0 100644
--- a/models/res_partner.py
+++ b/models/res_partner.py
@@ -1,4 +1,4 @@
-# Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+# Copyright 2019- Le Filament (https://le-filament.com)
 # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
 
 from odoo import fields, models
diff --git a/models/sale_order.py b/models/sale_order.py
index 56bf4e3..45b368f 100644
--- a/models/sale_order.py
+++ b/models/sale_order.py
@@ -1,4 +1,4 @@
-# Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+# Copyright 2019- Le Filament (https://le-filament.com)
 # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
 
 from odoo import fields, models
diff --git a/models/training_course.py b/models/training_course.py
index 4dc10db..5a5f7df 100644
--- a/models/training_course.py
+++ b/models/training_course.py
@@ -1,4 +1,4 @@
-# Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+# Copyright 2019- Le Filament (https://le-filament.com)
 # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
 
 from odoo import api, fields, models
diff --git a/models/training_session.py b/models/training_session.py
index 131c7d9..0d232fb 100644
--- a/models/training_session.py
+++ b/models/training_session.py
@@ -1,4 +1,4 @@
-# Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+# Copyright 2019- Le Filament (https://le-filament.com)
 # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
 
 from odoo import fields, models
diff --git a/models/training_student.py b/models/training_student.py
index d6781b5..78b8625 100644
--- a/models/training_student.py
+++ b/models/training_student.py
@@ -1,4 +1,4 @@
-# Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+# Copyright 2019- Le Filament (https://le-filament.com)
 # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
 
 from odoo import api, fields, models
diff --git a/models/training_training.py b/models/training_training.py
index 2014c20..119f6d2 100644
--- a/models/training_training.py
+++ b/models/training_training.py
@@ -1,4 +1,4 @@
-# Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+# Copyright 2019- Le Filament (https://le-filament.com)
 # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
 
 from odoo import api, fields, models
@@ -37,8 +37,6 @@ class Training(models.Model):
         string="Numéro Convention",
         required=True,
         copy=False,
-        readonly=True,
-        states={"draft": [("readonly", False)]},
         index=True,
         default="Brouillon",
     )
@@ -139,7 +137,7 @@ class Training(models.Model):
     @api.model_create_multi
     @api.returns("self", lambda value: value.id)
     def create(self, vals_list):
-        records = super(Training, self).create(vals_list)
+        records = super().create(vals_list)
         for record in records.filtered("course_id"):
             for s in record.course_id.session_ids:
                 self.env["training.session"].create(
@@ -153,7 +151,7 @@ class Training(models.Model):
         return records
 
     def write(self, vals):
-        res = super(Training, self).write(vals)
+        res = super().write(vals)
         # If we modify the course, then we delete and recreate sessions
         if vals.get("course_id", False):
             self.session_ids.unlink()
diff --git a/security/training_security.xml b/security/training_security.xml
index ba7b450..623ee3c 100644
--- a/security/training_security.xml
+++ b/security/training_security.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
      License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo>
     <!-- Définition des groupes utilisateurs -->
diff --git a/templates/report_agreement.xml b/templates/report_agreement.xml
index acc93ea..7a5b568 100644
--- a/templates/report_agreement.xml
+++ b/templates/report_agreement.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
      License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo>
     <template id="qweb_agreement_pdf">
@@ -15,7 +15,9 @@
                         <div class="convention training_layout">
                             <div class="col-12 text-center">
                                 <h1>
-                                    CONVENTION DE FORMATION PROFESSIONNELLE N°<t t-out="doc.agreement_number" />
+                                    CONVENTION DE FORMATION PROFESSIONNELLE N°<t
+                                        t-out="doc.agreement_number"
+                                    />
                                 </h1>
                                 <h2 t-field="doc.course_id.name" />
                                 <hr />
@@ -23,49 +25,82 @@
                             <div class="col-12">
                                 <p>ENTRE :</p>
                                 <p>
-                                    <strong><t t-out="doc.company_id.name" /></strong> – Déclaration d’activité enregistrée sous le numéro <t t-out="doc.company_id.training_number" /> - dont le siège est situé <t t-out="doc.company_id.partner_id._display_address(without_company=True)" />.
+                                    <strong><t
+                                            t-out="doc.company_id.name"
+                                        /></strong> – Déclaration d’activité enregistrée sous le numéro <t
+                                        t-out="doc.company_id.training_number"
+                                    /> - dont le siège est situé <t
+                                        t-out="doc.company_id.partner_id._display_address(without_company=True)"
+                                    />.
                                     <br />
-                                    Représenté par <t t-out="doc.signin_person" />, <t t-out="doc.signin_function" />
+                                    Représenté par <t t-out="doc.signin_person" />, <t
+                                        t-out="doc.signin_function"
+                                    />
                                 </p>
                                 <p>ET</p>
                                 <p>
-                                    <strong><t t-out="doc.customer_id.name" /></strong> - <t t-out="doc.customer_id._display_address(without_company=True)" />.
+                                    <strong><t
+                                            t-out="doc.customer_id.name"
+                                        /></strong> - <t
+                                        t-out="doc.customer_id._display_address(without_company=True)"
+                                    />.
                                 </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>
 
                                 <div class="subblock">
-                                    <h3>ARTICLE 1 - OBJET ET CARACTERISTIQUES DE LA FORMATION</h3>
+                                    <h3
+                                    >ARTICLE 1 - OBJET ET CARACTERISTIQUES DE LA FORMATION</h3>
                                     <p>
-                                        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>
+                                        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 />
+                                        <span
+                                            class="text-decoration-underline"
+                                        >Nature de l’action au sens de l’article L.6313-1 du code du travail</span> :<br
+                                        />
                                         Développement des compétences et de la qualification professionnelle
                                     </p>
                                     <p>
-                                        <span class="text-decoration-underline">Compétences visées</span> : <br />
-                                        À l’issue de la formation l'apprenant sera en mesure de :<br />
+                                        <span
+                                            class="text-decoration-underline"
+                                        >Compétences visées</span> : <br />
+                                        À l’issue de la formation l'apprenant sera en mesure de :<br
+                                        />
                                         <span t-field="doc.course_id.objective" />
                                     </p>
                                     <p>
-                                        <span class="text-decoration-underline">Prérequis</span> : <br />
+                                        <span
+                                            class="text-decoration-underline"
+                                        >Prérequis</span> : <br />
                                         <t t-out="doc.course_id.prerequisites" />
                                     </p>
                                     <p>
-                                        <span class="text-decoration-underline">Profil des stagiaires</span> : <br />
+                                        <span
+                                            class="text-decoration-underline"
+                                        >Profil des stagiaires</span> : <br />
                                         <t t-out="doc.course_id.students_profile" />
                                     </p>
                                     <p>
-                                        <span class="text-decoration-underline">Formateur(s)</span> : <br />
-                                        <t t-set="trainers" t-value="doc._get_trainers()" />
+                                        <span
+                                            class="text-decoration-underline"
+                                        >Formateur(s)</span> : <br />
+                                        <t
+                                            t-set="trainers"
+                                            t-value="doc._get_trainers()"
+                                        />
                                         <t t-foreach="trainers" t-as="trainer">
                                             <t t-out="trainer.name" /><br />
                                         </t>
                                     </p>
                                     <p>
-                                        <span class="text-decoration-underline">Modalités et délais d'accès</span> : <br />
+                                        <span
+                                            class="text-decoration-underline"
+                                        >Modalités et délais d'accès</span> : <br />
                                         Nous avoir renvoyé la convention signée au plus tard 24h avant la formation
                                     </p>
                                 </div>
@@ -85,12 +120,17 @@
                                                     <span t-field="doc.place" />
                                                 </td>
                                             </tr>
-                                            <tr t-if="doc.training_type_id" style="border: 0px;">
+                                            <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" />
+                                                    <span
+                                                        t-field="doc.training_type_id"
+                                                    />
                                                 </td>
                                             </tr>
                                             <tr>
@@ -98,7 +138,11 @@
                                                     Dates :
                                                 </td>
                                                 <td style="border: 0px;">
-                                                    Du <span t-field="doc.date_begin" /> au <span t-field="doc.date_end" />
+                                                    Du <span
+                                                        t-field="doc.date_begin"
+                                                    /> au <span
+                                                        t-field="doc.date_end"
+                                                    />
                                                 </td>
                                             </tr>
                                             <tr style="border: 0px;">
@@ -109,7 +153,10 @@
                                                     <span t-out="doc.hours" />h
                                                 </td>
                                             </tr>
-                                            <tr style="border: 0px;" t-if="doc.meanings">
+                                            <tr
+                                                style="border: 0px;"
+                                                t-if="doc.meanings"
+                                            >
                                                 <td style="width: 160px; border: 0px;">
                                                     Dispositif :
                                                 </td>
@@ -119,21 +166,33 @@
                                             </tr>
                                         </tbody>
                                     </table>
-                                    <span t-if="doc.place_requirement" t-esc="doc.place_requirement" />
+                                    <span
+                                        t-if="doc.place_requirement"
+                                        t-esc="doc.place_requirement"
+                                    />
                                 </div>
                                 <div class="subblock">
-                                    <h3>ARTICLE 3 – STAGIAIRES BENEFICIAIRES DE L’ACTION</h3>
-                                    <p>L’entreprise signataire inscrit à cette formation les personnes suivantes :</p>
+                                    <h3
+                                    >ARTICLE 3 – STAGIAIRES BENEFICIAIRES DE L’ACTION</h3>
+                                    <p
+                                    >L’entreprise signataire inscrit à cette formation les personnes suivantes :</p>
                                     <t t-foreach="doc.student_ids" t-as="student">
-                                        <strong><span t-field="student.student_id.lastname" /> <span t-field="student.student_id.firstname" /></strong><br />
+                                        <strong><span
+                                                t-field="student.student_id.lastname"
+                                            /> <span
+                                                t-field="student.student_id.firstname"
+                                            /></strong><br />
                                     </t>
                                     <p>
-                                        Nombre d'inscrit(s) : <strong><span t-esc="doc.students_count" /></strong>
+                                        Nombre d'inscrit(s) : <strong><span
+                                                t-esc="doc.students_count"
+                                            /></strong>
                                     </p>
                                 </div>
                                 <div class="subblock">
                                     <h3>ARTICLE 4 – MODALITES FINANCIERES</h3>
-                                    <p>Le coût de la formation, objet de la présente convention, s’élève à : </p>
+                                    <p
+                                    >Le coût de la formation, objet de la présente convention, s’élève à : </p>
                                     <table class="table table-borderless table-sm">
                                         <thead>
                                             <tr>
@@ -145,7 +204,9 @@
                                         </thead>
                                         <tbody>
                                             <tr>
-                                                <td><span t-field="doc.course_id.name" /></td>
+                                                <td><span
+                                                        t-field="doc.course_id.name"
+                                                    /></td>
                                                 <td
                                                     t-out="doc.cost"
                                                     class="text-end"
@@ -167,10 +228,14 @@
                                     <p>
                                         Cette somme couvre l’intégralité des frais engagés par l’organisme de formation pour cette session.
                                     </p>
-                                    <p t-if="doc.payment_term_id" t-out="doc.payment_term_id.note" />
+                                    <p
+                                        t-if="doc.payment_term_id"
+                                        t-out="doc.payment_term_id.note"
+                                    />
                                 </div>
                                 <div class="subblock">
-                                    <h3>ARTICLE 5 – MOYENS PEDAGOGIQUES ET TECHNIQUES MIS EN OEUVRE</h3>
+                                    <h3
+                                    >ARTICLE 5 – MOYENS PEDAGOGIQUES ET TECHNIQUES MIS EN OEUVRE</h3>
                                     <p>
                                         La société s’engage à réunir les moyens matériels, pédagogiques et d’encadrement nécessaires au bon déroulement de la formation, afin d’atteindre les objectifs fixés. Elle met à disposition de ses clients des formateurs compétents dans leurs domaines et aptes à transmettre leurs savoirs et savoir-faire.
                                     </p>
@@ -179,16 +244,20 @@
                                     </p>
                                     <p class="fw-bold">Situations particulières</p>
                                     <p>
-                                        Pour toute difficulté ou handicap, veuillez contacter <span t-field="doc.email_contact" /> pour voir les éventuelles adaptations à prévoir.
+                                        Pour toute difficulté ou handicap, veuillez contacter <span
+                                            t-field="doc.email_contact"
+                                        /> pour voir les éventuelles adaptations à prévoir.
                                     </p>
                                     <p><span t-field="doc.course_id.means" /></p>
                                 </div>
                                 <div class="subblock">
-                                    <h3>ARTICLE 6 – MOYENS PERMETTANT D’APPRECIER LES RESULTATS DE L’ACTION</h3>
+                                    <h3
+                                    >ARTICLE 6 – MOYENS PERMETTANT D’APPRECIER LES RESULTATS DE L’ACTION</h3>
                                     <p><span t-field="doc.course_id.evaluation" /></p>
                                 </div>
                                 <div class="subblock">
-                                    <h3>ARTICLE 7 – MOYENS PERMETTANT DE SUIVRE L’EXECUTION DE L’ACTION</h3>
+                                    <h3
+                                    >ARTICLE 7 – MOYENS PERMETTANT DE SUIVRE L’EXECUTION DE L’ACTION</h3>
                                     <p><span t-field="doc.course_id.control" /></p>
                                 </div>
                                 <div class="subblock">
@@ -198,7 +267,8 @@
                                     </p>
                                 </div>
                                 <div class="subblock">
-                                    <h3>ARTICLE 9 – DELAI DE RETRACTATION ET CONDITIONS D’ANNULATION</h3>
+                                    <h3
+                                    >ARTICLE 9 – DELAI DE RETRACTATION ET CONDITIONS D’ANNULATION</h3>
                                     <p>
                                         Conformément à la législation en vigueur (cf. Partie 6 du Code du Travail), l’entreprise signataire dispose d'un délai de 10 jours à compter de la signature de la présente convention pour se rétracter, par lettre recommandée avec accusé de réception.
                                     </p>
@@ -206,7 +276,9 @@
                                         Si, en cas de force majeure dûment reconnue, l’entreprise signataire est empêchée de suivre le programme de formation objet de la présente convention, elle pourra résilier ce contrat. Dans ce cas, seules les prestations effectivement dispensées seront dues prorata temporis de leur valeur prévue au contrat.
                                     </p>
                                     <p>
-                                        Pour toute annulation faite par le client moins de 10 jours avant le début du stage, <t t-out="doc.company_id.name" /> facturera un dédit de 50% des frais de stage, montant non imputable par l’entreprise à la contribution financière obligatoire de formation. En cas d’absence ou d’abandon en cours de stage d’un stagiaire, la formation reste payable en totalité.
+                                        Pour toute annulation faite par le client moins de 10 jours avant le début du stage, <t
+                                            t-out="doc.company_id.name"
+                                        /> facturera un dédit de 50% des frais de stage, montant non imputable par l’entreprise à la contribution financière obligatoire de formation. En cas d’absence ou d’abandon en cours de stage d’un stagiaire, la formation reste payable en totalité.
                                     </p>
                                     <p>
                                         Dans le cas de force majeure dûment reconnue, ou de la cessation anticipée du fait de l’organisme de formation, de nouvelles dates seront convenues.
@@ -216,20 +288,38 @@
                                         Jusqu’à 24 h avant le début de la session de formation, le Client peut, sans aucun frais supplémentaire, substituer une personne inscrite par ses soins par tout autre personne de son choix en respectant les pré-requis et à condition d’en informer par écrit. Cependant, l’alternance d’un stagiaire par un autre en cours de module de formation n’est pas acceptée.
                                     </p>
                                     <p>
-                                        Annulation-report du fait de <t t-out="doc.company_id.name" /> : <t t-out="doc.company_id.name" /> se réserve la possibilité de reporter ou d’annuler une formation. <t t-out="doc.company_id.name" /> en informe alors le Client dans les plus brefs délais. En cas de report, il incombe alors au Client de confirmer sa participation à la nouvelle session qui lui sera proposée. Aucune indemnité ne sera versée au Client en raison d’un report ou d’une annulation du fait de <t t-out="doc.company_id.name" />.
+                                        Annulation-report du fait de <t
+                                            t-out="doc.company_id.name"
+                                        /> : <t
+                                            t-out="doc.company_id.name"
+                                        /> se réserve la possibilité de reporter ou d’annuler une formation. <t
+                                            t-out="doc.company_id.name"
+                                        /> en informe alors le Client dans les plus brefs délais. En cas de report, il incombe alors au Client de confirmer sa participation à la nouvelle session qui lui sera proposée. Aucune indemnité ne sera versée au Client en raison d’un report ou d’une annulation du fait de <t
+                                            t-out="doc.company_id.name"
+                                        />.
                                     </p>
                                     <p>
-                                        En cas de renoncement par <t t-out="doc.company_id.name" /> à l’exécution de la présente convention, aucun règlement n’est dû et les sommes perçues sont remboursées.
+                                        En cas de renoncement par <t
+                                            t-out="doc.company_id.name"
+                                        /> à l’exécution de la présente convention, aucun règlement n’est dû et les sommes perçues sont remboursées.
                                     </p>
                                 </div>
 
                                 <div class="subblock">
                                     <h3>ARTICLE 10 – DROIT APPLICABLE</h3>
-                                    <p>Le présent contrat est régi par le droit français.</p>
-                                    <p>En cas de litige résultant de l'interprétation du présent contrat, de son exécution, ou en cas de rupture du lien contractuel, la juridiction compétente sera le tribunal de Toulouse.</p>
-                                    <p t-if="doc.company_id.agreement_special_condition" t-out="doc.company_id.agreement_special_condition" class="mt-3" />
+                                    <p
+                                    >Le présent contrat est régi par le droit français.</p>
+                                    <p
+                                    >En cas de litige résultant de l'interprétation du présent contrat, de son exécution, ou en cas de rupture du lien contractuel, la juridiction compétente sera le tribunal de Toulouse.</p>
+                                    <p
+                                        t-if="doc.company_id.agreement_special_condition"
+                                        t-out="doc.company_id.agreement_special_condition"
+                                        class="mt-3"
+                                    />
                                     <p class="mt-3 mb-33">
-                                        Fait à <span t-field="doc.place_convention" />, le <span t-field="doc.date_convention" />
+                                        Fait à <span
+                                            t-field="doc.place_convention"
+                                        />, le <span t-field="doc.date_convention" />
                                     </p>
                                     <table
                                         class="table table-borderless"
@@ -237,14 +327,21 @@
                                     >
                                         <tr>
                                             <td style="border-color: #eee;">
-                                                Pour <span t-field="doc.customer_id.name"/> <br />
+                                                Pour <span
+                                                    t-field="doc.customer_id.name"
+                                                /> <br />
                                                 (Cachet et signature)
                                             </td>
                                             <td style="border: 0;">
-                                                Pour <t t-out="doc.company_id.name" class="text-uppercase" /><br />
+                                                Pour <t
+                                                    t-out="doc.company_id.name"
+                                                    class="text-uppercase"
+                                                /><br />
                                                 <t t-if="doc.signin_person">
                                                     <t t-out="doc.signin_person" />
-                                                    <t t-if="doc.signin_function">, <t t-out="doc.signin_function" /></t>
+                                                    <t t-if="doc.signin_function">, <t
+                                                            t-out="doc.signin_function"
+                                                        /></t>
                                                     <br />
                                                 </t>
                                                 (Cachet et signature)
diff --git a/templates/report_attendance_sheet.xml b/templates/report_attendance_sheet.xml
index 9353282..2d32289 100644
--- a/templates/report_attendance_sheet.xml
+++ b/templates/report_attendance_sheet.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
      License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo>
     <template id="qweb_attendance_sheet_pdf">
@@ -63,38 +63,71 @@
                                         <table class="table table-bordered">
                                             <thead>
                                                 <tr>
-                                                    <th scope="col" style="vertical-align: middle; width: 100px;">
+                                                    <th
+                                                        scope="col"
+                                                        style="vertical-align: middle; width: 100px;"
+                                                    >
                                                         Nom
                                                     </th>
-                                                    <th scope="col" style="vertical-align: middle; width: 100px;">
+                                                    <th
+                                                        scope="col"
+                                                        style="vertical-align: middle; width: 100px;"
+                                                    >
                                                         Prénom
                                                     </th>
                                                     <t
                                                         t-foreach="doc.session_ids[nb_case * page_index:nb_case * (page_index + 1)]"
                                                         t-as="session"
                                                     >
-                                                        <th scope="row" style="vertical-align: middle; width: 100px;">
-                                                            <span t-field="session.date" t-options='{"format": "dd/MM/yyyy"}' /><br />
-                                                            Début : <span t-field="session.date" t-options='{"format": "HH:mm"}' /><br />
-                                                            Durée : <span t-esc="session.date_delay" />h
+                                                        <th
+                                                            scope="row"
+                                                            style="vertical-align: middle; width: 100px;"
+                                                        >
+                                                            <span
+                                                                t-field="session.date"
+                                                                t-options='{"format": "dd/MM/yyyy"}'
+                                                            /><br />
+                                                            Début : <span
+                                                                t-field="session.date"
+                                                                t-options='{"format": "HH:mm"}'
+                                                            /><br />
+                                                            Durée : <span
+                                                                t-esc="session.date_delay"
+                                                            />h
                                                         </th>
                                                     </t>
                                                 </tr>
                                             </thead>
                                             <tbody>
-                                                <t t-set="length" t-value="nb_case + 2" />
+                                                <t
+                                                    t-set="length"
+                                                    t-value="nb_case + 2"
+                                                />
                                                 <tr style="background-color: #eee;">
                                                     <td t-att-colspan="length">
                                                         Stagiaires
                                                     </td>
                                                 </tr>
-                                                <t t-foreach="doc.student_ids" t-as="student">
+                                                <t
+                                                    t-foreach="doc.student_ids"
+                                                    t-as="student"
+                                                >
                                                     <tr style="height: 60px;">
-                                                        <th scope="col" style="vertical-align: middle;">
-                                                            <span t-field="student.student_id.lastname" />
+                                                        <th
+                                                            scope="col"
+                                                            style="vertical-align: middle;"
+                                                        >
+                                                            <span
+                                                                t-field="student.student_id.lastname"
+                                                            />
                                                         </th>
-                                                        <th scope="col" style="vertical-align: middle;">
-                                                            <span t-field="student.student_id.firstname" />
+                                                        <th
+                                                            scope="col"
+                                                            style="vertical-align: middle;"
+                                                        >
+                                                            <span
+                                                                t-field="student.student_id.firstname"
+                                                            />
                                                         </th>
                                                         <t
                                                             t-foreach="doc.session_ids[nb_case * page_index:nb_case * (page_index + 1)]"
@@ -104,7 +137,10 @@
                                                         </t>
                                                     </tr>
                                                 </t>
-                                                <t t-set="trainers" t-value="doc._get_trainers()" />
+                                                <t
+                                                    t-set="trainers"
+                                                    t-value="doc._get_trainers()"
+                                                />
                                                 <tr style="background-color: #eee;">
                                                     <td t-att-colspan="length">
                                                         Formateur(s)
@@ -112,11 +148,21 @@
                                                 </tr>
                                                 <t t-foreach="trainers" t-as="trainer">
                                                     <tr style="height: 60px;">
-                                                        <th scope="col" style="vertical-align: middle;">
-                                                            <span t-field="trainer.lastname" />
+                                                        <th
+                                                            scope="col"
+                                                            style="vertical-align: middle;"
+                                                        >
+                                                            <span
+                                                                t-field="trainer.lastname"
+                                                            />
                                                         </th>
-                                                        <th scope="col" style="vertical-align: middle;">
-                                                            <span t-field="trainer.firstname" />
+                                                        <th
+                                                            scope="col"
+                                                            style="vertical-align: middle;"
+                                                        >
+                                                            <span
+                                                                t-field="trainer.firstname"
+                                                            />
                                                         </th>
                                                         <t
                                                             t-foreach="doc.session_ids[nb_case * page_index:nb_case * (page_index + 1)]"
diff --git a/templates/report_attestation.xml b/templates/report_attestation.xml
index ca3cf5e..ca207bc 100644
--- a/templates/report_attestation.xml
+++ b/templates/report_attestation.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
      License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo>
     <template id="qweb_attestation_pdf">
@@ -21,18 +21,35 @@
 
                                     <div class="col-12" style="margin-top: 20px;">
                                         <p>
-                                            Je soussigné, <t t-out="doc.signin_person" />, agissant en qualité de <t t-out="doc.signin_function" /> au sein de l’organisme de formation <t t-out="doc.company_id.name" />, enregistré sous le numéro <t t-out="doc.company_id.training_number" />, atteste que :
+                                            Je soussigné, <t
+                                                t-out="doc.signin_person"
+                                            />, agissant en qualité de <t
+                                                t-out="doc.signin_function"
+                                            /> au sein de l’organisme de formation <t
+                                                t-out="doc.company_id.name"
+                                            />, enregistré sous le numéro <t
+                                                t-out="doc.company_id.training_number"
+                                            />, atteste que :
                                         </p>
                                         <p>
-                                            <strong><t t-out="student.student_id.name" /></strong>
+                                            <strong><t
+                                                    t-out="student.student_id.name"
+                                                /></strong>
                                         </p>
                                         <p>
-                                            Salarié(e) de la société <strong><t t-out="doc.customer_id.name" /></strong>, située au <t t-out="doc.customer_id._display_address(without_company=True)" />,
+                                            Salarié(e) de la société <strong><t
+                                                    t-out="doc.customer_id.name"
+                                                /></strong>, située au <t
+                                                t-out="doc.customer_id._display_address(without_company=True)"
+                                            />,
                                         </p>
                                         <p>
                                             A suivi la formation suivante :
                                         </p>
-                                        <h2 class="text-center" t-out="doc.course_id.name"/>
+                                        <h2
+                                            class="text-center"
+                                            t-out="doc.course_id.name"
+                                        />
 
                                         <h3>OBJECTIFS DE LA FORMATION</h3>
                                         <p t-field="doc.course_id.objective" />
@@ -48,7 +65,11 @@
                                                         <strong>Dates</strong>
                                                     </td>
                                                     <td>
-                                                        Du <span t-field="doc.date_begin" /> au <span t-field="doc.date_end" />
+                                                        Du <span
+                                                            t-field="doc.date_begin"
+                                                        /> au <span
+                                                            t-field="doc.date_end"
+                                                        />
                                                     </td>
                                                     <td style="width: 120px;">
                                                         <strong>Lieu</strong>
@@ -62,15 +83,27 @@
                                                         <strong>Durée</strong>
                                                     </td>
                                                     <td>
-                                                        <span t-out="doc.hours" /> heures
+                                                        <span
+                                                            t-out="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
+                                                            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>
@@ -80,9 +113,14 @@
                                         <h3>ACQUIS DE LA FORMATION</h3>
                                         <p t-field="doc.course_id.acquis" />
                                     </div>
-                                    <div class="col-offset-8 col-4" style="margin-top: 20px;">
+                                    <div
+                                        class="col-offset-8 col-4"
+                                        style="margin-top: 20px;"
+                                    >
                                         Pour valoir ce que de droit <br />
-                                        Fait à <span t-field="doc.place_attestation" />, le <span t-field="doc.date_attestation" />
+                                        Fait à <span
+                                            t-field="doc.place_attestation"
+                                        />, le <span t-field="doc.date_attestation" />
                                     </div>
                                 </div>
                             </div>
diff --git a/templates/report_config_settings.xml b/templates/report_config_settings.xml
index 13b7b2f..11692d7 100644
--- a/templates/report_config_settings.xml
+++ b/templates/report_config_settings.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
      License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo>
     <template id="training_styles_company">
@@ -12,12 +12,12 @@
                     font-family: <t t-out="company.text_font" />;
             }
             .training_layout h1 {
-                color: <t t-out='company.title_color'/>;
-                background-color: <t t-out='company.title_bg_color'/>;
+                color: <t t-out='company.title_color' />;
+                background-color: <t t-out='company.title_bg_color' />;
                 font-family: <t t-out="company.title_font" />;
             }
             .training_layout h2 {
-                color: <t t-out='company.subtitle_color'/> !important;
+                color: <t t-out='company.subtitle_color' /> !important;
                 font-family: <t t-out="company.title_font" />;
             }
         </style>
diff --git a/templates/report_convocation.xml b/templates/report_convocation.xml
index 50943d9..773999c 100644
--- a/templates/report_convocation.xml
+++ b/templates/report_convocation.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
      License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo>
     <template id="qweb_convocation_pdf">
@@ -17,16 +17,28 @@
                                 <div class="row mb-4">
                                     <div class="offset-8 col-4">
                                         <p>
-                                            À <t t-if="student.student_id.title"><t t-out="student.student_id.title.name" /> </t><t t-out="student.student_id.lastname" class="text-uppercase" /> <t t-out="student.student_id.firstname"/>
+                                            À <t t-if="student.student_id.title"><t
+                                                    t-out="student.student_id.title.name"
+                                                /> </t><t
+                                                t-out="student.student_id.lastname"
+                                                class="text-uppercase"
+                                            /> <t
+                                                t-out="student.student_id.firstname"
+                                            />
                                             <br />
-                                            <t t-out="doc.company_id.city" />, le <t t-out="doc.date_convocation" t-options="{'widget': 'date', 'format': 'dd/MM/yyyy'}" />
+                                            <t t-out="doc.company_id.city" />, le <t
+                                                t-out="doc.date_convocation"
+                                                t-options="{'widget': 'date', 'format': 'dd/MM/yyyy'}"
+                                            />
                                         </p>
                                     </div>
                                 </div>
 
                                 <div class="row mb-4">
                                     <div class="col-12 text-center">
-                                        <h1 class="text-uppercase">Convocation à une formation</h1>
+                                        <h1
+                                            class="text-uppercase"
+                                        >Convocation à une formation</h1>
                                     </div>
                                 </div>
 
@@ -38,46 +50,92 @@
                                         <p>
                                             Nous avons le plaisir de vous convier à la formation :
                                         </p>
-                                        <h2 class="text-center" t-out="doc.course_id.name"/>
+                                        <h2
+                                            class="text-center"
+                                            t-out="doc.course_id.name"
+                                        />
                                         <p>
-                                            dont l'objectif est de vous permettre de : <br />
+                                            dont l'objectif est de vous permettre de : <br
+                                            />
                                             <span t-field="doc.course_id.objective" />
                                         </p>
                                         <p>
-                                            Le programme détaillé de cette formation est joint en annexe.<br />
-                                            Pour toute demande d’information concernant cette formation, vous pouvez vous adresser à : <a t-attf-href="mailto:{{doc.email_contact}}"><t t-out="doc.email_contact" /></a>
+                                            Le programme détaillé de cette formation est joint en annexe.<br
+                                            />
+                                            Pour toute demande d’information concernant cette formation, vous pouvez vous adresser à : <a
+                                                t-attf-href="mailto:{{doc.email_contact}}"
+                                            ><t t-out="doc.email_contact" /></a>
                                         </p>
                                         <p>
                                             Cette formation se déroulera :
                                             <ul>
-                                                <li t-if="doc.training_type_id">au format suivant : <span t-out="doc.training_type_id.name" class="fw-bold text-decoration-underline" /><br /></li>
+                                                <li
+                                                    t-if="doc.training_type_id"
+                                                >au format suivant : <span
+                                                        t-out="doc.training_type_id.name"
+                                                        class="fw-bold text-decoration-underline"
+                                                    /><br /></li>
                                                 <li>
                                                     aux dates suivantes :
                                                     <ul>
-                                                        <li t-foreach="doc.session_ids" t-as="session">
-                                                           <t t-out="session.date" t-options="{'widget': 'datetime', 'format': 'dd/MM/yyyy'}" /> de <t t-out="session.date" t-options="{'widget': 'datetime', 'format': 'HH:mm'}" /> à <t t-out="session.date + relativedelta(hours=session.date_delay)" t-options="{'widget': 'datetime', 'format': 'HH:mm'}" />
+                                                        <li
+                                                            t-foreach="doc.session_ids"
+                                                            t-as="session"
+                                                        >
+                                                           <t
+                                                                t-out="session.date"
+                                                                t-options="{'widget': 'datetime', 'format': 'dd/MM/yyyy'}"
+                                                            /> de <t
+                                                                t-out="session.date"
+                                                                t-options="{'widget': 'datetime', 'format': 'HH:mm'}"
+                                                            /> à <t
+                                                                t-out="session.date + relativedelta(hours=session.date_delay)"
+                                                                t-options="{'widget': 'datetime', 'format': 'HH:mm'}"
+                                                            />
                                                         </li>
                                                     </ul>
                                                 </li>
                                             </ul>
                                         </p>
                                         <p>
-                                            Lieu : <span t-out="doc.place" class="fw-bold" />
+                                            Lieu : <span
+                                                t-out="doc.place"
+                                                class="fw-bold"
+                                            />
                                             <t t-if="doc.place_detail">
-                                                <br/><span t-field="doc.place_detail" class="fst-italic" />
+                                                <br /><span
+                                                    t-field="doc.place_detail"
+                                                    class="fst-italic"
+                                                />
                                             </t>
                                         </p>
                                         <p t-if="doc.equipment">
-                                            Nous vous prions pour le bon déroulé de la formation d'apporter les éléments suivants : <br/>
+                                            Nous vous prions pour le bon déroulé de la formation d'apporter les éléments suivants : <br
+                                            />
                                             <span t-field="doc.equipment" />
                                         </p>
                                         <p>
-                                            <span class="fw-bold">Situations particulières</span><br/>
-                                            Pour toute difficulté ou handicap, veuillez contacter <a t-attf-href="mailto:{{doc.email_contact}}"><t t-out="doc.email_contact" /></a> pour voir les éventuelles adaptations à prévoir.
+                                            <span
+                                                class="fw-bold"
+                                            >Situations particulières</span><br />
+                                            Pour toute difficulté ou handicap, veuillez contacter <a
+                                                t-attf-href="mailto:{{doc.email_contact}}"
+                                            ><t
+                                                    t-out="doc.email_contact"
+                                                /></a> pour voir les éventuelles adaptations à prévoir.
                                         </p>
                                         <p>
-                                            Nous vous prions d’agréer, <t t-if="student.student_id.title"><t t-out="student.student_id.title.name" />, </t>l’expression de nos cordiales salutations. <br />
-                                            Fait à <span t-field="doc.company_id.city" />, le <span t-field="doc.date_convocation" />
+                                            Nous vous prions d’agréer, <t
+                                                t-if="student.student_id.title"
+                                            ><t
+                                                    t-out="student.student_id.title.name"
+                                                />, </t>l’expression de nos cordiales salutations. <br
+                                            />
+                                            Fait à <span
+                                                t-field="doc.company_id.city"
+                                            />, le <span
+                                                t-field="doc.date_convocation"
+                                            />
                                         </p>
                                     </div>
                                 </div>
diff --git a/templates/report_program.xml b/templates/report_program.xml
index 2750558..77ccf59 100644
--- a/templates/report_program.xml
+++ b/templates/report_program.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
      License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo>
     <template id="qweb_program_pdf">
@@ -27,20 +27,28 @@
                                 </div>
 
                                 <div class="subblock" t-if="doc.course_id.objective">
-                                    <h3><t t-out="chapter" />. OBJECTIFS / COMPÉTENCES VISÉES</h3>
+                                    <h3><t
+                                            t-out="chapter"
+                                        />. OBJECTIFS / COMPÉTENCES VISÉES</h3>
                                     <p t-field="doc.course_id.objective" />
                                     <t t-set="chapter" t-value="chapter + 1" />
                                 </div>
 
-                                <div class=""  t-if="doc.course_id.session_ids">
-                                    <h3><t t-out="chapter" />. PROGRAMME DE LA FORMATION</h3>
+                                <div class="" t-if="doc.course_id.session_ids">
+                                    <h3><t
+                                            t-out="chapter"
+                                        />. PROGRAMME DE LA FORMATION</h3>
                                     <t t-foreach="doc.session_ids" t-as="session">
                                         <div class="subblock">
                                             <h4 style="margin-left: 40px;">
-                                                <t t-out="chapter" />. <t t-out="'%01d' % (session_index+1)" /> <t t-out="session.session_id.name" />
+                                                <t t-out="chapter" />. <t
+                                                    t-out="'%01d' % (session_index+1)"
+                                                /> <t t-out="session.session_id.name" />
                                             </h4>
                                             <p style="margin-bottom: 40px;">
-                                                <span t-field="session.session_id.description" />
+                                                <span
+                                                    t-field="session.session_id.description"
+                                                />
                                             </p>
                                         </div>
                                     </t>
@@ -48,12 +56,16 @@
                                 </div>
 
                                 <div class="subblock" t-if="doc.course_id.method">
-                                    <h3><t t-out="chapter" />. MÉTHODOLOGIE ET SUPPORTS PÉDAGOGIQUES</h3>
+                                    <h3><t
+                                            t-out="chapter"
+                                        />. MÉTHODOLOGIE ET SUPPORTS PÉDAGOGIQUES</h3>
                                     <span t-field="doc.course_id.method" />
                                     <t t-set="chapter" t-value="chapter + 1" />
                                 </div>
                                 <div class="subblock" t-if="doc.course_id.means">
-                                    <h3><t t-out="chapter" />. MOYENS PÉDAGOGIQUES D'ENCADREMENT</h3>
+                                    <h3><t
+                                            t-out="chapter"
+                                        />. MOYENS PÉDAGOGIQUES D'ENCADREMENT</h3>
                                     <span t-field="doc.course_id.means" />
                                     <t t-set="chapter" t-value="chapter + 1" />
                                 </div>
@@ -65,48 +77,75 @@
                                 </div>
 
                                 <div class="subblock" t-if="doc.course_id.evaluation">
-                                    <h3><t t-out="chapter" />. MODALITÉS D'ÉVALUATION</h3>
+                                    <h3><t
+                                            t-out="chapter"
+                                        />. MODALITÉS D'ÉVALUATION</h3>
                                     <span t-field="doc.course_id.evaluation" />
                                     <t t-set="chapter" t-value="chapter + 1" />
                                 </div>
 
                                 <div class="subblock" t-if="doc.session_hours">
-                                    <h3><t t-out="chapter" />. MODALITÉS ET DURÉE DE LA FORMATION</h3>
+                                    <h3><t
+                                            t-out="chapter"
+                                        />. MODALITÉS ET DURÉE DE LA FORMATION</h3>
                                     <p>
-                                        Formation dispensée en intra-entreprise par groupes de <t t-out="doc.students_nb_prev" /> personnes, et par session de demi-journées, afin de s’adapter aux contraintes de disponibilité de l’entreprise.
+                                        Formation dispensée en intra-entreprise par groupes de <t
+                                            t-out="doc.students_nb_prev"
+                                        /> personnes, et par session de demi-journées, afin de s’adapter aux contraintes de disponibilité de l’entreprise.
                                     </p>
                                     <p>
-                                        Horaires : <strong><t t-out="doc.session_hours" /></strong>
+                                        Horaires : <strong><t
+                                                t-out="doc.session_hours"
+                                            /></strong>
                                     </p>
                                     <p>
-                                        <strong><t t-out="doc.session_count"/> sessions</strong> de formation, soit <strong><t t-out="doc.hours" /> heures par personne</strong>
+                                        <strong><t
+                                                t-out="doc.session_count"
+                                            /> sessions</strong> de formation, soit <strong
+                                        ><t
+                                                t-out="doc.hours"
+                                            /> heures par personne</strong>
                                     </p>
                                     <t t-set="chapter" t-value="chapter + 1" />
                                 </div>
 
                                 <div class="subblock" t-if="doc.date_begin">
-                                    <h3><t t-out="chapter" />. LIEU ET DÉLAIS DE LA FORMATION</h3>
+                                    <h3><t
+                                            t-out="chapter"
+                                        />. LIEU ET DÉLAIS DE LA FORMATION</h3>
                                     <p t-field="doc.place" />
                                     <p>
-                                        Du <t t-out="doc.date_begin" /> au <t t-out="doc.date_end" />
+                                        Du <t t-out="doc.date_begin" /> au <t
+                                            t-out="doc.date_end"
+                                        />
                                     </p>
                                     <t t-set="chapter" t-value="chapter + 1" />
                                 </div>
                                 <div class="subblock" t-if="doc.cost">
                                     <h3><t t-out="chapter" />. COÛT DE LA FORMATION</h3>
                                     <p>
-                                        <t t-out="doc.cost" /> € HT en formation INTRA de <t t-out="doc.students_nb_prev"/> personnes.
+                                        <t
+                                            t-out="doc.cost"
+                                        /> € HT en formation INTRA de <t
+                                            t-out="doc.students_nb_prev"
+                                        /> personnes.
                                     </p>
                                     <t t-set="chapter" t-value="chapter + 1" />
                                 </div>
 
-                                <div class="subblock" t-if="doc.course_id.students_profile">
+                                <div
+                                    class="subblock"
+                                    t-if="doc.course_id.students_profile"
+                                >
                                     <h3><t t-out="chapter" />. LES STAGIAIRES</h3>
                                     <span t-field="doc.course_id.students_profile" />
                                     <t t-set="chapter" t-value="chapter + 1" />
                                 </div>
 
-                                <div class="subblock mb-4" t-if="doc.course_id.prerequisites">
+                                <div
+                                    class="subblock mb-4"
+                                    t-if="doc.course_id.prerequisites"
+                                >
                                     <h3><t t-out="chapter" />. PRÉ-REQUIS</h3>
                                     <span t-field="doc.course_id.prerequisites" />
                                     <t t-set="chapter" t-value="chapter + 1" />
diff --git a/views/account_move_view.xml b/views/account_move_view.xml
index 41d4e7a..e8c2e7c 100644
--- a/views/account_move_view.xml
+++ b/views/account_move_view.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
      License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo>
 
diff --git a/views/menus.xml b/views/menus.xml
index 509a032..da20651 100644
--- a/views/menus.xml
+++ b/views/menus.xml
@@ -1,4 +1,6 @@
 <?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
+     License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo>
     <!-- MENU -->
     <menuitem
@@ -6,6 +8,7 @@
         name="Formation"
         sequence="160"
         web_icon="lefilament_training,static/description/icon.png"
+        groups="group_training"
     />
 
     <menuitem
diff --git a/views/res_company_view.xml b/views/res_company_view.xml
index ff16ad9..ea5dc1d 100644
--- a/views/res_company_view.xml
+++ b/views/res_company_view.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
      License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo>
 
diff --git a/views/res_config_settings_view.xml b/views/res_config_settings_view.xml
index 063d2f2..02ee231 100644
--- a/views/res_config_settings_view.xml
+++ b/views/res_config_settings_view.xml
@@ -1,4 +1,6 @@
 <?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
+     License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo>
     <record id="res_config_settings_view_form" model="ir.ui.view">
         <field name="name">res.config.settings.view.form.inherit.training</field>
@@ -6,142 +8,78 @@
         <field name="priority" eval="40" />
         <field name="inherit_id" ref="base.res_config_settings_view_form" />
         <field name="arch" type="xml">
-            <xpath expr="//div[hasclass('settings')]" position="inside">
+            <xpath expr="//form" position="inside">
                 <field
                     name="country_code"
                     invisible="1"
                     groups="account.group_account_manager"
                 />
-                <div
-                    class="app_settings_block"
+                <app
                     data-string="Formation"
                     string="Formation"
-                    data-key="lefilament_training"
+                    name="lefilament_training"
+                    logo="/lefilament_training/static/description/icon.png"
                     groups="lefilament_training.group_training"
                 >
-                    <h2>Infos Légales</h2>
-                    <div
-                        class="row mt16 o_settings_container"
-                        name="title_report_settings"
-                    >
-                        <div class="col-12 o_setting_box">
-                            <div class="o_setting_left_pane" />
-                            <div class="o_setting_right_pane">
-                                <div class="content-group">
-                                    <div class="row mt16">
-                                        <label for="training_number" class="col-lg-6" />
-                                        <field name="training_number" />
-                                    </div>
-                                    <div class="row mt16">
-                                        <div class="col-12 fw-bold">
-                                            Conditions spéciales à ajouter en fin de convention
-                                        </div>
-                                        <div class="col-12">
-                                            <field
-                                                name="agreement_special_condition"
-                                                class="w-100"
-                                                widget="html"
-                                            />
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
+                    <div id="training">
+                        <block title="Infos Légales" name="legal_infos">
+                            <setting id="company_training_number">
+                                <field name="training_number" />
+                            </setting>
+                            <setting
+                                id="training_conditions"
+                                help="Conditions spéciales à ajouter en fin de convention"
+                            >
+                                <field
+                                    name="agreement_special_condition"
+                                    widget="html"
+                                    class="w-100"
+                                />
+                            </setting>
+                        </block>
+                        <block
+                            title="Configuration des PDF"
+                            name="title_report_settings"
+                        >
+                            <setting id="title" string="Titres">
+                                <field name="title_color" />
+                                <br />
+                                <field name="title_bg_color" />
+                                <br />
+                                <field name="subtitle_color" />
+                                <br />
+                                <field name="title_font" />
+                            </setting>
+                            <setting id="text" string="Textes">
+                                <field name="text_font" />
+                                <br />
+                                <field name="logo_ids" mode="kanban">
+                                     <kanban delete="1">
+                                         <field name="name" />
+                                         <field name="company_id" />
+                                         <field name="logo" />
+                                         <templates>
+                                              <t t-name="kanban-box">
+                                                  <div class="oe_kanban_global_click">
+                                                      <field
+                                                        name="logo"
+                                                        preview_image="logo"
+                                                        widget="image"
+                                                        options="{'zoom': true, 'zoom_delay': 1000}"
+                                                    />
+                                                </div>
+                                              </t>
+                                          </templates>
+                                     </kanban>
+                                     <form string="Logos">
+                                         <field name="logo" filename="name" />
+                                         <field name="company_id" invisible="1" />
+                                     </form>
+                                </field>
+                            </setting>
+                        </block>
                     </div>
-                    <h2>Configuration des PDF</h2>
-                    <div
-                        class="row mt16 o_settings_container"
-                        name="title_report_settings"
-                    >
-                        <div class="col-12 col-lg-6 o_setting_box">
-                            <div class="o_setting_left_pane" />
-                            <div class="o_setting_right_pane">
-                                <span class="o_form_label">Titres</span>
-                                <div class="content-group">
-                                    <div class="row mt16">
-                                        <label
-                                            for="title_color"
-                                            class="col-lg-6 o_light_label"
-                                        />
-                                        <field name="title_color" widget="color" />
-                                    </div>
-                                    <div class="row">
-                                        <label
-                                            for="title_bg_color"
-                                            class="col-lg-6 o_light_label"
-                                        />
-                                        <field name="title_bg_color" widget="color" />
-                                    </div>
-                                    <div class="row">
-                                        <label
-                                            for="subtitle_color"
-                                            class="col-lg-6 o_light_label"
-                                        />
-                                        <field name="subtitle_color" widget="color" />
-                                    </div>
-                                    <div class="row">
-                                        <label
-                                            for="title_font"
-                                            class="col-lg-6 o_light_label"
-                                        />
-                                        <field name="title_font" />
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                        <div class="col-12 col-lg-6 o_setting_box" id="rounding_method">
-                            <div class="o_setting_left_pane" />
-                            <div class="o_setting_right_pane">
-                                <span class="o_form_label">Texte</span>
-                                 <div class="content-group">
-                                    <div class="row mt16">
-                                        <label
-                                            for="text_font"
-                                            class="col-lg-6 o_light_label"
-                                        />
-                                        <field name="text_font" />
-                                    </div>
-                                     <div class="row mt16">
-                                         <div class="col-lg-6">
-                                             <label for="logo_ids" />
-                                             <p class="text-muted">
-                                                 Les logos sont affichés à la fin de la page de programme
-                                             </p>
-                                         </div>
-                                         <field name="logo_ids" mode="kanban">
-                                             <kanban delete="1">
-                                                 <field name="name" />
-                                                 <field name="company_id" />
-                                                 <field name="logo" />
-                                                 <templates>
-                                                      <t t-name="kanban-box">
-                                                          <div
-                                                            class="oe_kanban_global_click"
-                                                        >
-                                                              <field
-                                                                name="logo"
-                                                                preview_image="logo"
-                                                                widget="image"
-                                                                options="{'zoom': true, 'zoom_delay': 1000}"
-                                                            />
-                                                        </div>
-                                                      </t>
-                                                  </templates>
-                                             </kanban>
-                                             <form string="Logos">
-                                                 <field name="logo" filename="name" />
-                                                 <field
-                                                    name="company_id"
-                                                    invisible="1"
-                                                />
-                                             </form>
-                                         </field>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
+                </app>
             </xpath>
         </field>
     </record>
diff --git a/views/res_partner_view.xml b/views/res_partner_view.xml
index 94aeb1b..df6c999 100644
--- a/views/res_partner_view.xml
+++ b/views/res_partner_view.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
      License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo>
 
diff --git a/views/sale_order_view.xml b/views/sale_order_view.xml
index 9f91147..cdb83f9 100644
--- a/views/sale_order_view.xml
+++ b/views/sale_order_view.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
      License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo>
 
diff --git a/views/training_course_view.xml b/views/training_course_view.xml
index d480782..a2500d1 100644
--- a/views/training_course_view.xml
+++ b/views/training_course_view.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
      License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo>
     <!-- Form View Programs -->
diff --git a/views/training_session_view.xml b/views/training_session_view.xml
index 71cc703..6041079 100644
--- a/views/training_session_view.xml
+++ b/views/training_session_view.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
      License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo>
     <record id="training_session_form" model="ir.ui.view">
diff --git a/views/training_training_view.xml b/views/training_training_view.xml
index 971430a..07abf9d 100644
--- a/views/training_training_view.xml
+++ b/views/training_training_view.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
      License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo>
     <record id="training_training_form" model="ir.ui.view">
@@ -10,21 +10,21 @@
                 <header>
                     <button
                         name="action_valid"
-                        states="draft"
+                        invisible="state != 'draft'"
                         string="Valider"
                         class="btn-primary"
                         type="object"
                     />
                     <button
                         name="action_done"
-                        states="current"
+                        invisible="state != 'current'"
                         string="Formation Terminée"
                         class="btn-primary"
                         type="object"
                     />
                     <button
                         name="action_draft"
-                        states="current,done"
+                        invisible="state not in ('current', 'done')"
                         string="Remettre en brouillon"
                         class=""
                         type="object"
@@ -122,7 +122,10 @@
                         </page>
                         <page name="convention" string="Convention">
                             <group>
-                                <field name="agreement_number" />
+                                <field
+                                    name="agreement_number"
+                                    readonly="state != 'draft'"
+                                />
                                 <field name="place_convention" />
                                 <field name="date_convention" />
                                 <field name="convention" />
diff --git a/views/training_type_view.xml b/views/training_type_view.xml
index 88ac845..d934ddc 100644
--- a/views/training_type_view.xml
+++ b/views/training_type_view.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2019-2022 Le Filament (<https://le-filament.com>)
+<!-- Copyright 2019- Le Filament (https://le-filament.com)
      License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 <odoo>
 
-- 
GitLab