<?xml version="1.0"?>
<object name="Client"
        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="">Client</property>
  <property name="description"></property>
  <property name="content_icon">senaite_theme/icon/client</property>
  <property name="content_meta_type">Client</property>
  <property name="product">bika.lims</property>
  <property name="factory">addClient</property>
  <property name="add_view_expr">string:${object/absolute_url}/base_edit</property>
  <property name="link_target"></property>
  <property name="global_allow">False</property>
  <property name="filter_content_types">True</property>
  <property name="allowed_content_types">
    <element value="ARTemplate"/>
    <element value="AnalysisProfile"/>
    <element value="AnalysisRequest"/>
    <element value="AnalysisSpec"/>
    <element value="Attachment"/>
    <element value="Batch"/>
    <element value="Contact"/>
    <element value="Sample"/>
    <element value="SamplePoint"/>
    <element value="Folder"/>
    <element value="Invoice"/>
  </property>
  <property name="allow_discussion">False</property>
  <property name="immediate_view">base_edit</property>
  <property name="default_view_fallback">False</property>

  <alias from="(Default)" to="base_view"/>
  <alias from="analysisrequests" to="base_view"/>
  <alias from="edit" to="base_edit"/>
  <alias from="view" to="base_view"/>

  <action title="Edit"
          action_id="edit"
          category="object"
          url_expr="string:${object_url}/edit"
          i18n:attributes="title"
          i18n:domain="senaite.core"
          visible="True">
    <permission value="Modify portal content"/>
  </action>

  <action title="Contacts"
          action_id="contacts"
          category="object"
          icon_expr="string:${portal_url}/images/client_contact.png"
          url_expr="string:${object_url}/contacts"
          i18n:attributes="title"
          visible="True">
    <permission value="View"/>
  </action>

  <action title="Samples"
          action_id="view"
          category="object"
          condition_expr=""
          icon_expr="string:${portal_url}/images/sample.png"
          link_target=""
          url_expr="string:${object_url}/analysisrequests"
          i18n:attributes="title"
          visible="True">
    <permission value="View"/>
  </action>

  <action title="Batches"
          action_id="batches"
          category="object"
          condition_expr=""
          icon_expr="string:${portal_url}/images/batch.png"
          link_target=""
          url_expr="string:${object_url}/batches"
          i18n:attributes="title"
          visible="True">
    <permission value="View"/>
  </action>

  <action title="Sample Points"
          action_id="samplepoints"
          category="object"
          condition_expr=""
          icon_expr="string:${portal_url}/images/samplepoint.png"
          link_target=""
          url_expr="string:${object_url}/samplepoints"
          i18n:attributes="title"
          visible="True">
    <permission value="View"/>
  </action>

  <action title="Analysis Profiles"
          action_id="profiles"
          category="object"
          condition_expr=""
          icon_expr="string:${portal_url}/images/analysisprofile.png"
          link_target=""
          url_expr="string:${object_url}/analysisprofiles"
          i18n:attributes="title"
          visible="True">
    <permission value="View"/>
  </action>

  <action title="Sample Templates"
          action_id="templates"
          category="object"
          condition_expr=""
          icon_expr="string:${portal_url}/images/artemplate.png"
          link_target=""
          url_expr="string:${object_url}/artemplates"
          i18n:attributes="title"
          visible="True">
    <permission value="View"/>
  </action>

  <action title="Analysis Specifications"
          action_id="specs"
          category="object"
          condition_expr=""
          icon_expr="string:${portal_url}/images/analysisspec.png"
          link_target=""
          url_expr="string:${object_url}/analysisspecs"
          i18n:attributes="title"
          visible="True">
    <permission value="View"/>
  </action>

  <action title="Attachments"
          action_id="attachments"
          category="object"
          condition_expr=""
          icon_expr="string:${portal_url}/images/attachment.png"
          link_target=""
          url_expr="string:${object_url}/attachments"
          i18n:attributes="title"
          visible="False">
    <permission value="View"/>
  </action>

  <action title="Analysis Reports"
          action_id="reports_listing"
          category="object"
          icon_expr=""
          url_expr="string:${object_url}/reports_listing"
          visible="True"
          i18n:domain="senaite.core"
          i18n:attributes="title">
    <permission value="senaite.core: Manage Analysis Requests"/>
  </action>

</object>
