Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new dashboardTemplate URB-3013 #235

Open
wants to merge 1 commit into
base: urban2.7.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions news/URB-3013.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Add new dashboardTemplate
[fngaha]
5 changes: 5 additions & 0 deletions src/Products/urban/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,11 @@ def section(self, section_name):
"title": "Listing des permis",
"use_objects": True,
},
{
"id": "permis-par-village.odt",
"portal_type": "DashboardPODTemplate",
"title": "Ministère - permis par village",
},
# {
# 'id': 'folderlisting.odt',
# 'portal_type': 'DashboardPODTemplate',
Expand Down
13 changes: 13 additions & 0 deletions src/Products/urban/migration/update_260.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,16 @@ def update_delais_vocabularies_and_activate_prorogation_field(context):
to_set = ("prorogation",)
config.setUsedAttributes(config.getUsedAttributes() + to_set)
logger.info("upgrade step done!")


def update_all_urban_templates(context):
""" """
logger = logging.getLogger(
"urban: update all urban templates"
)
logger.info("starting upgrade steps")
portal_setup = api.portal.get_tool("portal_setup")
portal_setup.runImportStepFromProfile(
"profile-Products.urban:extra", "urban-updateAllUrbanTemplates"
)
logger.info("upgrade step done!")
9 changes: 9 additions & 0 deletions src/Products/urban/migration/upgrades.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -567,4 +567,13 @@
profile="Products.urban:default"
/>

<gs:upgradeStep
title="Update all urban templates"
description=""
source="1141"
destination="1142"
handler=".update_260.update_all_urban_templates"
profile="Products.urban:default"
/>

</configure>
2 changes: 1 addition & 1 deletion src/Products/urban/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<metadata>
<version>1141</version>
<version>1142</version>
<dependencies>
<dependency>profile-Products.urban:preinstall</dependency>
</dependencies>
Expand Down
Binary file not shown.