Welcome to the SENAITE Community – where the open source LIMS professionals meet. Subscribe to the SENAITE Users List at https://www.senaite.com
-d @data.json
parameter style of POST calling with cURL.
json.loads(data)
returns a List type (List of Dictionaries) instead.
Nevertheless, you need to add a custom react component field like e.g. the
StringField
:
https://github.com/senaite/senaite.core.listing/blob/master/src/senaite/core/listing/react/components/StringField.coffee
But change the input type todate
: https://github.com/senaite/senaite.core.listing/blob/master/src/senaite/core/listing/react/components/StringField.coffee#L58
I need an editable DateField in a listing. Has anyone started on this yet? Also, I don't see the Issue tab in s.app.listing on github, where should I create an issue for this?
Reading through the s.a.listing README I don't see anything about coffeescript. If someone can tell me where the converted js output should go, I will update the README. Or does webpack do it automagically?
Hi Mike, yes, webpack
is taking care of all conversion and packing already
Wow, there are loads of react datetime pickers (https://www.npmjs.com/search?q=datetime%20picker). Any thoughts/preferences?
I would actually just go for the HTML 5 date
fields
Hello everyone, I'm a newbie using SENAITE and I would like you to please help me with a question I have. I want to export customer data, samples, etc, but I can't find any solution. I know that there is an option to generate reports, but unfortunately it is very limited. I have reviewed many topics in the forum, but none give a clear solution. I would like to know if any of you know how to do it to date? I am very interested in using this LIMS, but the reports are very important to me. Thanks a lot
@Chenderin There are multiple ways to export data depending on whether you need raw data or a PDF.
For all Reports/PDFs, you should use the Senaite.Impress addon in addition to senaite.core and senaite.lims. You can customize your own report templates based on TAL/METAL expressions (as a lot of Plone is done). I don't believe Senaite.Impress has Chameleon support, but I could be wrong :)
For raw data, it is best to use the Senaite API if you can. The code lives inside the senaite.core project, but there is an old git repo for the API specifically that has the documentation. The other primary method is to include the senaite.jsonapi addon and get a lot of relevant data in an HTTP request.
is there any fast way tutorial how to set up senaite on a raspberry
@toedtling Senaite on a Pi should be similar to running Senaite/Plone any other Linux distro, but your Pi needs to meet Plone's minimum requirements.
Ensure your Pi meets Plone's Installation Requirements, and then follow the Official Senaite Installation Instructions.
Alternatively, you could put Docker on your Pi, and simply run a Senaite container. There should be a few images available, but Ramonski's is the official one I believe (and should be labelled as such).
Your Pi might be powerful enough to host the site, but not to additionally run the browser needed to view it. If resources are limited, ensure your Pi is on a network and navigate to YOUR_PI_IP:8080 in your browser.
The lab I'm working for controls the weight of each standard before and after a QC run or analysis. They wish to be able to track the use of each standard and get a warning when they're running low. How difficult would it be to add this functionality to Reference Samples, for example?
@gonzalohd_gitlab That would depend on your familiarity with Plone Development. Senaite was built following most of Plone's conventions to allow multiple Add-Ons to work together. A custom Plone Add-On that modifies the reference samples and does all the bookkeeping/notifications you want should be incredibly feasible!
Unfortunately, Plone is a pretty steep learning curve, so if you're brand new to it I would plan on learning for a bit first. There is a pretty good Plone Training on learning to create Add-Ons for Plone. However, you'll need to keep in mind that Senaite is a combination of a few Add-Ons that are already created, so your modifications wouldn't be the same as they would for a brand new site. For that you'll need to read the GitHub Repositories themselves, browser the Senaite Community Forums, and read some of the old conversations here on Gitter ^^^
Does anyone know how to Override a View Class when the view is specifically for the default view?
We would like to override some of the browser view classes like BatchFolderContentsView, but we cannot seem to get the changes to appear unless we manually enter a @@ style url for whatever the name=
field is in our configure.zcml .
We noticed that the name for the view is "base_view" which that the Default view has an alias.
However, (for the BatchFolder example specifically) we have tried using the naming conventions: BatchFolder
, base_view
, and (Default)
with no success in changing which view is rendered by default.
This is what we have for it so far in our addon:
In our browser/configure.zcml
we added:
<!-- Override BatchFolder View Class -->
<browser:page
name="BatchFolder"
class=".batchfolder.CustomBatchFolderContentsView"
permission="cmf.ListFolderContents"
for="bika.lims.interfaces.IBatchFolder"
layer="nal.lims.interfaces.INalLimsLayer"
/>
And then in our browser/batchfolder.py
we added:
from bika.lims.browser.batchfolder import BatchFolderContentsView
#Some other imports
class CustomBatchFolderContentsView(BatchFolderContentsView):
#Our customized BatchFolder view class
If we navigate to localhost:8080/oursenaitesite/.../@@BatchFolder
we successfully see our custom view. We would like this to be the Default
However, with the name field set to name='base_edit'
which is the name senaite aliases the (Default) view as, we don't get our custom view and ONLY get the Senaite default.
@mikejmets Thank you for that information! We have tried overriding the other package, but now cannot even get a new view.
Thus far we have added an overrides.zcml
file to our root that includes the browser directory:
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
i18n_domain="nal.lims">
<include package=".browser" />
</configure>
We then included this file in our main configure.zcml
file with:
<include file="overrides.zcml" />
We then added a browser/overrides.zcml
with the new browser:page registration according to the documentation linked about.
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
i18n_domain="nal.lims">
<!-- Override BatchFolder View Class -->
<configure package="bika.lims.browser.batchfolder">
<browser:page
for="bika.lims.interfaces.IBatchFolder"
class="nal.lims.browser.batchfolder.CustomBatchFolderContentsView"
name="base_edit"
layer="nal.lims.interfaces.INalLimsLayer"
permission="cmf.ListFolderContents"
/>
</configure>
</configure>