From 7b8e2e8cff9ad82c1292072c478ec21ccb354c51 Mon Sep 17 00:00:00 2001 From: Wiemboudabous Date: Thu, 18 Jun 2026 14:37:45 +0200 Subject: [PATCH 1/4] Add dossier-abandonne event config --- src/Products/urban/profiles/extra/data.py | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/Products/urban/profiles/extra/data.py b/src/Products/urban/profiles/extra/data.py index f694fc1e6..d7542de2d 100644 --- a/src/Products/urban/profiles/extra/data.py +++ b/src/Products/urban/profiles/extra/data.py @@ -4433,6 +4433,15 @@ "eventType": ("Products.urban.interfaces.IDecisionProjectFromSPWEvent",), "TALCondition": "python: licence.getProcedureChoice() != 'article65'", }, + { + "id": "dossier-abandonne", + "title": "Dossier abandonné", + "eventDateLabel": "Date de notification", + "eventType": ("Products.urban.interfaces.IForcedEndEvent",), + "isKeyEvent": True, + "keyDates": ("eventDate",), + "podTemplates": (), + }, { "id": "plans-modificatifs", "title": "Plans modificatifs", @@ -10212,6 +10221,15 @@ "eventType": ("Products.urban.interfaces.IDecisionProjectFromSPWEvent",), "TALCondition": "python: licence.getProcedureChoice() != 'article65'", }, + { + "id": "dossier-abandonne", + "title": "Dossier abandonné", + "eventDateLabel": "Date de notification", + "eventType": ("Products.urban.interfaces.IForcedEndEvent",), + "isKeyEvent": True, + "keyDates": ("eventDate",), + "podTemplates": (), + }, { "id": "modified-blueprints", "title": "Plans modificatifs", @@ -11233,6 +11251,15 @@ "eventType": ("Products.urban.interfaces.IDecisionProjectFromSPWEvent",), "TALCondition": "python: licence.getProcedureChoice() != 'article65'", }, + { + "id": "dossier-abandonne", + "title": "Dossier abandonné", + "eventDateLabel": "Date de notification", + "eventType": ("Products.urban.interfaces.IForcedEndEvent",), + "isKeyEvent": True, + "keyDates": ("eventDate",), + "podTemplates": (), + }, { "id": "modified-blueprints", "title": "Plans modificatifs", From b6cb6fbf91dab92f6e7071fe215fc820a6c451c0 Mon Sep 17 00:00:00 2001 From: Wiemboudabous Date: Thu, 18 Jun 2026 14:41:29 +0200 Subject: [PATCH 2/4] Handle commune abandonment notifications --- news/URB-3568.feature | 4 ++++ src/Products/urban/browser/cron/notice.py | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 news/URB-3568.feature diff --git a/news/URB-3568.feature b/news/URB-3568.feature new file mode 100644 index 000000000..87132bb88 --- /dev/null +++ b/news/URB-3568.feature @@ -0,0 +1,4 @@ +Add handling of ABANDON_COMMUNE_MANUELLE, PM_ABANDON_COMMUNE_EP, and PM_ABANDON_COMMUNE_EP_FTFD notification. +Add dossier-abandonne event config to codt_uniquelicence, envclassone and envclasstwo licence configs. +Add upgrade step 2916 to create dossier-abandonne event config on existing installations. +[WBoudabous] \ No newline at end of file diff --git a/src/Products/urban/browser/cron/notice.py b/src/Products/urban/browser/cron/notice.py index a9cf804ba..6ec1a08a4 100644 --- a/src/Products/urban/browser/cron/notice.py +++ b/src/Products/urban/browser/cron/notice.py @@ -246,6 +246,12 @@ def _handle_notification(self, notice_id): "PM_REFUS_TACITE_COMMUNE", ): handler = DecisionSPWHandler + elif detailed_notification.notice_type in ( + "ABANDON_COMMUNE_MANUELLE", + "PM_ABANDON_COMMUNE_EP", + "PM_ABANDON_COMMUNE_EP_FTFD", + ): + handler = AbandonedHandler # GESPER @@ -609,6 +615,14 @@ def fill_incoming_event(self): self.event.setExternalDecision(self.notification.proposed_decision_code) +class AbandonedHandler(IncomingNoticeHandler): + event_config_marker = "Products.urban.interfaces.IForcedEndEvent" + + @property + def desired_licence_state(self): + return "retired" + + class DecisionSPWHandler(IncomingNoticeHandler): event_config_marker = "Products.urban.interfaces.IWalloonRegionDecisionEvent" From a0e8ea4d86ec1f9eefe797390651d39e5b928774 Mon Sep 17 00:00:00 2001 From: Wiemboudabous Date: Thu, 25 Jun 2026 15:13:07 +0200 Subject: [PATCH 3/4] Apply review comments --- .../urban/locales/fr/LC_MESSAGES/urban.po | 9 +++++++ src/Products/urban/locales/urban-manual.pot | 9 +++++++ src/Products/urban/locales/urban.pot | 9 +++++++ src/Products/urban/migration/update_290.py | 1 + .../urban/profiles/default/metadata.xml | 2 +- src/Products/urban/profiles/extra/data.py | 27 ------------------- 6 files changed, 29 insertions(+), 28 deletions(-) diff --git a/src/Products/urban/locales/fr/LC_MESSAGES/urban.po b/src/Products/urban/locales/fr/LC_MESSAGES/urban.po index dea5e457c..d88e94ba6 100644 --- a/src/Products/urban/locales/fr/LC_MESSAGES/urban.po +++ b/src/Products/urban/locales/fr/LC_MESSAGES/urban.po @@ -5958,3 +5958,12 @@ msgstr "Plans Modificatifs - Notification à la commune que le RS vaut décision msgid "PM_REFUS_TACITE_COMMUNE" msgstr "Plans modificatifs - Notification à la commune du refus tacite" + +msgid "ABANDON_COMMUNE_MANUELLE" +msgstr "Notification à la commune de l'abandon de la procédure" + +msgid "PM_ABANDON_COMMUNE_EP" +msgstr "Plans modificatifs - Notification à la commune de l'abandon de la procédure" + +msgid "PM_ABANDON_COMMUNE_EP_FTFD" +msgstr "Plans modificatifs - Notification à la commune de l'abandon de la procédure (AC=FTFD)" diff --git a/src/Products/urban/locales/urban-manual.pot b/src/Products/urban/locales/urban-manual.pot index 8456b81e8..754ed403b 100644 --- a/src/Products/urban/locales/urban-manual.pot +++ b/src/Products/urban/locales/urban-manual.pot @@ -1713,3 +1713,12 @@ msgstr "" msgid "PM_REFUS_TACITE_COMMUNE" msgstr "" + +msgid "ABANDON_COMMUNE_MANUELLE" +msgstr "" + +msgid "PM_ABANDON_COMMUNE_EP" +msgstr "" + +msgid "PM_ABANDON_COMMUNE_EP_FTFD" +msgstr "" diff --git a/src/Products/urban/locales/urban.pot b/src/Products/urban/locales/urban.pot index a28a03d8b..0eb6626ca 100644 --- a/src/Products/urban/locales/urban.pot +++ b/src/Products/urban/locales/urban.pot @@ -5946,3 +5946,12 @@ msgstr "" msgid "PM_PROROGATION_COURRIER_COMMUNE" msgstr "" + +msgid "ABANDON_COMMUNE_MANUELLE" +msgstr "" + +msgid "PM_ABANDON_COMMUNE_EP" +msgstr "" + +msgid "PM_ABANDON_COMMUNE_EP_FTFD" +msgstr "" diff --git a/src/Products/urban/migration/update_290.py b/src/Products/urban/migration/update_290.py index 68458e604..db432f672 100644 --- a/src/Products/urban/migration/update_290.py +++ b/src/Products/urban/migration/update_290.py @@ -643,3 +643,4 @@ def normalize_externaldecisions_vocabulary(context): new_term = getattr(voc_folder, vocabulary_term) new_term.setDescription(DESCRIPTION) logger.info("Created missing vocabulary term: %s", vocabulary_term) + logger.info("upgrade step done!") diff --git a/src/Products/urban/profiles/default/metadata.xml b/src/Products/urban/profiles/default/metadata.xml index 928bd4b6a..ba561c0f8 100644 --- a/src/Products/urban/profiles/default/metadata.xml +++ b/src/Products/urban/profiles/default/metadata.xml @@ -1,6 +1,6 @@ - 2916 + 2915 profile-Products.urban:preinstall diff --git a/src/Products/urban/profiles/extra/data.py b/src/Products/urban/profiles/extra/data.py index d7542de2d..f694fc1e6 100644 --- a/src/Products/urban/profiles/extra/data.py +++ b/src/Products/urban/profiles/extra/data.py @@ -4433,15 +4433,6 @@ "eventType": ("Products.urban.interfaces.IDecisionProjectFromSPWEvent",), "TALCondition": "python: licence.getProcedureChoice() != 'article65'", }, - { - "id": "dossier-abandonne", - "title": "Dossier abandonné", - "eventDateLabel": "Date de notification", - "eventType": ("Products.urban.interfaces.IForcedEndEvent",), - "isKeyEvent": True, - "keyDates": ("eventDate",), - "podTemplates": (), - }, { "id": "plans-modificatifs", "title": "Plans modificatifs", @@ -10221,15 +10212,6 @@ "eventType": ("Products.urban.interfaces.IDecisionProjectFromSPWEvent",), "TALCondition": "python: licence.getProcedureChoice() != 'article65'", }, - { - "id": "dossier-abandonne", - "title": "Dossier abandonné", - "eventDateLabel": "Date de notification", - "eventType": ("Products.urban.interfaces.IForcedEndEvent",), - "isKeyEvent": True, - "keyDates": ("eventDate",), - "podTemplates": (), - }, { "id": "modified-blueprints", "title": "Plans modificatifs", @@ -11251,15 +11233,6 @@ "eventType": ("Products.urban.interfaces.IDecisionProjectFromSPWEvent",), "TALCondition": "python: licence.getProcedureChoice() != 'article65'", }, - { - "id": "dossier-abandonne", - "title": "Dossier abandonné", - "eventDateLabel": "Date de notification", - "eventType": ("Products.urban.interfaces.IForcedEndEvent",), - "isKeyEvent": True, - "keyDates": ("eventDate",), - "podTemplates": (), - }, { "id": "modified-blueprints", "title": "Plans modificatifs", From 058d2c30f6a43dac6db620c6b4c5c6cc7b4345ca Mon Sep 17 00:00:00 2001 From: Wiemboudabous Date: Thu, 25 Jun 2026 15:55:31 +0200 Subject: [PATCH 4/4] Apply review comments --- news/URB-3568.feature | 3 +-- src/Products/urban/migration/update_290.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/news/URB-3568.feature b/news/URB-3568.feature index 87132bb88..e79543b0e 100644 --- a/news/URB-3568.feature +++ b/news/URB-3568.feature @@ -1,4 +1,3 @@ Add handling of ABANDON_COMMUNE_MANUELLE, PM_ABANDON_COMMUNE_EP, and PM_ABANDON_COMMUNE_EP_FTFD notification. -Add dossier-abandonne event config to codt_uniquelicence, envclassone and envclasstwo licence configs. -Add upgrade step 2916 to create dossier-abandonne event config on existing installations. +Adds the dossier-abandonne event configuration to CODT Unique Licence, EnvClassOne, and EnvClassTwo licence configurations in the urban.events repository. [WBoudabous] \ No newline at end of file diff --git a/src/Products/urban/migration/update_290.py b/src/Products/urban/migration/update_290.py index db432f672..d6f242257 100644 --- a/src/Products/urban/migration/update_290.py +++ b/src/Products/urban/migration/update_290.py @@ -643,4 +643,4 @@ def normalize_externaldecisions_vocabulary(context): new_term = getattr(voc_folder, vocabulary_term) new_term.setDescription(DESCRIPTION) logger.info("Created missing vocabulary term: %s", vocabulary_term) - logger.info("upgrade step done!") +