Esempio n. 1
0
def v11(context):
    IUpgradeTool(context).runImportStep('collective.contact.core', 'typeinfo')
    IUpgradeTool(context).runImportStep('collective.contact.core',
                                        'plone.app.registry')
    val = api.portal.get_registry_record(name='person_contact_details_private',
                                         interface=IContactCoreParameters)
    if val is None:
        api.portal.set_registry_record(name='person_contact_details_private',
                                       value=True,
                                       interface=IContactCoreParameters)
def v1101(context):
    """Upgrade to v1101"""
    tool = IUpgradeTool(context)
    tool.runProfile('collective.contentrules.comingsoon.upgrades:v1101')
Esempio n. 3
0
def v9(context):
    tool = IUpgradeTool(context)
    tool.runProfile('collective.contact.core.upgrades:v9')
Esempio n. 4
0
def v6(context):
    tool = IUpgradeTool(context)
    tool.runProfile('collective.contact.core.upgrades:v6')
    tool.refreshResources()
Esempio n. 5
0
def v5(context):
    tool = IUpgradeTool(context)
    tool.runProfile('collective.contact.widget:default')
    # add sortable_title column and reindex persons and organizations
    tool.addMetadata('sortable_title')
    tool.reindexContents(IContactContent, ('sortable_title', ))
Esempio n. 6
0
def v4(context):
    IUpgradeTool(context).runImportStep('collective.contact.core', 'rolemap')
Esempio n. 7
0
def v2(context):
    tool = IUpgradeTool(context)
    tool.runProfile('collective.contact.core.upgrades:v2')
    catalog = api.portal.get_tool(name='portal_catalog')
    catalog.clearFindAndRebuild()
    reindex_relations(context)
Esempio n. 8
0
def upgrade12(context):
    IUpgradeTool(context).refreshResources()