<?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="bank-order-line-bank-to-bank-grid" title="Bank Order lines"
		model="com.axelor.apps.bankpayment.db.BankOrderLine" canDelete="false"
		canNew="false" canEdit="false" orderBy="-bankOrder.bankOrderDate">
		<field name="sequence" />
		<field name="receiverCompany" />
		<field name="receiverBankDetails" />
		<field name="receiverReference" />
		<field name="receiverLabel" />
		<field name="bankOrderAmount" />
		<field name="bankOrder.partnerTypeSelect"/>
		<field name="bankOrder.bankOrderDate"/>
		<field name="bankOrder.confirmationDateTime"/>
		<field name="bankOrder.senderCompany"/>
		<field name="bankOrder.statusSelect"/>
		<field name="$pieceReferenceList" title="Piece references"/>
		<field name="$pieceDateList" title="Piece dates"/>
		<field name="$pieceDueDateList" title="Piece due dates"/>
	</grid>

	<grid name="bank-order-line-grid" title="Bank Order lines"
		model="com.axelor.apps.bankpayment.db.BankOrderLine" canDelete="false"
		canNew="false" canEdit="false" orderBy="-bankOrder.bankOrderDate">
		<field name="sequence" />
		<field name="partner" />
		<field name="receiverBankDetails" />
		<field name="receiverReference" />
		<field name="receiverLabel" />
		<field name="bankOrderAmount" />
		<field name="bankOrder.partnerTypeSelect"/>
		<field name="bankOrder.bankOrderDate"/>
		<field name="bankOrder.confirmationDateTime"/>
		<field name="bankOrder.senderCompany"/>
		<field name="bankOrder.statusSelect"/>
		<field name="$pieceReferenceList" title="Piece references"/>
		<field name="$pieceDateList" title="Piece dates"/>
		<field name="$pieceDueDateList" title="Piece due dates"/>
	</grid>

	<!-- TODO -->
	<form name="bank-order-line-form" title="Bank Order line"
		model="com.axelor.apps.bankpayment.db.BankOrderLine" width="large"
		canNew="false" canEdit="false" canDelete="false">
		<panel name="bankOrderDetailsPanel" title="Bank Order Details" showIf="bankOrder != null">
			<field name="bankOrder" readonly="true" colSpan="6" />
			<field name="bankOrder.orderTypeSelect" readonly="true"
				colSpan="6" />
			<field name="bankOrder.partnerTypeSelect" readonly="true"
				colSpan="6" />
			<field name="bankOrder.senderCompany" title="Sender Company"
				readonly="true" colSpan="6" />
			<field name="bankOrder.senderBankDetails" title="Sender Bank details"
				readonly="true" colSpan="6" />
			<field name="bankOrder.bankOrderTotalAmount" readonly="true"
				colSpan="6" />
		</panel>
		<panel name="receiverInfoPanel" title="Receiver Info.">
			<field name="sequence" />
			<field name="receiverCompany" canEdit="false"
				showIf="bankOrder.partnerTypeSelect == 4" colSpan="6" form-view="company-form"
				grid-view="company-grid" />
			<field name="partner" hideIf="bankOrder.partnerTypeSelect != 4"
				form-view="partner-form" grid-view="partner-grid" colSpan="6" />
			<field name="receiverBankDetails" colSpan="6" form-view="bank-details-form"
				grid-view="bank-details-grid" />
			<field name="bankOrderAmount" />
			<field name="receiverReference" colSpan="6" />
			<field name="receiverLabel" colSpan="6" />
			<field name="receiverCountry" colSpan="4"/>
			<field name="receiverCountry.alpha2Code" colSpan="2"/>
			<field name="receiverAddressStr" colSpan="12" max="105"/>
		</panel>
		<panel>
		 	<field name="bankOrderLineOriginList" colSpan="12" readonly="true">
      			<editor x-viewer="true">
					<field name="relatedToSelect" widget="RefSelect" x-related="relatedToSelectId" colSpan="12" showTitle="false"/>
       			</editor>
   			</field>
		</panel>
		<panel name="actionPanel" showIf="bankOrder != null" itemSpan="12"
			sidebar="true">
			<field name="bankOrder.statusSelect" title="Bank Order Status"
				readonly="true" />
			<field name="senderMove"
				showIf="senderMove &amp;&amp; (bankOrder.statusSelect == 3 || bankOrder.statusSelect == 4)"
				form-view="move-form" grid-view="move-grid" />
			<field name="receiverMove"
				showIf="senderMove &amp;&amp; (bankOrder.statusSelect == 3 || bankOrder.statusSelect == 4)"
				form-view="move-form" grid-view="move-grid" />
		</panel>
	</form>

</object-views>