<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<object-views xmlns="http://axelor.com/xml/ns/object-views"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://axelor.com/xml/ns/object-views http://axelor.com/xml/ns/object-views/object-views_5.2.xsd">

  <grid name="wkf-tracking-grid" title="Process tracking"
    model="com.axelor.studio.db.WkfTracking" canEdit="false" canNew="false" canSave="false">
    <field name="wkf" />
    <field name="recordModel" />
    <field name="recordId" />
  </grid>

  <form name="wkf-tracking-form" title="Process tracking"
    model="com.axelor.studio.db.WkfTracking" width="large" canEdit="false" canNew="false"
    canDelete="false" canAttach="false" canCopy="false" canSave="false">
    <toolbar>
      <button name="openWorkflowDashboardBtn" title="Workflow dashboard"
        onClick="open.wkf.dashboard" />
    </toolbar>
    <panel name="mainPanel">
      <field name="wkf" />
      <field name="recordModel" />
      <field name="recordId" />
      <panel-related name="wkfTrackingLinesPanel" field="wkfTrackingLines" colSpan="12" readonly="true" />
      <panel-related name="totalLinesPanel" field="totalLines" colSpan="12" readonly="true" />
      <panel-related name="totalTimeLinesPanel" field="totalTimeLines" colSpan="12" />
    </panel>
  </form>
  
  <action-method name="action-method-wkf-track">
  	<call class="com.axelor.studio.web.WkfController" method="track"/>
  </action-method>
  
  <action-view name="action-wkf-open-wkf-tracking" title="Track workflow" model="com.axelor.studio.db.WkfTracking">
  	<view type="grid" name="wkf-tracking-grid"/>
  	<view type="form" name="wkf-tracking-form"/>
  	<domain>self.recordModel = :recordModel and self.recordId = :recordId</domain>
  	<context name="recordModel" expr="eval:_model" if="_model != 'com.axelor.meta.db.MetaJsonRecord'"/>
  	<context name="recordModel" expr="eval:jsonModel" if="_model == 'com.axelor.meta.db.MetaJsonRecord'"/>
  	<context name="recordId" expr="eval:id"/>
  	<context name="_showSingle" expr="eval:true"/>
  </action-view>
  
</object-views>


