<?xml version="1.0" encoding="UTF-8"?>
<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="vehicle-fuel-log-grid" title="Vehicle Fuel" model="com.axelor.apps.fleet.db.VehicleFuelLog">
		<field name="vehicle.name"/>
		<field name="vehicle.plateNo"/>
		<field name="purchasePartner.fullName"/>
		<field name="liter" />
		<field name="pericePerLiter" />
		<field name="date" />
    </grid>
	
	<form name="vehicle-fuel-log-form" title="Vehicle Fuel" model="com.axelor.apps.fleet.db.VehicleFuelLog" width="large" >
		 <panel name="mainPanel">
		  	<panel name="vehicleDetailsPanel" colSpan="12">
    			<field name="vehicle" title="Vehicle" required="true"/>
      		</panel>
    		<panel name="informationPanel" title="Information">
		  		<field name="purchasePartner"/>
		  	    <field name="invoiceRef"/>
		  	    <field name="vendorPartner"/>
		  	    <field name="date"/>
		  	</panel>
		  	<panel name="refuelingDetailsPanel" title="Refueling details">
		  		<field name="liter" onChange="action-method-calculate-total-price"/>
		  	    <field name="pericePerLiter" onChange="action-method-calculate-total-price"/>
		  	    <field name="totalPrice"/>
		  	</panel>
     	 </panel>
     	 <panel name="notesPanel">
      		<field name="notes" colSpan="12"/>
    	</panel>
   </form>
   
   <action-method name="action-method-calculate-total-price">
   	<call class="com.axelor.apps.fleet.web.VehicleFuelLogController" method="calculateTotalPrice"/>
   </action-method>
   
 </object-views>