Hi,
I want to add a new data type for samples called Turn-Around Time. I’ve followed this guide and successfully created a new column. Next, I wanted to add a field Turn-Around Time when creating the sample. To do this, I’ve added the following code into the /src/bika/lims/content/analysisrequest.py to create a new schema:
StringField(
'Turn-Around Time',
default='3',
vocabulary=TURNAROUNDTIME,
mode='rw',
read_permission=View,
write_permission=FieldEditPriority,
widget=PrioritySelectionWidget(
label=_('Turn-Around Time'),
format='select',
visible={
'add': 'edit',
},
),
),
This method works (see pictures below) but I am wondering if this is the best method to achieve this. Will this method break when Senaite is updated? Is there a way that I can create this schema in an adapter instead?
Thank you for your time.
Anthony