Skip to content

Creating new templates for sample stickers

Lemoene Smit edited this page Nov 26, 2019 · 4 revisions

Ingozi. Beware. Wakker wees. Bika Open Source LIMS 2020 Currently Maintained for historic purposes only

Please use the latest Bika Senaite code

Bika Open Source LIMS code is being re-engineered as Senaite for better maintainability and performance, under a more equitable brand and structure. The Bika Collective contributes generically acceptable code to the Senaite repos, and publishes lab discipline specific releases here as Bika Senaite add-ons.

Thank you for your patience. Team Bika

------8<-----------------------------------------------------------------------------------------------------

Adding custom templates for sample stickers is quite simple.

  • In your instance (zeocluster or zinstance) create a 'stickers' folder.
  • In your buildout.cfg, add the following to all [client*] or [instance] sections:
zcml-additional = 
    <configure
     xmlns="http://namespaces.zope.org/zope"
     xmlns:plone="http://namespaces.plone.org/plone">
         <plone:static
          directory="${buildout:directory}/stickers"
          type="stickers"
          name="custom-stickers"
         />
    </configure>
  • run bin/buildout

Then you can create any number of *.pt files inside the stickers/ folder. Generating correct sticker layout is just a matter of correct HTML and CSS. There are some examples in bika.lims here, and a really simple one here which prints side-by-side stickers.

Clone this wiki locally