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

Remove "Bika" naming from Setup #814

Merged
merged 8 commits into from
May 18, 2018
Merged

Remove "Bika" naming from Setup #814

merged 8 commits into from
May 18, 2018

Conversation

juangallostra
Copy link
Contributor

Description of the issue/feature this PR addresses

Linked issue: #795

Current behavior before PR

When navigating to the control panel users find that the LIMS Configuration section is called "Bika LIMS Configuration". Also, the link to the setup page is called "Bika Setup". This is confusing for new users.

Desired behavior after PR is merged

The fields specified in the previous section are renamed to "LIMS Configuration" and "Setup". "Bika" naming is removed from Setup.

Screenshot (optional)

seleccio_004

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

@juangallostra juangallostra added PR: Not Ready ⛔️ Cleanup 🧹 Code cleanup and refactoring labels May 4, 2018
@juangallostra juangallostra self-assigned this May 4, 2018
@juangallostra
Copy link
Contributor Author

@xispa, @ramonski The rename_bika_setup() function in the upgrade step added in this PR does actually change the name from "Bika Setup" to "Setup" as shown by the following pdb session:

[9] > /home/juan/dev/juangallostra/zinstance/src/senaite.core/bika/lims/upgrade/v01_02_006.py(33)upgrade()
-> logger.info("{0} upgraded to version {1}".format(product, version))
(Pdb++) l
 28  	    logger.info("Upgrading {0}: {1} -> {2}".format(product, ver_from, version))
 29  	
 30  	    # -------- ADD YOUR STUFF HERE --------
 31  	    rename_bika_setup()
 32  	    import pdb; pdb.set_trace()
 33  ->	    logger.info("{0} upgraded to version {1}".format(product, version))
 34  	    return True
 35  	
 36  	
 37  	def rename_bika_setup():
 38  	    logger.info("Renaming Bika Setup...")
(Pdb++) b_s = api.get_bika_setup()
(Pdb++) b_s.title
u'Setup'

However, the title shown in the control panel does not get updated (even after clearing the cache memory). I haven't been able to identify what is the reason for that. I think the code responsible for rendering the titles of the items is https://github.com/senaite/senaite.lims/blob/2bef4fb9eaf7d77037363a32901bb35563695ed2/src/senaite/lims/browser/bootstrap/templates/plone.app.controlpanel.overview.pt#L99 but I don't know how to force it to update the title.

@Lunga001
Copy link
Contributor

@juangallostra not sure if this will work but can you try something like
setup = api.portal.get_tool('portal_setup')
setup.runImportStepFromProfile('profile-bika.lims:default', 'controlpanel')
on the upgrade script

@juangallostra
Copy link
Contributor Author

@Lunga001 Thanks for the idea! I will test if it works and report back

@juangallostra
Copy link
Contributor Author

@Lunga001 yep, it worked! 👍

@xispa xispa merged commit cbef1af into senaite:master May 18, 2018
@juangallostra juangallostra deleted the remove-bika-naming-from-setup branch June 12, 2018 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup 🧹 Code cleanup and refactoring
Development

Successfully merging this pull request may close these issues.

3 participants