From 714c79c93581da5de957aef4859d0b458db084bd Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Thu, 5 Dec 2024 11:07:01 +0100 Subject: [PATCH] =?UTF-8?q?Add=20dependency=20with=20collective.volto.bloc?= =?UTF-8?q?ksfield=20>=3D=202.2.0=20and=20install=E2=80=A6=20(#289)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add dependency with collective.volto.blocksfield >= 2.2.0 and install it to have all blocks indexed in block_types index. * fix buildout versions * fix buildout versions * black + zprettu * flake8 * blacked --- CHANGES.rst | 2 ++ setup.py | 2 +- src/design/plone/contenttypes/browser/bando.py | 1 - src/design/plone/contenttypes/profiles/default/metadata.xml | 1 + src/design/plone/contenttypes/restapi/serializers/dxfields.py | 1 - src/design/plone/contenttypes/upgrades/configure.zcml | 4 +++- src/design/plone/contenttypes/upgrades/to_730x.py | 4 ++++ test-6.0.x.cfg | 3 ++- 8 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 399d7916..1140e2cc 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,8 @@ Changelog 6.2.25 (unreleased) ------------------- +- Add dependency with collective.volto.blocksfield >= 2.2.0 and install it to have all blocks indexed in block_types index. + [cekk] - Do not use eea.api.taxonomy because it is deprecated. [cekk] diff --git a/setup.py b/setup.py index ce376ee6..31860534 100644 --- a/setup.py +++ b/setup.py @@ -58,7 +58,7 @@ "plone.api>=1.8.4", "plone.app.dexterity>2.6.9", "collective.venue[geolocation]", - "collective.volto.blocksfield", + "collective.volto.blocksfield>=2.2.0", "collective.z3cform.datagridfield", "plone.formwidget.geolocation", "redturtle.volto>=5.5.3", diff --git a/src/design/plone/contenttypes/browser/bando.py b/src/design/plone/contenttypes/browser/bando.py index 8af4dc43..7d8cec2e 100644 --- a/src/design/plone/contenttypes/browser/bando.py +++ b/src/design/plone/contenttypes/browser/bando.py @@ -34,7 +34,6 @@ @implementer(IBandoView) class BandoView(BaseBandoView): - def retrieveContentsOfFolderDeepening(self, path_dfolder): """Retrieves all objects contained in Folder Deppening""" diff --git a/src/design/plone/contenttypes/profiles/default/metadata.xml b/src/design/plone/contenttypes/profiles/default/metadata.xml index 58edf1c4..af246972 100644 --- a/src/design/plone/contenttypes/profiles/default/metadata.xml +++ b/src/design/plone/contenttypes/profiles/default/metadata.xml @@ -8,6 +8,7 @@ profile-collective.z3cform.datagridfield:default profile-design.plone.contenttypes:taxonomy profile-collective.volto.enhancedlinks:default + profile-collective.volto.blocksfield:default profile-collective.taxonomy:default diff --git a/src/design/plone/contenttypes/restapi/serializers/dxfields.py b/src/design/plone/contenttypes/restapi/serializers/dxfields.py index 14af90dd..25cec6ec 100644 --- a/src/design/plone/contenttypes/restapi/serializers/dxfields.py +++ b/src/design/plone/contenttypes/restapi/serializers/dxfields.py @@ -189,7 +189,6 @@ def get_item_children(item): @adapter(ITextLine, IServizio, IDesignPloneContenttypesLayer) class ServizioTextLineFieldSerializer(DefaultFieldSerializer): - PERMISSION_TO_CHECK = "View" CHECK_CONTENT_TYPE = None diff --git a/src/design/plone/contenttypes/upgrades/configure.zcml b/src/design/plone/contenttypes/upgrades/configure.zcml index 7f46fce5..7000830a 100644 --- a/src/design/plone/contenttypes/upgrades/configure.zcml +++ b/src/design/plone/contenttypes/upgrades/configure.zcml @@ -912,11 +912,13 @@ destination="7308" handler=".to_730x.to_7308" /> + + diff --git a/src/design/plone/contenttypes/upgrades/to_730x.py b/src/design/plone/contenttypes/upgrades/to_730x.py index 492b273c..07d74d2b 100644 --- a/src/design/plone/contenttypes/upgrades/to_730x.py +++ b/src/design/plone/contenttypes/upgrades/to_730x.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from plone.app.upgrade.utils import installOrReinstallProduct from design.plone.contenttypes.events.common import SUBFOLDERS_MAPPING from design.plone.contenttypes.utils import create_default_blocks from plone import api @@ -161,8 +162,11 @@ def to_7308(context): def to_7309(context): + logger.info("Uninstall eea.api.taxonomy") ps = api.portal.get_tool(name="portal_setup") ps.runAllImportStepsFromProfile( "profile-design.plone.contenttypes:remove_eea_api_taxonomy" ) ps.unsetLastVersionForProfile("eea.api.taxonomy:default") + logger.info("Install blocksfield") + installOrReinstallProduct(api.portal.get(), "collective.volto.blocksfield") diff --git a/test-6.0.x.cfg b/test-6.0.x.cfg index ea2094c9..fae277e8 100644 --- a/test-6.0.x.cfg +++ b/test-6.0.x.cfg @@ -6,4 +6,5 @@ extends = base.cfg [versions] -collective.taxonomy = 3.1.5 +collective.volto.blocksfield = 2.2.0 +collective.taxonomy = 3.1.5 \ No newline at end of file