Skip to content

Commit cbef1af

Browse files
juangallostraxispa
authored andcommitted
Remove "Bika" naming from Setup (#814)
* Change control panel category name Bika LIMS for SENAITE LIMS * Remove SENAITE from LIMS Configuration section in control panel * Change Bika Setup name to Setup in LIMS Configuration page * Update CHANGES.rst * Add function to rename bika_setup in upgrade step * Reload profile values for the controlpanel * Changelog. #814 to v1.2.6
1 parent 655970b commit cbef1af

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

CHANGES.rst

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Changelog
99

1010
**Changed**
1111

12+
- #814 Change naming from Bika LIMS Configuration to LIMS Configuration in the Site Setup page
13+
- #814 Change naming from Bika Setup to Setup in the LIMS Configuration section found in the Site Setup page
1214

1315
**Removed**
1416

bika/lims/monkey/controlpanel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ def overview_controlpanel_categories(self):
1616
"""
1717
return [
1818
{'id': 'Plone', 'title': PMF(u'Plone Configuration')},
19-
{'id': 'bika', 'title': _(u'Bika LIMS Configuration')},
19+
{'id': 'bika', 'title': _(u'LIMS Configuration')},
2020
{'id': 'Products', 'title': PMF(u'Add-on Configuration')},
2121
]

bika/lims/profiles/default/controlpanel.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
55
i18n:domain="plone">
66

7-
<configlet title="Bika Setup" action_id="bika_setup"
7+
<configlet title="Setup" action_id="bika_setup"
88
appId="bika.lims" category="bika" condition_expr=""
99
icon_expr="string:++resource++bika.lims.images/bikasetup.png"
1010
url_expr="string:$portal_url/bika_setup/edit"

bika/lims/upgrade/v01_02_006.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Copyright 2018 by it's authors.
66
# Some rights reserved. See LICENSE.rst, CONTRIBUTORS.rst.
77

8-
from bika.lims import logger
8+
from bika.lims import logger, api
99
from bika.lims.config import PROJECTNAME as product
1010
from bika.lims.upgrade import upgradestep
1111
from bika.lims.upgrade.utils import UpgradeUtils
@@ -28,7 +28,20 @@ def upgrade(tool):
2828
logger.info("Upgrading {0}: {1} -> {2}".format(product, ver_from, version))
2929

3030
# -------- ADD YOUR STUFF HERE --------
31+
rename_bika_setup()
3132

3233
logger.info("{0} upgraded to version {1}".format(product, version))
3334
return True
3435

36+
37+
def rename_bika_setup():
38+
"""
39+
Rename Bika Setup to just Setup to avoid naming confusions for new users
40+
"""
41+
logger.info("Renaming Bika Setup...")
42+
bika_setup = api.get_bika_setup()
43+
bika_setup.setTitle("Setup")
44+
bika_setup.reindexObject()
45+
setup = api.get_portal().portal_setup
46+
setup.runImportStepFromProfile('profile-bika.lims:default', 'controlpanel')
47+

0 commit comments

Comments
 (0)