<?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
  https://axelor.com/xml/ns/object-views/object-views_6.0.xsd">

  <grid name="absence-aut-grid" title="Absence" model="com.axelor.apps.hr.db.Authorization">
        <field name="employee" title="Employee"/>
        <field name="typeAbsenceAut" title="Authorization Type" showIf="typeSelect = 2"/>
        <field name="absAutDate" readonly="true"/>
        <field name="heureAutorisationAbsence" readonly="true"/>
	</grid>

  <form name="absence-aut-form" title="Form" model="com.axelor.apps.hr.db.Autorisation" onSave="save,action-method-hr-autorisation,save">
      <panel name="autorisation" showIf="self.typeSelect = 2" hideIf="self.typeSelect = 1" title="Authorization Form">
        <field name="employee" title="Employee"/>
        <field name="typeAbsenceAut" title="Authorization Type"/>
        <field name="absAutDate" title="Date"/>
        <field name="heureAutorisationAbsence" readonly="true"/>
      </panel>
      <panel name="commentaire" title="Commentaire">
        <field name="commentaire" showTitle="false" colSpan="12" widget="HTML"/>
    </panel>
 	</form>

  <action-view name="action-autorisation" model="com.axelor.apps.hr.db.Authorization" title="Authorization">
    <view name="absence-aut-grid" type="grid"/>
    <view name="absence-aut-form" type="form"/>
  </action-view>

  <action-method name="action-method-hr-autorisation">
    <call class="com.axelor.apps.hr.controller.AutorisationController" method="autHours"/>
  </action-method>
</object-views>