Skip to content

Commit

Permalink
Fix missing custom transitions via adapter in Worksheet's analyses (#…
Browse files Browse the repository at this point in the history
…2640)

* Fix cannot add custom transition via adapter in Worksheet's analysis listing

* Changelog
  • Loading branch information
xispa authored Nov 6, 2024
1 parent ff5ee60 commit 3b539fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 9 additions & 8 deletions src/bika/lims/browser/worksheet/views/analyses.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 3b539fc

Please sign in to comment.