diff --git a/CHANGES.rst b/CHANGES.rst index d5e72764ed..f9ce15d32d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -18,6 +18,7 @@ Changelog **Fixed** +- #453 Sample points do not show the referenced sample types in view - #470 Sort order of Analyses in WS print view wrong - #457 Calculation referring to additional python module not triggered - #459 Traceback in Instruments list after adding a calibration certificate diff --git a/bika/lims/content/samplepoint.py b/bika/lims/content/samplepoint.py index f9713ea770..e00fba346d 100644 --- a/bika/lims/content/samplepoint.py +++ b/bika/lims/content/samplepoint.py @@ -10,8 +10,6 @@ from Products.Archetypes.public import BaseContent from Products.Archetypes.public import BooleanField from Products.Archetypes.public import BooleanWidget -from Products.Archetypes.public import ComputedField -from Products.Archetypes.public import ComputedWidget from Products.Archetypes.public import DisplayList from Products.Archetypes.public import FileWidget from Products.Archetypes.public import ReferenceField @@ -30,9 +28,9 @@ from bika.lims.browser.fields import DurationField from bika.lims.browser.widgets import CoordinateWidget from bika.lims.browser.widgets import DurationWidget -from bika.lims.browser.widgets.referencewidget import ReferenceWidget as brw from bika.lims.config import PROJECTNAME from bika.lims.content.bikaschema import BikaSchema +from bika.lims.browser.widgets.referencewidget import ReferenceWidget as BikaReferenceWidget schema = BikaSchema.copy() + Schema(( @@ -79,7 +77,7 @@ allowed_types=('SampleType',), vocabulary='SampleTypesVocabulary', relationship='SamplePointSampleType', - widget=brw( + widget=BikaReferenceWidget( label=_("Sample Types"), description=_("The list of sample types that can be collected " "at this sample point. If no sample types are " diff --git a/bika/lims/skins/bika/bika_widgets/referencewidget.pt b/bika/lims/skins/bika/bika_widgets/referencewidget.pt index a0b3793a50..c2347942cd 100644 --- a/bika/lims/skins/bika/bika_widgets/referencewidget.pt +++ b/bika/lims/skins/bika/bika_widgets/referencewidget.pt @@ -8,20 +8,39 @@ + tal:define="kssClassesView context/@@kss_field_decorator_view; + getKssClasses nocall:kssClassesView/getKssClassesInlineEditable;"> + + + - reference + tal:define="kss_class python:getKssClasses(fieldName, + templateId='widgets/string', macro='string-field-view'); + uid context/UID|nothing" + tal:attributes="class kss_class; + id string:parent-fieldname-$fieldName-$uid"> + reference + + + + + + +