Improvement to Worksheets


Including Client Ref (even both Client SID and Client Reference) under sample ID would make Worksheets really useful.

User can just open a worksheet, check what a sample is and see the results straight away without clicking automatically generated Sample ID which doesn’t tell much

Worksheet like below can save lot of time
Client -> Example Winery
Sample ID -> lab-0008-R01
Client Ref / Client SID -> Tank Number/wine ref/ sample ref / blend ID


This can be done by customization as we did in our.
I would like to see this in the senaite.core too…


Wow. I was hoping to do the same and searching for the correct .py file to edit.
can you point me in right direction.



I suppose this is the place in the core to look for:


Thanks mate. :slight_smile: Hopefully I can fix it


@xispa Hi, I understand that it is not ideal to have ClientSampleID info in the worksheet. For a laboratory that doesn’t have external clients, it is extremely helpful
Can you suggest a way to insert ClientSampleID or ClientReference in below code


Adding this after L519 might work:

client_ref = request.getClientReference()
client_sid = request.getClientSampleID()
tokens = filter(None, [client_ref, client_sid])
sample_type_title = ' / '.join(tokens)


Works perfectly :smile:


Thanks @xispa


Like to see this in the setup and very convenient for us