Skip to content

Commit

Permalink
Merge branch '2.x' into ar-add-paste-field-values
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonski authored Dec 11, 2024
2 parents 86f1970 + c4c08d4 commit 756b152
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Changelog
------------------

- #2658 Batched sample registration form with Paste capabilities
- #2654 Show Batch title or ID in Sample reference field
- #2657 Methods from analyses are not updated on instrument change in worksheet
- #2656 Fix AnalysisProfile keyword validator fail with non-ascii value
- #2646 Add SelectOtherField and SelectOtherWidget
Expand Down
2 changes: 1 addition & 1 deletion src/bika/lims/content/analysisrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@
{"name": "getClientBatchID", "label": _("CBID")},
{"name": "getClientTitle", "label": _("Client")},
],
ui_item="getId",
ui_item="Title",
)
),

Expand Down
6 changes: 6 additions & 0 deletions src/bika/lims/content/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ def _renameAfterCreation(self, check_auto_id=False):
from senaite.core.idserver import renameAfterCreation
renameAfterCreation(self)

def Title(self):
"""Returns the Title or ID
"""
title = self.getField("title").get(self)
return title or self.getId()

def getClient(self):
"""Retrieves the Client the current Batch is assigned to
"""
Expand Down

0 comments on commit 756b152

Please sign in to comment.