diff --git a/CHANGES.rst b/CHANGES.rst index 7796b36df5..bcc8a4abd9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,7 @@ Changelog 2.6.0 (unreleased) ------------------ +- #2640 Fix missing custom transitions via adapter in Worksheet's analyses - #2639 Fix sampletype-related indexes for AnalysisSpec type are not indexed - #2638 Fix AttributeError on upgrade step 2654 (reindex_getDueDate) - #2569 Fix samples are indicated as late when Turnaround Time is zero diff --git a/src/bika/lims/browser/worksheet/views/analyses.py b/src/bika/lims/browser/worksheet/views/analyses.py index fdc97c33ce..bc79978794 100644 --- a/src/bika/lims/browser/worksheet/views/analyses.py +++ b/src/bika/lims/browser/worksheet/views/analyses.py @@ -162,15 +162,16 @@ def enable_remarks(self): # Inject custom transition for remarks if self.show_analysis_remarks_transition(): + set_remarks = { + "id": "modal_set_analysis_remarks", + "title": _("Set remarks"), + "url": "{}/set_analysis_remarks_modal".format( + api.get_url(self.context)), + "css_class": "btn btn-outline-secondary", + "help": _("Set remarks for selected analyses") + } for state in self.review_states: - state["custom_transitions"] = [{ - "id": "modal_set_analysis_remarks", - "title": _("Set remarks"), - "url": "{}/set_analysis_remarks_modal".format( - api.get_url(self.context)), - "css_class": "btn btn-outline-secondary", - "help": _("Set remarks for selected analyses") - }] + state.setdefault("custom_transitions", []).append(set_remarks) @view.memoize def get_default_columns_order(self):