<?xml version="1.0"?>
<object name="Worksheet"
        meta_type="Factory-based Type Information with dynamic views"
        xmlns:i18n="http://xml.zope.org/namespaces/i18n"
        i18n:domain="senaite.core"
        purge="True">

 <property name="title" i18n:translate="">Worksheet</property>
 <property name="description"></property>
 <property name="content_icon">senaite_theme/icon/worksheet</property>
 <property name="content_meta_type">Worksheet</property>
 <property name="product">bika.lims</property>
 <property name="factory">addWorksheet</property>
 <property name="add_view_expr"></property>
 <property name="link_target"></property>
 <property name="global_allow">False</property>
 <property name="filter_content_types">False</property>
 <property name="allowed_content_types">
  <element value="DuplicateAnalysis"/>
  <element value="RejectAnalysis"/>
  <element value="Attachment"/>
 </property>
 <property name="allow_discussion">False</property>

 <property name="default_view_fallback">False</property>
 <property name="default_view">manage_results</property>
 <alias from="(Default)" to="manage_results"/>

    <action title="View"
            action_id="view"
            category="object"
            condition_expr=""
            icon_expr=""
            link_target=""
            url_expr="string:${object_url}/manage_results"
            i18n:attributes="title"
            visible="False">
     <permission value="senaite.core: View Results"/>
    </action>

    <action title="Manage Results"
            action_id="manage_results"
            category="object"
            condition_expr=""
            icon_expr=""
            link_target=""
            url_expr="string:${object_url}/manage_results"
            i18n:attributes="title"
            visible="True">
     <permission value="senaite.core: View Results"/>
    </action>

 <action title="Add Analyses"
         action_id="add_analyses"
         category="object"
         condition_expr="python:context.portal_workflow.getInfoFor(context, 'review_state') not in ['verified', 'published'] and context.checkUserManage()"
         icon_expr=""
         link_target=""
         url_expr="string:${object_url}/add_analyses"
         i18n:attributes="title"
         visible="True">
  <permission value="senaite.core: Edit Worksheet"/>
 </action>

 <action title="Add Blank Reference"
         action_id="add_blank"
         category="object"
         condition_expr="python:context.portal_workflow.getInfoFor(context, 'review_state') not in ['verified', 'published'] and context.checkUserManage()"
         icon_expr=""
         link_target=""
         url_expr="string:${object_url}/add_blank"
         i18n:attributes="title"
         visible="True">
  <permission value="senaite.core: Edit Worksheet"/>
 </action>

 <action title="Add Control Reference"
         action_id="add_control"
         category="object"
         condition_expr="python:context.portal_workflow.getInfoFor(context, 'review_state') not in ['verified', 'published'] and context.checkUserManage()"
         icon_expr=""
         link_target=""
         url_expr="string:${object_url}/add_control"
         i18n:attributes="title"
         visible="True">
  <permission value="senaite.core: Edit Worksheet"/>
 </action>

 <action title="Add Duplicate"
         action_id="add_duplicate"
         category="object"
         condition_expr="python:context.portal_workflow.getInfoFor(context, 'review_state') not in ['verified', 'published'] and context.checkUserManage()"
         icon_expr=""
         link_target=""
         url_expr="string:${object_url}/add_duplicate"
         i18n:attributes="title"
         visible="True">
  <permission value="senaite.core: Edit Worksheet"/>
 </action>

 <action title="Export"
         action_id="export"
         category="object"
         condition_expr="python:context.portal_workflow.getInfoFor(context, 'review_state') not in ['verified', 'published']"
         icon_expr=""
         link_target=""
         url_expr="string:${object_url}/export"
         i18n:attributes="title"
         visible="True">
  <permission value="senaite.core: Edit Worksheet"/>
 </action>

<action title="Sticker"
        action_id="sticker"
        category="document_actions"
        condition_expr=""
        icon_expr="string:${portal_url}/senaite_theme/icon/sticker_large"
        link_target=""
        url_expr="string:${object_url}/sticker?autoprint=1&amp;filter_by_type=worksheet"
        i18n:attributes="title"
        visible="True">
   <permission value="View"/>
</action>

<action title="Stickers preview"
        action_id="sticker_preview"
        category="document_actions"
        condition_expr=""
        icon_expr="string:${portal_url}/senaite_theme/icon/sticker_preview"
        link_target="Stickers preview"
        url_expr="string:${object_url}/sticker?filter_by_type=worksheet"
        i18n:attributes="title"
        visible="True">
    <permission value="View"/>
</action>

</object>
