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

Issue-444: Fix Sample points do not show the referenced sample types in view #453

Merged
merged 4 commits into from
Dec 12, 2017

Conversation

ramonski
Copy link
Contributor

@ramonski ramonski commented Dec 7, 2017

Description of the issue/feature this PR addresses

Linked issue: #444

Current behavior before PR

Sample point view did not display referenced sample types

Desired behavior after PR is merged

Sample point view shows referenced sample types

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

@@ -79,7 +77,7 @@
allowed_types=('SampleType',),
vocabulary='SampleTypesVocabulary',
relationship='SamplePointSampleType',
widget=brw(
widget=ReferenceWidget(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bika.lims.browser.widgets.referencewidget.ReferenceWidget (https://github.com/senaite/bika.lims/blob/master/bika/lims/browser/widgets/referencewidget.py) provides the search overlay that, for instance, is used in SampleType's edit view for the selection of multiple Sample Points, as well as in a lot of different places (e.g. Add AR). I'd expect the same behavior in both places, and honestly, I like the search overlay more than the multiselection list....

Could we tweak our ReferenceWidget to fix this issue instead of using Products.Archetypes.public.ReferenceWidget?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, actually I forgot about the edit capabilities of the referencewidget.
I'll fix bika.lims.browser.widgets.referencewidget.ReferenceWidget to handle the view case better for old-style references.

Copy link
Member

@xispa xispa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks man!

@xispa xispa merged commit 6f31143 into master Dec 12, 2017
@xispa xispa deleted the bugfix/issue-444-sp-ref-widget-not-showing-st-refs branch December 12, 2017 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants