diff --git a/bika/health/content/bikasetup.py b/bika/health/content/bikasetup.py index 4f83ef2..6283f8b 100644 --- a/bika/health/content/bikasetup.py +++ b/bika/health/content/bikasetup.py @@ -1,7 +1,6 @@ from Products.Archetypes.Widget import BooleanWidget from archetypes.schemaextender.interfaces import ISchemaExtender,\ IOrderableSchemaExtender -from bika.lims.config import PUBLICATION_PREFS from bika.lims.fields import * from bika.health import bikaMessageFactory as _ from bika.lims.interfaces import IBikaSetup @@ -69,7 +68,7 @@ class BikaSetupSchemaExtender(object): "Patient's 'Publication preferences' tab.")) ), ExtLinesField('PatientPublicationPreferences', - vocabulary= PUBLICATION_PREFS, + vocabulary='bika.lims.vocabularies.CustomPubPrefVocabularyFactory', schemata = 'Results Reports', widget = MultiSelectionWidget( label = _("Default publication preference for Patients"), diff --git a/bika/health/content/client.py b/bika/health/content/client.py index 693ed7e..9fe2f33 100644 --- a/bika/health/content/client.py +++ b/bika/health/content/client.py @@ -6,7 +6,6 @@ from bika.health.widgets import * from plone.indexer.decorator import indexer from bika.health import bikaMessageFactory as _ -from bika.lims.config import PUBLICATION_PREFS from zope.component import adapts from archetypes.schemaextender.interfaces import IOrderableSchemaExtender @@ -41,7 +40,7 @@ class ClientSchemaExtender(object): "preferences' tab.")) ), ExtLinesField('PatientPublicationPreferences', - vocabulary=PUBLICATION_PREFS, + vocabulary='bika.lims.vocabularies.CustomPubPrefVocabularyFactory', schemata='Results Reports', widget=MultiSelectionWidget( label=_("Default publication preference for Patients"), diff --git a/bika/health/content/patient.py b/bika/health/content/patient.py index e2e6e05..1f85ce6 100644 --- a/bika/health/content/patient.py +++ b/bika/health/content/patient.py @@ -403,7 +403,7 @@ "to the Patient automatically.")) ), LinesField('PublicationPreferences', - vocabulary=PUBLICATION_PREFS, + vocabulary='bika.lims.vocabularies.CustomPubPrefVocabularyFactory', schemata='Publication preference', widget=MultiSelectionWidget( label=_("Publication preference"), diff --git a/bika/health/upgrade/configure.zcml b/bika/health/upgrade/configure.zcml index 0304ea8..986380b 100644 --- a/bika/health/upgrade/configure.zcml +++ b/bika/health/upgrade/configure.zcml @@ -29,4 +29,13 @@ handler="bika.health.upgrade.to318.upgrade" sortkey="1" profile="bika.health:default"/> + + diff --git a/bika/health/upgrade/to320.py b/bika/health/upgrade/to320.py new file mode 100644 index 0000000..72bce2e --- /dev/null +++ b/bika/health/upgrade/to320.py @@ -0,0 +1,42 @@ +# This file is part of Bika Health LIS +# +# Copyright 2011-2016 by it's authors. +# Some rights reserved. See LICENSE.txt, AUTHORS.txt. + +from Acquisition import aq_inner +from Acquisition import aq_parent +from Products.CMFCore.utils import getToolByName +from bika.health import logger +from Products.CMFCore import permissions + + +def upgrade(tool): + """Upgrade step required for Bika Health 3.2.0 + """ + portal = aq_parent(aq_inner(tool)) + + qi = portal.portal_quickinstaller + ufrom = qi.upgradeInfo('bika.health')['installedVersion'] + logger.info("Upgrading Bika Health: %s -> %s" % (ufrom, '3.1.8')) + + """Updated profile steps + list of the generic setup import step names: portal.portal_setup.getSortedImportSteps() <--- + if you want more metadata use this: portal.portal_setup.getImportStepMetadata('jsregistry') <--- + important info about upgrade steps in + http://stackoverflow.com/questions/7821498/is-there-a-good-reference-list-for-the-names-of-the-genericsetup-import-steps + """ + setup = portal.portal_setup + # setup.runImportStepFromProfile('profile-bika.health:default', 'typeinfo') + # setup.runImportStepFromProfile('profile-bika.health:default', 'jsregistry') + # setup.runImportStepFromProfile('profile-bika.health:default', 'cssregistry') + # setup.runImportStepFromProfile('profile-bika.health:default', 'workflow-csv') + # setup.runImportStepFromProfile('profile-bika.health:default', 'factorytool') + # setup.runImportStepFromProfile('profile-bika.health:default', 'controlpanel') + # setup.runImportStepFromProfile('profile-bika.health:default', 'catalog') + # setup.runImportStepFromProfile('profile-bika.health:default', 'propertiestool') + # setup.runImportStepFromProfile('profile-bika.health:default', 'skins') + """Update workflow permissions + """ + # wf = getToolByName(portal, 'portal_workflow') + # wf.updateRoleMappings() + return True diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 9b83e57..6987e03 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -1,6 +1,7 @@ -3.1.9 (unreleased) +3.2 (unreleased) ------------------ -HEALTH-503: Validation of Date of birth +Updated to work with BikaLIMS 3.2 +HEALTH-503: Validation of Date of birth HEALTH-413: Dashboard not showing HEALTH-402: In Analysis Request Add form, contact doesn't get selected diff --git a/setup.py b/setup.py index 4c08fe7..d1ad237 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import os -version = '3.1.8' +version = '3.2' setup(name='bika.health', version=version, @@ -33,7 +33,7 @@ zip_safe=False, install_requires=[ 'setuptools', - 'bika.lims<3.2', + 'bika.lims==3.2.1', 'archetypes.schemaextender', 'collective.wtf', ],