<?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-quotation-grid" title="Sale quotations" model="com.axelor.apps.purchase.db.PurchaseOrder" orderBy="-orderDate,-purchaseOrderSeq">
    <menubar>
      <menu name="purchaseOrderReportsMenu" title="Reports" icon="fa-files-o" showTitle="true">
        <item name="printItem" title="Print" action="action-purchase-order-method-show-purchase-order"/>
      </menu>
      <menu name="purchaseOrderToolsMenu" title="Tools" icon="fa-wrench" showTitle="true">
				<item name="mergeQuotationsItem" title="Merge quotations"  action="purchase.order.merge"/>
				<item name="seeQuotationLinesItem" title="See quotation lines" action="purchase-order-see-quotation-lines" />
      </menu>
    </menubar>
		<field name="purchaseOrderSeq" width="120"/>
		<field name="company" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
		<field name="stockLocation" if="__config__.app.isApp('supplychain')"/>
    <field name="supplierPartner" form-view="partner-form" grid-view="partner-grid"/>
    <field name="externalReference"/>
    <field name="orderDate"/>
    <field name="buyerUser" form-view="user-form" grid-view="user-grid"/>
    <field name="inTaxTotal" aggregate="sum"/>
    <field name="statusSelect"/>
    <button name="printBtn" title="Print" icon="fa-print" onClick="action-purchase-order-method-show-purchase-order"/>
		<button name="sendByEmailBtn" title="Send Email" icon="fa-envelope" onClick="action-send-by-email-with-template"/>
  </grid>

    <grid name="purchase-order-grid" title="Purchase orders" model="com.axelor.apps.purchase.db.PurchaseOrder" orderBy="-orderDate,-purchaseOrderSeq">
        <menubar>
            <menu name="purchaseOrderReportsMenu" title="Reports" icon="fa-files-o" showTitle="true">
                <item name="printItem" title="Print" action="action-purchase-order-method-show-purchase-order"/>
            </menu>
            <menu name="purchaseOrderToolsMenu" title="Tools" icon="fa-wrench" showTitle="true">
                <item name="seePurchaseOrderLinesItem" title="See purchase order lines" action="purchase-order-see-purchase-order-lines" />
                <item title="See budget distribution lines" action="action-purchase-order-see-budget-distribution-lines"/>
            </menu>
		</menubar>
		<field name="purchaseOrderSeq" width="120"/>
		<field name="company" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
		<field name="stockLocation" if="__config__.app.isApp('supplychain')"/>
    <field name="supplierPartner" form-view="partner-form" grid-view="partner-grid"/>
    <field name="externalReference"/>
    <field name="orderDate"/>
    <field name="buyerUser" form-view="user-form" grid-view="user-grid"/>
    <field name="inTaxTotal" aggregate="sum"/>
    <field name="statusSelect"/>
    <button name="printBtn" title="Print" icon="fa-print" onClick="action-purchase-order-method-show-purchase-order"/>
		<button name="sendByEmailBtn" title="Send Email" icon="fa-envelope" onClick="action-send-by-email-with-template"/>
  </grid>

    <grid orderBy="-orderDate,-purchaseOrderSeq" edit-icon="true" name="my-purchase-order-grid" title="Supplier RFQs/POs" model="com.axelor.apps.purchase.db.PurchaseOrder">
		  <field name="purchaseOrderSeq" width="120"/>
		  <field name="supplierPartner" form-view="partner-form" grid-view="partner-grid"/>
		  <field name="externalReference"/>
		  <field name="orderDate"/>
		  <field name="inTaxTotal" aggregate="sum"/>
		  <field name="statusSelect"/>
		  <button name="printBtn" title="Print" icon="fa-print" onClick="action-purchase-order-method-show-purchase-order"/>
		  <button name="sendByEmailBtn" title="Send Email" icon="fa-envelope" onClick="action-send-by-email-with-template"/>
	</grid>

	<form name="purchase-order-merge-form" model="com.axelor.apps.base.db.Wizard" title="Merge purchase orders" width="large">
		<panel-related name="purchaseOrderToMergePanel" field="$purchaseOrderToMerge" form-view="purchase-order-form" title="Purchase orders to merge" colSpan="12" type="many-to-many" target="com.axelor.apps.purchase.db.PurchaseOrder" domain="self.statusSelect = 1" canNew="false" canEdit="false" grid-view="purchase-order-grid"/>
		<panel name="actionsPanel" sidebar="true" title="Actions">
			<button name="generateMergedPurchaseOrderBtn" title="Merge into single purchase order" onClick="action-validate-purchase-order-check-selection,action-group-purchase-order-merge-action"/>
	  	</panel>
    </form>

	<form name="purchase-order-merge-confirm-form" model="com.axelor.apps.base.db.Wizard" title="Confirmation" onNew="action-record-load-dummy-field-confirm-merge-purchaseorder">
		<panel name="mainPanel" colSpan="6" colOffset="3">
			<field name="$priceList" title="Price List" type="many-to-one" target="com.axelor.apps.base.db.PriceList" domain="self.typeSelect = 2 and self.isActive = true" colSpan="6" colOffset="3" width="200px" showIf="priceListToCheck" canSelect="true" form-view="price-list-form" grid-view="price-list-grid"/>
			<field name="$stockLocation"  canEdit="false" title="Stock location" showIf="locationToCheck" if-module="axelor-supplychain" colSpan="6" colOffset="3" width="200px" type="many-to-one" canSelect="true" target="com.axelor.apps.stock.db.StockLocation" domain="self.company = company and self.typeSelect = 1" form-view="stock-location-form" grid-view="stock-location-grid" if="__config__.app.isApp('supplychain')" />
			<field name="$contactPartner" title="Contact partner" type="many-to-one" target="com.axelor.apps.base.db.Partner" domain="self.isContact IS TRUE AND EXISTS (SELECT 1 FROM Partner part WHERE part.id = :partnerId AND self.id IN (SELECT id FROM part.contactPartnerSet))" colSpan="6" colOffset="3" width="200px" widget="SuggestBox" showIf="contactPartnerToCheck" form-view="partner-contact-form" grid-view="partner-contact-grid"/>
			<button name="confirmBtn" title="Confirm" onClick="action-group-purchase-order-merge-action" colSpan="12" width="200px"/>
		</panel>
    </form>

	<form name="purchase-order-form" title="Supplier RFQ/PO" model="com.axelor.apps.purchase.db.PurchaseOrder" onLoad="action-group-purchase-order-on-load-actions"
	  onNew="action-group-purchase-order-on-new-actions" >
		<menubar>
            <menu name="purchaseOrderReportsMenu" title="Reports" icon="fa-files-o" showTitle="true">
			  <item name="printItem" title="Print" action="save,action-purchase-order-method-show-purchase-order" hideIf="supplierPartner == null"/>
			</menu>
			<menu name="purchaseOrderToolsMenu" title="Tools" icon="fa-wrench" showTitle="true">
			  <item name="sendEmailItem"  title="Send email" action="save,action-send-by-email-with-template" hideIf="supplierPartner == null"/>
			  <item name="cancelReceiptItem" title="Cancel receipt" showIf="statusSelect &gt;= 3" action="save,action-purchase-order-method-cancel-receipt" hideIf="supplierPartner == null"/>
			</menu>
		</menubar>
		<panel name="overviewPanel">
			<field name="statusSelect" showTitle="false" widget="NavSelect" colSpan="12" readonly="true"/>
      <panel name="mainPanel" readonlyIf="statusSelect == 4" colSpan="12">
        <field name="purchaseOrderSeq" showTitle="false" colSpan="10">
	        <viewer depends="statusSelect,purchaseOrderSeq"><![CDATA[
	          <h3>
	           <span ng-show="[1,2,5].includes(record.statusSelect) &amp;&amp; record.purchaseOrderSeq" x-translate>Quotation</span>
	           <span ng-show="[3,4].includes(record.statusSelect)" x-translate>Purchase order</span>
	           {{record.purchaseOrderSeq}}
	          </h3>
	       ]]></viewer>
	      </field>
        <field name="receiptState" showTitle="false" showIf="statusSelect == 3 || statusSelect == 4" css="label-bold bold" colSpan="2">
	        <viewer><![CDATA[
	          <span class="label label-important" ng-show="record.receiptState == 1" x-translate>Not received</span>
	          <span class="label label-warning" ng-show="record.receiptState == 2" x-translate>Partially received</span>
	          <span class="label label-success" ng-show="record.receiptState == 3" x-translate>Received</span>
	        ]]></viewer>
	      </field>
        <field name="company" canEdit="false" colSpan="3" widget="SuggestBox" onChange="action-group-purchase-order-company-change-actions" form-view="company-form" grid-view="company-grid" readonlyIf="statusSelect >= 3 || supplierPartner != null" />
        <field name="supplierPartner" canEdit="false" hideIf="company == null" colSpan="3" onChange="action-group-purchase-order-partner-onchange" readonlyIf="purchaseOrderLineList.length > 0 || statusSelect >= 3" onSelect="action-set-supplier-partner-domain" form-view="partner-form" grid-view="partner-grid"/>
			  <field name="currency" canEdit="false" colSpan="3" form-view="currency-form" grid-view="currency-grid" readonlyIf="statusSelect >= 3"/>
	      <field name="priceList" onSelect="action-purchase-order-method-price-list-domain" colSpan="3" readonlyIf="statusSelect >= 3" form-view="price-list-form" grid-view="price-list-grid" hideIf="company == null" />
  			<field name="contactPartner" onChange="action-record-po-contact-partner-change" onSelect="action-attrs-po-domain-on-contact-partner" domain="self.isContact = true" form-view="partner-contact-form" grid-view="partner-contact-grid" hideIf="company == null" />
        <field name="versionNumber" if="__config__.app.getApp('purchase').getManagePurchaseOrderVersion()" colSpan="3"/>
				<panel name="inAtiAndIntercoPanel" colSpan="3">
          <field name="inAti" onChange="action-purchase-order-attrs-in-ati" readonlyIf="purchaseOrderLineList.length > 0 || statusSelect >= 3"/>
          <field name="interco" hidden="true" if-module="axelor-supplychain" if="__config__.app.isApp('supplychain')"/>
          <field name="createdByInterco" showIf="createdByInterco" readonly="true" if-module="axelor-supplychain" if="__config__.app.isApp('supplychain')"/>
        </panel>
        <field name="supplierPartner.purchaseOrderInformation" css="bold red" colSpan="12" showTitle="false" hideIf="supplierPartner == null || supplierPartner.purchaseOrderInformation == null"/>
      	</panel>
		</panel>
		<panel-tabs name="mainPanelTab" hideIf="supplierPartner == null">
			<panel name="contentPanel" title="Content" colSpan="12">
				<panel-related name="purchaseOrderLineListPanel" field="purchaseOrderLineList" canNew="statusSelect &lt; 3" canRemove="statusSelect &lt; 3" grid-view="purchase-order-line-purchase-order-grid" title="PO lines detail" colSpan="12" onChange="action-purchase-order-method-compute" form-view="purchase-order-line-form" canMove="true" orderBy="sequence" height="30"/>
				<field name="notes" colSpan="12" x-lite="true" widget="html"/>
			</panel>
			<panel name="taxPanel" title="Tax" colSpan="12">
				<panel-related name="purchaseOrderLineTaxListPanel" field="purchaseOrderLineTaxList" readonly="true" title="Tax Lines" colSpan="12" grid-view="purchase-order-line-tax-grid" form-view="purchase-order-line-tax-form"/>
			</panel>
			<panel name="deliveryPanel" title="Delivery" colSpan="12">
				<field name="deliveryDate" colSpan="3" onChange="action-purchase-order-method-update-purchase-order-lines-estimated-deliv-date"/>
		        <field name="stockLocation"  canEdit="false" domain="self.company = :company and self.typeSelect in (1,2) and self.usableOnPurchaseOrder = true" if-module="axelor-supplychain" colSpan="3" form-view="stock-location-form" grid-view="stock-location-grid" if="__config__.app.isApp('supplychain')" />
		        <field name="stockLocation.address" if-module="axelor-supplychain" form-view="address-form" grid-view="address-grid" if="__config__.app.isApp('supplychain')" />
	  		    <field name="shipmentMode" if-module="axelor-stock" form-view="shipment-mode-form" grid-view="shipment-mode-grid" onChange="action-purchase-order-record-empty-freight-carrier-mode" if="__config__.app.isApp('stock')" />
				<field name="freightCarrierMode" domain="self.shipmentMode = :shipmentMode" if-module="axelor-stock" form-view="freight-carrier-mode-form" grid-view="freight-carrier-mode-grid" if="__config__.app.isApp('stock')" />
				<panel-dashlet name="POStockMovesPanel" colSpan="12" action="action-purchase-order-view-stock-moves" height="178" showIf="statusSelect >= 3"/>
		    </panel>
		    <panel name="projectPanel" if="__config__.app.isApp('business-project') &amp;&amp; __config__.app.getApp('business-project').getGenerateProjectOrder()" title="Business project" colSpan="12" if-module="axelor-business-project">
				<field name="project" domain="self.isBusinessProject = true" form-view="project-form" grid-view="project-grid" colSpan="6"/>
				<button name="updateLinesBtn" title="Update lines with selected project" onClick="save,action-business-project-purchase-order-method-update-lines,save" colSpan="6" readonlyIf="!project"/>
			</panel>
			<panel name="POManagementPanel" title="PO Management" if-module="axelor-supplier-management" colSpan="12" if="__config__.app.getApp('purchase').getSupplierRequestMgt()" >
				<panel-include view="purchase-order-supplier-form" from="axelor-supplier-management" />
			</panel>
			<panel name="timetablePanel" title="Timetable" if-module="axelor-supplychain" if="__config__.app.isApp('supplychain')">
				<field name="expectedRealisationDate" colSpan="12" width="50%"/>
				<label name="orLabel" title="OR"/>
				<field name="amountToBeSpreadOverTheTimetable" colSpan="12"/>
				<panel-related name="timetableListPanel" field="timetableList" colSpan="12" grid-view="timetable-grid-purchase" form-view="timetable-form-purchase" onChange="action-purchase-order-method-update-amount-to-be-spread-over-the-timetable" if-module="axelor-supplychain"/>
			</panel>
			<panel name="budgetDistributionPanel" title="Budget distribution" if="__config__.app.isApp('budget')" if-module="axelor-supplychain" showIf="statusSelect &lt;= 4">
				<field name="budget" showIf="statusSelect &lt;= 2"/>
				<button name="applyToAllBtn" title="Apply to all" onClick="save,action-purchase-order-budget-distribution-apply-to-all,save" readonlyIf="!budget" showIf="statusSelect &lt;= 2"/>
			    <panel-dashlet name="budgetDistributionPanel" action="action-supplychain-budget-distribuion-view-budget-distribution" colSpan="12" showIf="statusSelect &gt;= 3 &amp;&amp; statusSelect &lt;= 4" readonly="true"/>
			</panel>
			<panel name="printingPanel" title="Printing">
				<field name="printingSettings" onSelect="action-purchase-order-method-filter-printing-settings" canEdit="false"/>
				<field name="displayPriceOnQuotationRequest" colSpan="12"/>
				<field name="priceRequest" hideIf="displayPriceOnQuotationRequest" colSpan="12" x-height="5"/>
			</panel>
			<panel name="invoicingPanel" title="Invoicing" hideIf="statusSelect &lt; 3">
				<field if="__config__.app.isApp('invoice')" if-module="axelor-account" name="invoice" form-view="invoice-form" grid-view="invoice-grid"/>
				<panel-dashlet name="POInvoicesPanel" action="action-view-show-invoices-from-purchase-order" title="Invoices" if-module="axelor-supplychain"  if="__config__.app.isApp('supplychain')" showIf="statusSelect &gt;= 3" colSpan="12"/>
			</panel>

		</panel-tabs>

	  	<panel name="attrsPanel">
			<field name="attrs" colSpan="12" />
		</panel>

		<panel sidebar="true" name="actionsPanel" hideIf="statusSelect == 4 || supplierPartner == null">
			<button name="draftBtn" title="Draft" showIf="statusSelect == 5"   onClick="action-purchase-order-record-draft,save"/>
			<button name="requestedBtn" title="Requested" showIf="statusSelect == 1"   onClick="save,action-purchase-order-method-requested"/>
			<button name="newVersionBtn" title="New version" showIf="statusSelect == 2" onClick="save,action-purchase-record-newVersion,save" if="__config__.app.getApp('purchase').getManagePurchaseOrderVersion()"/>
			<button name="validateBtn" title="Validate" showIf="statusSelect == 2"   onClick="action-group-purchase-order-on-validate-actions"/>
			<button name="generateSupplierStockMoveBtn" title="Generate supplier arrival" showIf="statusSelect == 3 || statusSelect == 4" if="__config__.app.isApp('supplychain') &amp;&amp; __config__.app.getApp('supplychain').getSupplStockMoveMgtOnPO() &amp;&amp; !__config__.app.getApp('supplychain').getSupplierStockMoveGenerationAuto()" onClick="save,action-purchase-order-create-stock-move" if-module="axelor-supplychain" />
			<button name="generateInvoiceBtn" title="Generate control invoice" showIf="statusSelect == 3" onClick="save,action-purchase-order-method-generate-control-invoice" if="__config__.app.isApp('supplychain') &amp;&amp; __config__.app.getApp('supplychain').generateInvoiceFromPurchaseOrder" if-module="axelor-supplychain"/>
			<button name="showInvoiceBtn" title="Show invoice" showIf="statusSelect == 3 || statusSelect == 4"   onClick="action-purchase-order-show-invoice" if-module="axelor-supplychain" if="__config__.app.isApp('supplychain')" />
            <button name="finishManuallyPurchaseOrderBtn" title="Finish the order" prompt="Warning, a completed order can't be changed anymore, do you want to continue?" showIf="statusSelect == 3" if="(__config__.app.isApp('supplychain') &amp;&amp; __config__.app.getApp('supplychain')?.allowFinishManuallyPurchaseOrder) || (!__config__.app.isApp('supplychain'))" onClick="save,action-purchase-order-method-finish-purchase-order" if-module="axelor-supplychain" />
			<button name="cancelBtn" title="Cancel" css="btn-danger" icon="fa-times" showIf="statusSelect &lt;= 3  || invoice.statusSelect &lt;= 2"   onClick="save,action-group-purchase-order-cancel"/>
		</panel>
  
		<panel name="intaxTotalPanel" sidebar="true"  hideIf="supplierPartner == null">
      <separator />
			<field name="inTaxTotal" css="order-subtotal" showTitle="false" colSpan="12">
                <viewer depends="exTaxTotal,currency.symbol,taxTotal,amountInvoiced">
                    <![CDATA[
                    <dl class="dl-horizontal">
                        <dt x-translate>Total W.T.</dt>
                        <dd>{{record.exTaxTotal}}  {{record.currency.symbol}}</dd>
                        <dt x-translate>Total tax</dt>
                        <dd>{{record.taxTotal}}  {{record.currency.symbol}}</dd>
                        <dt class="order-subtotal-total" x-translate>Total A.T.I.</dt>
                        <dd class="order-subtotal-total">{{record.inTaxTotal}}  {{record.currency.symbol}}</dd>
                        <dt x-translate>Amount invoiced W.T.</dt>
                        <dd>{{record.amountInvoiced}}  {{record.currency.symbol}}</dd>
                    </dl>
                    ]]>
                </viewer>
            </field>
	   </panel>
  <panel name="purchasesFollowUpPanel" title="Purchases follow-up" hideIf="supplierPartner == null" sidebar="true" itemSpan="6" canCollapse="true" collapseIf="true">
    <field name="buyerUser" canNew="false" canEdit="false" canView="false" form-view="user-form" grid-view="user-grid"/>
    <field if="__config__.app.getApp('base').getTeamManagement()" name="team" canEdit="false" form-view="team-form" grid-view="team-grid"/>
    <field name="tradingName" canEdit="false" grid-view="trading-name-grid" form-view="trading-name-form" if="__config__.app.getApp('base').enableTradingNamesManagement" readonlyIf="statusSelect >= 3" domain=":company MEMBER OF self.companySet" onChange="action-purchase-order-method-printing-settings-default-value"/>
  </panel>
		<panel name="datesPanel" title="Dates" sidebar="true" hideIf="supplierPartner == null" readonlyIf="statusSelect == 4" itemSpan="6" canCollapse="true" collapseIf="true">
      <field name="orderDate"/>
      <spacer name="orderDateSpacer" />
      <field name="validationDate"/>
      <field name="validatedByUser" canNew="false" canEdit="false" canView="false" form-view="user-form" grid-view="user-grid"/>
		</panel>
		<panel name="referencesPanel" title="References" hideIf="supplierPartner == null" sidebar="true" itemSpan="6" canCollapse="true" collapseIf="true">
      <field name="externalReference" hideIf="company == null" onChange="action-purchase-order-attrs-external-reference"/>
      <field name="internalReference"/>
      <field name="duplicateReferenceLabel" showTitle="false" readonly="true" hidden="true">
        <viewer>
          <![CDATA[
            <h5>
              <span ng-show="true" class='label label-warning' x-translate>Reference already existing</span>
            </h5>
          ]]>
				</viewer>
      </field>
		</panel>
	   <panel name="characteristicsPanel" title="Characteristics" sidebar="true" hideIf="supplierPartner == null" canCollapse="true" collapseIf="true">
			<field name="paymentMode" canEdit="false" domain="self.inOutSelect = 2"  onChange="action-purchase-order-method-fill-company-bank-details" if-module="axelor-account" form-view="payment-mode-form" grid-view="payment-mode-grid" if="__config__.app.isApp('supplychain')" colSpan="6"/> 
			<field name="paymentCondition" canEdit="false" if-module="axelor-account" form-view="payment-condition-form" grid-view="payment-condition-grid" if="__config__.app.isApp('supplychain')" colSpan="6"/>
      <field name="companyBankDetails" widget="SuggestBox" onSelect="action-invoice-attrs-domain-company-bank-details" form-view="bank-details-form" grid-view="bank-details-grid" if="__config__.app.getApp('base').getManageMultiBanks()" if-module="axelor-cash-management"/>
	   </panel>
	   <panel name="internalNotePanel" title="Internal note" sidebar="true">
				<field name="internalNote" colSpan="12" x-lite="true" widget="html" showTitle="false"/>
  		</panel>
	  <panel-mail name="mailPanel">
		  <mail-messages limit="4" />
		  <mail-followers />
	  </panel-mail>

	</form>

	<cards name="purchase-quotations-order-cards" title="Supplier RFQ/PO" model="com.axelor.apps.purchase.db.PurchaseOrder" width="300px" css="rect-image" orderBy="-orderDate">
		<field name="purchaseOrderSeq"/>
		<field name="externalReference"/>
		<field name="supplierPartner.fullName"/>
		<field name="orderDate"/>
		<field name="exTaxTotal"/>
		<field name="inTaxTotal"/>
		<field name="currency.symbol"/>
		<field name="statusSelect"/>
		<field name="receiptState"/>
		<field name="amountInvoiced" />
		<field name="company"/>
		<field name="stockLocation" if="__config__.app.isApp('supplychain')"/>
		<template><![CDATA[
		    <div class="span12">
		    	<strong><span x-translate>Supplier RFQ/PO</span> {{ purchaseOrderSeq }}</strong> <span ng-show="record.externalReference">( {{ externalReference }} )</span>
		    	<a class="pull-right muted">{{ $fmt('orderDate') }}</a>
	    	</div>
			<div>
			  <div>
				  <div class="span8">
				    <i class="fa fa-users" aria-hidden="true"></i>
				  	{{ supplierPartner.fullName }}
				  </div>
					<div class="span4 pull-right">
						<i class="fa fa-long-arrow-right" aria-hidden="true"></i>
						<span ng-show="record.statusSelect == 1" x-translate>Draft</span>
						<span ng-show="record.statusSelect == 2" x-translate>Requested</span>
						<span ng-show="record.statusSelect == 3" x-translate>Validated</span>
						<span ng-show="record.statusSelect == 4" x-translate>Finished</span>
						<span ng-show="record.statusSelect == 5" x-translate>Canceled</span>
					</div>
			  </div>
			  <div>
				  <div class="span6">
					  	<h5>
							<span class="label label-important"  ng-show="record.amountInvoiced == 0"  x-translate>Not invoiced</span>
							<span class="label label-warning" ng-show="record.amountInvoiced > 0 && $number(record.amountInvoiced) < $number(record.exTaxTotal)" x-translate>Partially invoiced</span>
							<span class="label label-success" ng-show="record.amountInvoiced > 0 && record.amountInvoiced == record.exTaxTotal" x-translate>Invoiced</span>
						</h5>
						<h5>
							<span class="label label-important" ng-show="record.receiptState > 0 && record.receiptState == 1" x-translate>Not received</span>
							<span class="label label-warning" ng-show="record.receiptState > 0 && record.receiptState == 2" x-translate>Partially received</span>
							<span class="label label-success" ng-show="record.receiptState > 0 && record.receiptState == 3" x-translate>Received</span>
						</h5>
				  </div>
				  <div class="span6">
				    <span><strong><span x-translate>WT</span> : {{ $fmt('exTaxTotal') }} {{ currency.symbol }}</strong><br/>
				    <strong><span x-translate>ATI</span> : {{ $fmt('inTaxTotal') }} {{ currency.symbol }}</strong></span>
				  </div>
			  </div>
			</div>
			<div class="span12" style="margin-left:0px;">
			  <span class="label label-default" style="background-color: #2185D0;" x-translate>{{ company.name }}</span>
			  <span class="label label-default pull-right muted" style="background-color: #2185D0; padding: 5px;" x-translate>{{ stockLocation.name }}</span>
			</div>
		]]>
		</template>
	</cards>

	<cards name="purchase-order-cards" title="Supplier RFQ/PO" model="com.axelor.apps.purchase.db.PurchaseOrder" width="300px" css="rect-image" orderBy="-orderDate">
		<toolbar>
    			<button name="seePurchaseOrderLinesBtn" title="See purchase orders lines" onClick="purchase-order-see-purchase-order-lines"/>
    			<button name="seeBudgetDistributionLinesBtn" title="See budget distribution lines" onClick="action-purchase-order-see-budget-distribution-lines"/>
		</toolbar>
		<field name="purchaseOrderSeq"/>
		<field name="externalReference"/>
		<field name="supplierPartner.fullName"/>
		<field name="orderDate"/>
		<field name="exTaxTotal"/>
		<field name="inTaxTotal"/>
		<field name="currency.symbol"/>
		<field name="statusSelect"/>
		<field name="receiptState"/>
		<field name="amountInvoiced" />
		<field name="company"/>
		<field name="stockLocation" if="__config__.app.isApp('supplychain')"/>
		<template><![CDATA[
		    <div class="span12">
		    	<strong><span x-translate>Supplier RFQ/PO</span> {{ purchaseOrderSeq }}</strong> <span ng-show="record.externalReference">( {{ externalReference }} )</span>
		    	<a class="pull-right muted">{{ $fmt('orderDate') }}</a>
	    	</div>
			<div>
			  <div>
				  <div class="span8">
				    <i class="fa fa-users" aria-hidden="true"></i>
				  	{{ supplierPartner.fullName }}
				  </div>
					<div class="span4 pull-right">
						<i class="fa fa-long-arrow-right" aria-hidden="true"></i>
						<span ng-show="record.statusSelect == 1" x-translate>Draft</span>
						<span ng-show="record.statusSelect == 2" x-translate>Requested</span>
						<span ng-show="record.statusSelect == 3" x-translate>Validated</span>
						<span ng-show="record.statusSelect == 4" x-translate>Finished</span>
						<span ng-show="record.statusSelect == 5" x-translate>Canceled</span>
					</div>
			  </div>
			  <div>
				  <div class="span6">
				  	<h5>
						<span class="label label-important"  ng-show="record.amountInvoiced == 0"  x-translate>Not invoiced</span>
					<span class="label label-warning" ng-show="record.amountInvoiced > 0 && $number(record.amountInvoiced) < $number(record.exTaxTotal)" x-translate>Partially invoiced</span>
						<span class="label label-success" ng-show="record.amountInvoiced > 0 && record.amountInvoiced == record.exTaxTotal" x-translate>Invoiced</span>
					</h5>
					<h5>
						<span class="label label-important" ng-show="record.receiptState > 0 && record.receiptState == 1" x-translate>Not received</span>
						<span class="label label-warning" ng-show="record.receiptState > 0 && record.receiptState == 2" x-translate>Partially received</span>
						<span class="label label-success" ng-show="record.receiptState > 0 && record.receiptState == 3" x-translate>Received</span>
					</h5>
				  </div>
				  <div class="span6">
				    <span><strong><span x-translate>WT</span> : {{ $fmt('exTaxTotal') }} {{ currency.symbol }}</strong><br/>
				    <strong><span x-translate>ATI</span> : {{ $fmt('inTaxTotal') }} {{ currency.symbol }}</strong></span>
				  </div>
			  </div>
			</div>
			<div class="span12" style="margin-left:0px;">
			  <span class="label label-default" style="background-color: #2185D0;" x-translate>{{ company.name }}</span>
			  <span class="label label-default pull-right muted" style="background-color: #2185D0; padding: 5px;" x-translate>{{ stockLocation.name }}</span>
			</div>
		]]>
		</template>
	</cards>

    <action-group name="action-group-purchase-order-on-new-actions">
    	<action name="action-purchase-order-record-new"/>
    	<action name="action-purchase-order-record-company-configuration"/>
    	<action name="action-purchase-order-method-get-stock-location"/>
    	<action name="action-purchase-order-attrs-stock-location-address"/>
    	<action name="action-purchase-order-record-in-ati"/>
    	<action name="action-purchase-order-attrs-in-ati"/>
    	<action name="action-purchase-order-dispaly-price"/>
 	    <action name="action-contract-purchase-order-record-new" if="__config__.app.isApp('contract')"/>
		<action name="action-purchase-order-record-payment-mode"/>
		<action name="action-attrs-po-hidden-bank-details"/>
        <action name="action-purchase-order-method-fill-company-bank-details"/>
		<action name="action-purchase-order-attrs-interco"/>
		<action name="action-purchase-order-record-interco"/>
		<action name="action-purchase-order-attrs-external-reference"/>
		<action name="action-purchase-order-record-set-supplier-partner-from-partner" if="_partner!=null"/>
		<action name="action-group-purchase-order-partner-onchange" if="_partner!=null"/>
    </action-group>

    <action-group name="action-group-purchase-order-on-load-actions">
		<action name="action-purchase-order-attrs-hide-contact-partner"/>
		<action name="action-purchase-order-attrs-in-ati"/>
		<action name="action-attrs-po-hidden-bank-details"/>
		<action name="action-purchase-order-attrs-interco"/>
		<action name="action-purchase-order-attrs-external-reference"/>
	</action-group>

    <action-group name="action-group-purchase-order-company-change-actions">
	    <action name="action-purchase-order-record-company-configuration"/>
		<action name="action-purchase-order-method-fill-company-bank-details"/>
	    <action name="action-purchase-order-method-get-stock-location"/>
		<action name="action-purchase-order-record-update-info-company"/>
    </action-group>

    <action-group name="action-group-purchase-order-on-validate-actions">
      <action name="action-purchase-order-method-check-analytic-distribution-template"/>
    	<action name="action-purchase-order-validate-purchase-order-line"/>
    	<action name="action-purchase-order-validate-stock-location"/>
    	<action name="save"/>
    	<action name="action-purchase-order-method-validate"/>
    </action-group>

    <action-group name="action-group-purchase-order-merge-action">
	    <action name="action-purchase-order-method-merge-purchase" if="__repo__(MetaModule).all().filter('self.name = ?','axelor-supplychain').fetchOne()?.installed == false"/>
	    <action name="action-purchase-order-method-merge-supplychain"/>
	</action-group>

	<action-group name="action-group-purchase-order-partner-onchange">
		<action name="action-purchase-order-record-partner"/>
		<action name="action-purchase-order-method-get-stock-location" if="__config__.app.isApp('supplychain') &amp;&amp; stockLocation == null"/>
        <action name="action-purchase-order-attrs-hide-contact-partner"/>
        <action name="action-purchase-order-method-fill-company-bank-details"/>
		<action name="action-purchase-order-method-fill-price-list"/>
		<action name="action-purchase-order-attrs-interco"/>
		<action name="action-purchase-order-record-interco"/>
	</action-group>
	
	<action-group name="action-group-purchase-order-cancel">
		<action name="action-purchase-order-method-cancel-receipt" if="statusSelect==3"/>
		<action name="action-purchase-order-method-cancel"/>
	</action-group>
	
	<action-method name="action-purchase-order-method-update-amount-to-be-spread-over-the-timetable" if-module="axelor-supplychain">
		<call class="com.axelor.apps.supplychain.web.PurchaseOrderController" method="updateAmountToBeSpreadOverTheTimetable"/>
	</action-method>

    <action-method name="action-purchase-order-method-update-cost-price">
    	<call class="com.axelor.apps.purchase.web.PurchaseOrderController" method="updateCostPrice"/>
    </action-method>

    <action-method name="action-purchase-order-budget-distribution-apply-to-all">
    	<call class="com.axelor.apps.supplychain.web.PurchaseOrderController" method="applyToAllBudgetDistribution"/>
    </action-method>

    <action-attrs name="action-purchase-order-attrs-in-ati">
    	<attribute name="hidden" for="purchaseOrderLineList.exTaxTotal" expr="inAti"/>
    	<attribute name="hidden" for="purchaseOrderLineList.price" expr="inAti"/>
    	<attribute name="hidden" for="purchaseOrderLineList.inTaxTotal" expr="!inAti"/>
    	<attribute name="hidden" for="purchaseOrderLineList.inTaxPrice" expr="!inAti"/>
    	<attribute name="hidden" for="inAti" expr=" eval: __repo__(PurchaseConfig).all().filter('self.company = ?',company).fetchOne()?.purchaseOrderInAtiSelect == 1
    									|| __repo__(PurchaseConfig).all().filter('self.company = ?',company).fetchOne()?.purchaseOrderInAtiSelect == 2"/>
    </action-attrs>

    <action-attrs name="action-purchase-order-attrs-stock-location-address">
    	<attribute name="value" for="stockLocation.address" expr="eval: stockLocation.address"/>
    </action-attrs>

    <action-record name="action-purchase-order-record-in-ati" model="com.axelor.apps.purchase.db.PurchaseOrder">
    	<field name="inAti" expr="eval: __repo__(PurchaseConfig).all().filter('self.company = ?',company).fetchOne()?.purchaseOrderInAtiSelect == 2
    									|| __repo__(PurchaseConfig).all().filter('self.company = ?',company).fetchOne()?.purchaseOrderInAtiSelect == 4"/>
    </action-record>

    <action-record name="action-purchase-order-dispaly-price" model="com.axelor.apps.purchase.db.PurchaseOrder">
    	<field name="displayPriceOnQuotationRequest" expr="eval: __repo__(PurchaseConfig).all().filter('self.company = ?',company).fetchOne()?.displayPriceOnQuotationRequest"/>
    	<field name="priceRequest" expr="eval: __repo__(PurchaseConfig).all().filter('self.company = ?',company).fetchOne()?.priceRequest"/>
    </action-record>

    <action-record name="action-purchase-order-record-new" model="com.axelor.apps.purchase.db.PurchaseOrder">
    	<field name="exTaxTotal" expr="eval: 0"/>
    	<field name="taxTotal" expr="eval: 0"/>
    	<field name="inTaxTotal" expr="eval: 0"/>
    	<field name="statusSelect" expr="1"/>



    	<field name="company"  expr="eval:__user__.activeCompany" if="__user__.activeCompany != null"/>
    	<field name="company"  expr="eval:__repo__(Company).all().fetchOne()" if="__user__.activeCompany == null &amp;&amp; __repo__(Company).all().fetch().size == 1"/>
    	<field name="buyerUser" expr="eval:__user__"/>
    	<field name="orderDate" expr="eval: __date__"/>
    	<field name="team" expr="call:com.axelor.apps.base.service.user.UserService:getUserActiveTeam()"/>
		<field name="printingSettings" expr="eval: __user__.activeCompany?.printingSettings" if="__user__.activeCompany != null"/>
		<field name="project" expr="eval:_project" />
    </action-record>

    <action-record name="action-purchase-order-record-company-configuration" model="com.axelor.apps.purchase.db.PurchaseOrder">
	    <field name="currency" expr="eval: company?.currency"/>
	</action-record>

    <action-record name="action-purchase-order-record-partner" model="com.axelor.apps.purchase.db.PurchaseOrder">
 		<field name="currency" expr="eval: supplierPartner?.currency"/>
 		<field name="paymentCondition" expr="eval: supplierPartner?.paymentCondition" if="supplierPartner?.paymentCondition != null"/>
 		<field name="paymentCondition" expr="eval: company?.accountConfig?.defPaymentCondition" if="supplierPartner?.paymentCondition == null"/>
 		<field name="paymentMode" expr="eval: supplierPartner?.outPaymentMode" if="supplierPartner?.outPaymentMode != null"/>
		<field name="paymentMode" expr="eval: company?.accountConfig?.outPaymentMode" if="supplierPartner?.outPaymentMode == null"/>
 		<field name="contactPartner" expr="eval: supplierPartner?.contactPartnerSet?.size() == 1 ? supplierPartner?.contactPartnerSet[0] : null" />
    	<field name="shipmentMode" expr="eval: supplierPartner?.shipmentMode"/>
    	<field name="freightCarrierMode" expr="eval: supplierPartner?.freightCarrierMode"/>
    	<field name="notes" expr="eval: supplierPartner?.purchaseOrderComments"/>
    	<field name="stockLocation" expr="call: com.axelor.apps.stock.service.PartnerStockSettingsService:getDefaultStockLocation(supplierPartner, company)" if="__config__.app.isApp('supplychain')"/>
 	</action-record>

	<action-record name="action-purchase-order-record-payment-mode" model="com.axelor.apps.purchase.db.PurchaseOrder">
		<field name="paymentMode" expr="eval: supplierPartner?.outPaymentMode" if="supplierPartner?.outPaymentMode != null"/>
		<field name="paymentMode" expr="eval: __user__.activeCompany?.accountConfig?.outPaymentMode" if="supplierPartner?.outPaymentMode == null"/>
	</action-record>

    <action-record name="action-purchase-order-record-validate" model="com.axelor.apps.purchase.db.PurchaseOrder">
    	<field name="statusSelect" expr="3"/>
    	<field name="validationDate" expr="eval: __date__"/>
    	<field name="validatedByUser" expr="eval:__user__"/>
    </action-record>

    <action-record name="action-purchase-order-record-draft" model="com.axelor.apps.purchase.db.PurchaseOrder">
    	<field name="statusSelect" expr="1"/>
    </action-record>

    <action-record name="action-purchase-order-record-empty-freight-carrier-mode" model="com.axelor.apps.purchase.db.PurchaseOrder">
    	<field name="freightCarrierMode" expr="eval:null"/>
    </action-record>

    <action-method name="action-purchase-order-method-requested" model="com.axelor.apps.purchase.db.PurchaseOrder">
    	<call class="com.axelor.apps.purchase.web.PurchaseOrderController" method="requestPurchaseOrder"/>
    </action-method>

    <action-record name="action-purchase-order-record-cancel" model="com.axelor.apps.purchase.db.PurchaseOrder">
    	<field name="statusSelect" expr="5"/>
    </action-record>

    <action-record name="action-record-po-contact-partner-change" model="com.axelor.apps.purchase.db.PurchaseOrder">
    	<field name="supplierPartner" expr="eval: contactPartner.mainPartner" if="contactPartner.mainPartner != null"/>
    </action-record>

    <action-method name="action-purchase-order-method-validate-supplier">
    	<call class="com.axelor.apps.purchase.web.PurchaseOrderController" method="validateSupplier"/>
    </action-method>

    <action-method name="action-purchase-order-method-generate-budget-distribution" if-module="axelor-supplychain">
    	<call class="com.axelor.apps.supplychain.web.PurchaseOrderController" method="generateBudgetDistribution" if="__config__.app.isApp('supplychain')" />
    </action-method>

    <action-method name="action-purchase-order-method-compute">
    	<call class="com.axelor.apps.purchase.web.PurchaseOrderController" method="compute"/>
    </action-method>

 	<action-method name="action-purchase-order-set-sequence">
 		<call class="com.axelor.apps.purchase.web.PurchaseOrderController" method="setSequence"/>
 	</action-method>

    <action-method name="action-purchase-order-method-show-purchase-order">
		<call class="com.axelor.apps.purchase.web.PurchaseOrderController" method="showPurchaseOrder"/>
	</action-method>

	<action-method name="action-purchase-order-method-validate">
		<call class="com.axelor.apps.purchase.web.PurchaseOrderController" method="validate"/>
	</action-method>

	<action-method name="action-purchase-order-method-cancel">
		<call class="com.axelor.apps.purchase.web.PurchaseOrderController" method="cancel"/>
	</action-method>
    
    <action-attrs name="action-purchase-order-attrs-hide-contact-partner">
        <attribute name="hidden" for="contactPartner" expr="eval:supplierPartner != null &amp;&amp; supplierPartner.partnerTypeSelect == 2" />
    </action-attrs>

    <action-view name="action-purchase-order-show-invoice" title="Supplier invoices"
		model="com.axelor.apps.account.db.Invoice">
		<view type="grid" name="invoice-grid"/>
		<view type="form" name="invoice-form"/>
		<domain>self.operationTypeSelect = :_operationTypeSelect and self.purchaseOrder.id = :poId</domain>
		<context name="_operationTypeSelect" expr="eval: __repo__(Invoice).OPERATION_TYPE_SUPPLIER_PURCHASE"/>
		<context name="poId" expr="eval:id"/>
	</action-view>


	<action-view name="purchase-order-see-quotation-lines" title="See quotation lines"
		model="com.axelor.apps.purchase.db.PurchaseOrderLine">
		<view type="grid" name="purchase-order-line-grid"/>
		<view type="form" name="purchase-order-line-all-form"/>
		<domain>self.purchaseOrder.statusSelect in (1,2)</domain>
	</action-view>

	<action-view name="purchase-order-see-purchase-order-lines" title="See purchase order lines"
		model="com.axelor.apps.purchase.db.PurchaseOrderLine">
		<view type="grid" name="purchase-order-line-grid"/>
		<view type="form" name="purchase-order-line-all-form"/>
		<domain>self.purchaseOrder.statusSelect IN (:status)</domain>
  		<context name="status" expr="eval: _status"/>
	</action-view>

	<action-view name="purchase.order.merge" title="Merge purchase orders" model="com.axelor.apps.base.db.Wizard">
	    <view type="form" name="purchase-order-merge-form"/>
	</action-view>

	<action-view name="action-purchase-order-view-stock-moves" model="com.axelor.apps.stock.db.StockMove" title="Stock move">
		<view name="stock-move-grid" type="grid"/>
		<view name="stock-move-form" type="form"/>
		<domain>self.originTypeSelect LIKE 'com.axelor.apps.purchase.db.PurchaseOrder' AND self.originId = :purchaseOrder</domain>
		<context name="purchaseOrder" expr="eval: __self__.id"/>
	</action-view>

  	<action-validate name="action-purchase-order-validate-stock-location">
   		<error message="The field 'Stock Location' must be filled." if="stockLocation == null"/>
	</action-validate>
	
	<action-validate name="action-purchase-order-validate-purchase-order-line">
		<error message="Please enter at least one detail line." if="purchaseOrderLineList?.isEmpty()"/>
	</action-validate>
	
	<action-record name="action-purchase-record-newVersion" model="com.axelor.apps.purchase.db.PurchaseOrder">
    	<field name="statusSelect" expr="eval: 1"/>
    	<field name="versionNumber" expr="eval: versionNumber + 1"/>
    </action-record>

    <action-validate name="action-validate-purchase-order-check-selection">
		<error message="You have to choose at least one purchase order" if="purchaseOrderToMerge == null || purchaseOrderToMerge.size() == 0"/>
	</action-validate>

	<action-method name="action-purchase-order-method-merge-purchase">
		<call class="com.axelor.apps.purchase.web.PurchaseOrderController" method="mergePurchaseOrder"/>
	</action-method>

	<action-method name="action-purchase-order-method-fill-price-list">
		<call class="com.axelor.apps.purchase.web.PurchaseOrderController" method="fillPriceList"/>
	</action-method>

	<action-method name="action-purchase-order-method-price-list-domain">
		<call class="com.axelor.apps.purchase.web.PurchaseOrderController" method="changePriceListDomain"/>
	</action-method>

	<action-method name="action-purchase-order-method-merge-supplychain" if-module="axelor-supplychain">
		<call class="com.axelor.apps.supplychain.web.PurchaseOrderController" method="mergePurchaseOrder" if="__config__.app.isApp('supplychain')" />
	</action-method>
	
	<action-method name="action-purchase-order-method-update-purchase-order-lines-estimated-deliv-date" if-module="axelor-supplychain">
		<call class="com.axelor.apps.supplychain.web.PurchaseOrderController" method="updateEstimatedDelivDate"/>
	</action-method>

	<action-record name="action-record-load-dummy-field-confirm-merge-purchaseorder" model="com.axelor.apps.base.db.Wizard">
		<field name="priceListToCheck" expr="eval: contextPriceListToCheck"/>
		<field name="contactPartnerToCheck" expr="eval: contextContactPartnerToCheck"/>
		<field name="locationToCheck" expr="eval: contextLocationToCheck"/>
		<field name="partnerId" expr="eval: contextPartnerId"/>
	</action-record>

	<action-attrs name="action-attrs-po-domain-on-contact-partner">
		<attribute for="contactPartner" if="supplierPartner != null &amp;&amp; !supplierPartner.contactPartnerSet.empty" name="domain" expr="eval: &quot;self.id IN (${supplierPartner.contactPartnerSet?.collect{it.id}.join(',')})&quot;"/>
 		<attribute for="contactPartner" if="supplierPartner != null &amp;&amp; supplierPartner.contactPartnerSet.empty" name="domain" expr="eval: &quot;self.id IN (0)&quot;"/>
 		<attribute for="contactPartner" if="supplierPartner == null" name="domain" expr="eval: &quot;self.isContact = true AND :company member of self.companySet&quot;"/>
	</action-attrs>

	<action-attrs name="action-attrs-po-hidden-bank-details">
		<attribute for="companyBankDetails" name="hidden" expr="eval: !__config__.app.getApp('base').getManageMultiBanks()"/>
	</action-attrs>

	<action-method name="action-set-supplier-partner-domain">
		<call class="com.axelor.apps.purchase.web.PurchaseOrderController" method="supplierPartnerDomain"/>
	</action-method>
	
	<action-method name="action-purchase-order-method-fill-company-bank-details">
		<call class="com.axelor.apps.purchase.web.PurchaseOrderController" method="fillCompanyBankDetails"/>
	</action-method>
	

	<search-filters name="purchase-order-filters" model="com.axelor.apps.purchase.db.PurchaseOrder" title="Purchases Order filters">
		<filter title="My RFQs">
			<domain>(self.statusSelect = 1 or self.statusSelect = 2) and self.buyerUser.id = :_internalUser</domain>
		</filter>
		<filter title="My Sales">
			<domain>(self.statusSelect = 3 or self.statusSelect = 4) and self.buyerUser.id = :_internalUser</domain>
		</filter>
	</search-filters>

	<action-record name="action-purchase-order-record-update-info-company" model="com.axelor.apps.purchase.db.PurchaseOrder">
		<field name="tradingName" expr="eval: null" if="__config__.app.getApp('base').enableTradingNamesManagement"/>
		<field name="printingSettings" expr="eval: company?.printingSettings"/>
	</action-record>

	<action-method name="action-purchase-order-method-filter-printing-settings">
		<call class="com.axelor.apps.purchase.web.PurchaseOrderController" method="filterPrintingSettings"/>
	</action-method>

        <action-method name="action-purchase-order-method-finish-purchase-order">
                <call class="com.axelor.apps.purchase.web.PurchaseOrderController" method="finishPurchaseOrder"/>
        </action-method>

	<action-method name="action-purchase-order-method-printing-settings-default-value">
		<call class="com.axelor.apps.purchase.web.PurchaseOrderController" method="fillDefaultPrintingSettings"/>
	</action-method>
	
	<action-attrs name="action-purchase-order-attrs-external-reference">
		<attribute name="hidden" for="duplicateReferenceLabel" expr="eval: !((externalReference != null &amp;&amp; id != null &amp;&amp; __repo__(PurchaseOrder).all().filter('self.externalReference = ? AND self.id != ?', externalReference , id).count() > 0)
                 || (externalReference != null &amp;&amp; id == null &amp;&amp; __repo__(PurchaseOrder).all().filter('self.externalReference = ?', externalReference).count() > 0))"/>
	</action-attrs>

	<action-record name="action-purchase-order-record-set-supplier-partner-from-partner" model="com.axelor.apps.purchase.db.PurchaseOrder">
		<field name="supplierPartner" expr="eval: __repo__(Partner).find(_partner.id)" />
	</action-record>

  <action-method name="action-purchase-order-method-check-analytic-distribution-template">
    <call class="com.axelor.apps.supplychain.web.PurchaseOrderController" method="checkPurchaseOrderAnalyticDistributionTemplate" if="company?.purchaseConfig?.isAnalyticDistributionRequired"/>
  </action-method>
</object-views>
