- Envoyé le {{ offre[0].date_envoi.strftime('%d %B %Y à %H:%M') }} par {{ offre[0].sender_id|get_nomcomplet_by_id }}
+ Envoyé le {{ offre[0].date_envoi.strftime('%d/%m/%Y') }} à {{ offre[0].date_envoi.strftime('%Hh%M') }} par {{ offre[0].sender_id|get_nomcomplet_by_id }}
Intitulé : {{ offre[1].intitule }}
Description : {{ offre[1].description }}
Type de l'offre : {{ offre[1].type_offre }}
Missions : {{ offre[1].missions }}
Durée : {{ offre[1].duree }}
+
+ {% if offre[1].correspondant_id %}
+ Contacté {{ offre[3].nom }} {{ offre[3].prenom }}
+ {% if offre[3].mail and offre[3].telephone %}
+ ({{ offre[3].mail }} - {{ offre[3].telephone }})
+ {% else %}
+ ({{ offre[3].mail }}{{offre[3].telephone}})
+ {% endif %}
+ {% endif %}
+
lien vers l'entreprise
{% for fichier in offre[2] %}
diff --git a/migrations/versions/e97b2a10f86c_tables_module_gestions_relations_.py b/migrations/versions/e97b2a10f86c_tables_module_gestions_relations_.py
new file mode 100644
index 00000000..3580022f
--- /dev/null
+++ b/migrations/versions/e97b2a10f86c_tables_module_gestions_relations_.py
@@ -0,0 +1,158 @@
+"""tables module gestions relations entreprises suite
+
+Revision ID: e97b2a10f86c
+Revises: af05f03b81be
+Create Date: 2022-04-19 17:39:08.197835
+
+"""
+from alembic import op
+import sqlalchemy as sa
+
+
+# revision identifiers, used by Alembic.
+revision = "e97b2a10f86c"
+down_revision = "af05f03b81be"
+branch_labels = None
+depends_on = None
+
+
+def upgrade():
+ # ### commands auto generated by Alembic - please adjust! ###
+ op.create_table(
+ "are_correspondants",
+ sa.Column("id", sa.Integer(), nullable=False),
+ sa.Column("entreprise_id", sa.Integer(), nullable=True),
+ sa.Column("nom", sa.Text(), nullable=True),
+ sa.Column("prenom", sa.Text(), nullable=True),
+ sa.Column("telephone", sa.Text(), nullable=True),
+ sa.Column("mail", sa.Text(), nullable=True),
+ sa.Column("poste", sa.Text(), nullable=True),
+ sa.Column("service", sa.Text(), nullable=True),
+ sa.ForeignKeyConstraint(
+ ["entreprise_id"], ["are_entreprises.id"], ondelete="cascade"
+ ),
+ sa.PrimaryKeyConstraint("id"),
+ )
+ op.create_table(
+ "are_stages_apprentissages",
+ sa.Column("id", sa.Integer(), nullable=False),
+ sa.Column("entreprise_id", sa.Integer(), nullable=True),
+ sa.Column("etudid", sa.Integer(), nullable=True),
+ sa.Column("type_offre", sa.Text(), nullable=True),
+ sa.Column("date_debut", sa.Date(), nullable=True),
+ sa.Column("date_fin", sa.Date(), nullable=True),
+ sa.Column("formation_text", sa.Text(), nullable=True),
+ sa.Column("formation_scodoc", sa.Integer(), nullable=True),
+ sa.Column("notes", sa.Text(), nullable=True),
+ sa.ForeignKeyConstraint(
+ ["entreprise_id"], ["are_entreprises.id"], ondelete="cascade"
+ ),
+ sa.PrimaryKeyConstraint("id"),
+ )
+ op.drop_table("are_etudiants")
+ op.add_column(
+ "are_contacts", sa.Column("date", sa.DateTime(timezone=True), nullable=True)
+ )
+ op.add_column("are_contacts", sa.Column("user", sa.Integer(), nullable=True))
+ op.add_column("are_contacts", sa.Column("entreprise", sa.Integer(), nullable=True))
+ op.add_column("are_contacts", sa.Column("notes", sa.Text(), nullable=True))
+ op.drop_constraint(
+ "are_contacts_entreprise_id_fkey", "are_contacts", type_="foreignkey"
+ )
+ op.create_foreign_key(
+ None,
+ "are_contacts",
+ "are_entreprises",
+ ["entreprise"],
+ ["id"],
+ ondelete="cascade",
+ )
+ op.create_foreign_key(
+ None, "are_contacts", "user", ["user"], ["id"], ondelete="cascade"
+ )
+ op.drop_column("are_contacts", "nom")
+ op.drop_column("are_contacts", "telephone")
+ op.drop_column("are_contacts", "service")
+ op.drop_column("are_contacts", "entreprise_id")
+ op.drop_column("are_contacts", "mail")
+ op.drop_column("are_contacts", "poste")
+ op.drop_column("are_contacts", "prenom")
+ op.add_column(
+ "are_offres", sa.Column("correspondant_id", sa.Integer(), nullable=True)
+ )
+ op.create_foreign_key(
+ None,
+ "are_offres",
+ "are_correspondants",
+ ["correspondant_id"],
+ ["id"],
+ ondelete="cascade",
+ )
+ # ### end Alembic commands ###
+
+
+def downgrade():
+ # ### commands auto generated by Alembic - please adjust! ###
+ op.drop_constraint(None, "are_offres", type_="foreignkey")
+ op.drop_column("are_offres", "correspondant_id")
+ op.add_column(
+ "are_contacts",
+ sa.Column("prenom", sa.TEXT(), autoincrement=False, nullable=True),
+ )
+ op.add_column(
+ "are_contacts",
+ sa.Column("poste", sa.TEXT(), autoincrement=False, nullable=True),
+ )
+ op.add_column(
+ "are_contacts", sa.Column("mail", sa.TEXT(), autoincrement=False, nullable=True)
+ )
+ op.add_column(
+ "are_contacts",
+ sa.Column("entreprise_id", sa.INTEGER(), autoincrement=False, nullable=True),
+ )
+ op.add_column(
+ "are_contacts",
+ sa.Column("service", sa.TEXT(), autoincrement=False, nullable=True),
+ )
+ op.add_column(
+ "are_contacts",
+ sa.Column("telephone", sa.TEXT(), autoincrement=False, nullable=True),
+ )
+ op.add_column(
+ "are_contacts", sa.Column("nom", sa.TEXT(), autoincrement=False, nullable=True)
+ )
+ op.drop_constraint(None, "are_contacts", type_="foreignkey")
+ op.drop_constraint(None, "are_contacts", type_="foreignkey")
+ op.create_foreign_key(
+ "are_contacts_entreprise_id_fkey",
+ "are_contacts",
+ "are_entreprises",
+ ["entreprise_id"],
+ ["id"],
+ ondelete="CASCADE",
+ )
+ op.drop_column("are_contacts", "notes")
+ op.drop_column("are_contacts", "entreprise")
+ op.drop_column("are_contacts", "user")
+ op.drop_column("are_contacts", "date")
+ op.create_table(
+ "are_etudiants",
+ sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False),
+ sa.Column("entreprise_id", sa.INTEGER(), autoincrement=False, nullable=True),
+ sa.Column("etudid", sa.INTEGER(), autoincrement=False, nullable=True),
+ sa.Column("type_offre", sa.TEXT(), autoincrement=False, nullable=True),
+ sa.Column("date_debut", sa.DATE(), autoincrement=False, nullable=True),
+ sa.Column("date_fin", sa.DATE(), autoincrement=False, nullable=True),
+ sa.Column("formation_text", sa.TEXT(), autoincrement=False, nullable=True),
+ sa.Column("formation_scodoc", sa.INTEGER(), autoincrement=False, nullable=True),
+ sa.ForeignKeyConstraint(
+ ["entreprise_id"],
+ ["are_entreprises.id"],
+ name="are_etudiants_entreprise_id_fkey",
+ ondelete="CASCADE",
+ ),
+ sa.PrimaryKeyConstraint("id", name="are_etudiants_pkey"),
+ )
+ op.drop_table("are_stages_apprentissages")
+ op.drop_table("are_correspondants")
+ # ### end Alembic commands ###
diff --git a/sco_version.py b/sco_version.py
index 06ddcfb8..df7bcd01 100644
--- a/sco_version.py
+++ b/sco_version.py
@@ -1,7 +1,7 @@
# -*- mode: python -*-
# -*- coding: utf-8 -*-
-SCOVERSION = "9.2.8"
+SCOVERSION = "9.2.11"
SCONAME = "ScoDoc"