<?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="purchase-order-line-project-grid" title="Purchase order lines" model="com.axelor.apps.purchase.db.PurchaseOrderLine">
        <hilite if="$get('purchaseOrder.statusSelect') &lt; 3 &amp;&amp; toInvoice &amp;&amp; !invoiced" color="info"/>
        <hilite if="invoiced" color="success"/>
        <field name="project" />
        <field name="purchaseOrder" form-view="purchase-order-form" grid-view="purchase-order-grid" readonly="true"/>
        <field name="supplierPartner" form-view="partner-form" grid-view="partner-grid" readonly="true"/>
        <field name="productName" readonly="true"/>
        <field name="exTaxTotal" aggregate="sum" readonly="true"/>
        <field name="amountInvoiced"/>
        <field name="purchaseOrder.currency" />
        <field name="toInvoice"/>
        <field name="invoiced"/>
        <button name="updateToInvoiceBtn" title="Update to invoice" readonlyIf="invoiced" icon="fa-check-circle" onClick="action-purchase-order-line-method-update-to-invoice" />
        <field name="purchaseOrder.statusSelect" hidden="true"/>
    </grid>
	
	<action-method name="action-purchase-order-line-method-set-project">
		<call class="com.axelor.apps.businessproject.web.PurchaseOrderLineProjectController" method="setProject"/>
	</action-method>
	
	<action-method name="action-purchase-order-line-method-unset-project">
		<call class="com.axelor.apps.businessproject.web.PurchaseOrderLineProjectController" method="unsetProject"/>
	</action-method>
	
	<action-method name="action-purchase-order-line-method-update-to-invoice">
		<call class="com.axelor.apps.businessproject.web.PurchaseOrderLineProjectController" method="updateToInvoice"/>
	</action-method>
	
</object-views>
