<commit_before><?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.0.xsd">

    <!-- VUE GENERALE -->

  <grid name="invoice-grid" title="Invoices" model="com.axelor.apps.account.db.Invoice" orderBy="-invoiceDate">
   	<menubar>
	    <menu title="Reports" icon="fa-files-o" showTitle="true">
	      <item title="Print invoices" action="action-invoice-method-show-invoice"/>
	  	</menu>
     	<menu title="Tools" icon="fa-wrench" showTitle="true">
	      <item title="Validate selected invoices" action="action-invoice-method-mass-validation" prompt="Are you sure you want to validate all selected invoices ?" />
	      <item title="Ventilate selected invoices" action="action-invoice-method-mass-ventilation" prompt="Are you sure you want to ventilate all selected invoices ?" if="!__config__.app.getApp('invoice').isVentilationSkipped"/>
	      <item title="Merge Cust. Invoices" action="action-invoice-mergecustinvoices" />
	      <item title="See cust. invoices lines" action="action-customer-invoice-line-menu" />
	    </menu>
	</menubar>
   	<hilite color="primary" if="statusSelect == 1"/>
    <hilite color="danger" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt; 0"/>
    <hilite color="warning" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &gt;= 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt;= 5"/>
    <hilite color="success" if="statusSelect == 3 &amp;&amp; amountRemaining == 0"/>
    <field name="invoiceId"/>
		<field name="company" form-view="company-form" grid-view="company-grid" widget="200" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
		<field name="tradingName" form-view="trading-name-form" grid-view="trading-name-grid" if="__config__.app.getApp('base').enableTradingNamesManagement" widget="200"/>
    <field name="partner" form-view="partner-form" grid-view="partner-grid" width="200"/>
		<field name="operationSubTypeSelect" widget="160"/>
    <field name="invoiceDate" width="120"/>
    <field name="dueDate" width="120"/>
    <field name="exTaxTotal" aggregate="sum" width="120"/>
    <field name="inTaxTotal" aggregate="sum" width="120"/>
    <field name="amountRemaining" aggregate="sum" width="120"/>
    <field name="currency" width="60"/>
    <field name="statusSelect" width="100"/>
    <button name="showInvoiceBtn" title="Print" icon="fa-print" onClick="action-invoice-method-show-invoice"/>
    <button name="sendByEmailBtn" title="Send email" icon="fa-envelope" onClick="action-validate-send-email-remove-access-for-client,action-send-by-email-with-template"/>
  </grid>

  <grid name="invoice-refund-grid" title="Invoices" model="com.axelor.apps.account.db.Invoice" orderBy="-invoiceDate">
	<menubar>
      <menu title="Reports" icon="fa-files-o" showTitle="true">
        <item title="Print invoices" action="action-invoice-method-show-invoice"/>
	  </menu>
	  <menu title="Tools" icon="fa-wrench" showTitle="true">
	      <item title="Validate selected invoices" action="action-invoice-method-mass-validation" prompt="Are you sure you want to validate all selected invoices ?" />
	      <item title="Ventilate selected invoices" action="action-invoice-method-mass-ventilation" prompt="Are you sure you want to ventilate all selected invoices ?" if="!__config__.app.getApp('invoice').isVentilationSkipped"/>
	      <item title="Merge Cust. Invoices" action="action-invoice-mergecustinvoices" />
	      <item title="See cust. invoices lines" action="action-customer-invoice-line-menu" />
	      <item title="Pay selected invoices" action="action-invoice-method-register-mass-payment-on-supplier-invoices"/>
		</menu>
		</menubar>
		<hilite color="primary" if="statusSelect == 1"/>
		<hilite color="danger" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt; 0"/>
		<hilite color="warning" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &gt;= 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt;= 5"/>
		<hilite color="success" if="statusSelect == 3 &amp;&amp; amountRemaining == 0"/>
    <field name="invoiceId"/>
		<field name="company" form-view="company-form" grid-view="company-grid" widget="200" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
		<field name="tradingName" form-view="trading-name-form" grid-view="trading-name-grid" if="__config__.app.getApp('base').enableTradingNamesManagement" widget="200"/>
    <field name="partner" form-view="partner-form" grid-view="partner-grid" width="200"/>
		<field name="operationSubTypeSelect" widget="160"/>
		<field name="paymentMode" grid-view="payment-mode-grid" form-view="payment-mode-form" width="160"/>
    <field name="invoiceDate" width="120"/>
    <field name="dueDate" width="120"/>
    <field name="exTaxTotal" aggregate="sum" width="120"/>
    <field name="inTaxTotal" aggregate="sum" width="120"/>
    <field name="amountRemaining" aggregate="sum" width="120"/>
    <field name="currency" width="60"/>
    <field name="statusSelect" width="100"/>
    <button name="showInvoiceBtn" title="Print" icon="fa-print" onClick="action-invoice-method-show-invoice"/>
    <button name="sendByEmailBtn" title="Send email" icon="fa-envelope" onClick="action-validate-send-email-remove-access-for-client,action-send-by-email-with-template"/>
  </grid>

  <grid name="invoice-supplier-grid" title="Invoices" model="com.axelor.apps.account.db.Invoice" orderBy="-invoiceDate">
    <menubar>
      <menu title="Reports" icon="fa-files-o" showTitle="true">
        <item title="Print invoices" action="action-invoice-method-show-invoice"/>
			</menu>
			<menu title="Tools" icon="fa-wrench" showTitle="true">
				<item title="Validate selected invoices" action="action-invoice-method-mass-validation" prompt="Are you sure you want to validate all selected invoices ?" />
				<item title="Ventilate selected invoices" action="action-invoice-method-mass-ventilation" prompt="Are you sure you want to ventilate all selected invoices ?" if="!__config__.app.getApp('invoice').isVentilationSkipped"/>
				<item title="Pay selected invoices" action="action-invoice-method-register-mass-payment-on-supplier-invoices"/>
				<item title="See suppl. invoices lines" action="action-supplier-invoice-line-menu" />
			</menu>
		</menubar>
		<hilite color="primary" if="statusSelect == 1"/>
		<hilite color="danger" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt; 0"/>
		<hilite color="warning" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &gt;= 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt;= 5"/>
    <hilite color="success" if="statusSelect == 3 &amp;&amp; amountRemaining == 0"/>
    <field name="invoiceId"/>
		<field name="company" form-view="company-form" grid-view="company-grid" widget="200" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
    <field name="supplierInvoiceNb"/>
    <field name="partner" form-view="partner-form" grid-view="partner-grid"/>
    <field name="paymentMode" grid-view="payment-mode-grid" form-view="payment-mode-form"/>
    <field name="originDate"/>
    <field name="invoiceDate"/>
    <field name="dueDate"/>
    <field name="exTaxTotal" aggregate="sum"/>
    <field name="inTaxTotal" aggregate="sum"/>
    <field name="amountRemaining" aggregate="sum"/>
    <field name="currency" />
    <field name="statusSelect"/>
    <button name="showInvoiceBtn" title="Print" icon="fa-print" onClick="action-invoice-method-show-invoice"/>
    <button name="sendByEmailBtn" title="Send email" icon="fa-envelope" onClick="action-send-by-email-with-template"/>
  </grid>

  <grid name="invoice-supplier-refund-grid" title="Invoices" model="com.axelor.apps.account.db.Invoice" orderBy="-invoiceDate">
    <menubar>
      <menu title="Reports" icon="fa-files-o" showTitle="true">
        <item title="Print invoices" action="action-invoice-method-show-invoice"/>
      </menu>
			<menu title="Tools" icon="fa-wrench" showTitle="true">
	      <item title="Validate selected invoices" action="action-invoice-method-mass-validation" prompt="Are you sure you want to validate all selected invoices ?" />
	      <item title="Ventilate selected invoices" action="action-invoice-method-mass-ventilation" prompt="Are you sure you want to ventilate all selected invoices ?" if="!__config__.app.getApp('invoice').isVentilationSkipped"/>
	      <item title="Pay selected invoices" action="action-invoice-method-register-mass-payment-on-supplier-invoices"/>
        <item title="See suppl. invoices lines" action="action-supplier-invoice-line-menu" />
      </menu>
		</menubar>
	 	<hilite color="primary" if="statusSelect == 1"/>
	  <hilite color="danger" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt; 0"/>
	  <hilite color="warning" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &gt;= 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt;= 5"/>
	  <hilite color="success" if="statusSelect == 3 &amp;&amp; amountRemaining == 0"/>
		<field name="invoiceId"/>
		<field name="company" form-view="company-form" grid-view="company-grid" widget="200" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
		<field name="supplierInvoiceNb"/>
		<field name="operationTypeSelect"/>
		<field name="operationSubTypeSelect"/>
		<field name="partner" form-view="partner-form" grid-view="partner-grid"/>
		<field name="originDate"/>
		<field name="invoiceDate"/>
		<field name="dueDate"/>
		<field name="exTaxTotal" aggregate="sum"/>
		<field name="inTaxTotal" aggregate="sum"/>
		<field name="amountRemaining" aggregate="sum"/>
		<field name="currency" />
		<field name="statusSelect"/>
		<button name="showInvoiceBtn" title="Print" icon="fa-print" onClick="action-invoice-method-show-invoice"/>
		<button name="sendByEmailBtn" title="Send email" icon="fa-envelope" onClick="action-send-by-email-with-template"/>
  </grid>

    <grid name="invoice-light-grid" title="Invoices" model="com.axelor.apps.account.db.Invoice" orderBy="-invoiceDate">
    	<menubar>
            <menu title="Reports" icon="fa-files-o" showTitle="true">
	            <item title="Print invoices" action="action-invoice-method-show-invoice"/>
	     	</menu>
			<menu title="Tools" icon="fa-wrench" showTitle="true">
	            <item title="Validate selected invoices" action="action-invoice-method-mass-validation" prompt="Are you sure you want to validate all selected invoices ?" />
	            <item title="Ventilate selected invoices" action="action-invoice-method-mass-ventilation" prompt="Are you sure you want to ventilate all selected invoices ?" if="!__config__.app.getApp('invoice').isVentilationSkipped"/>
	            <item title="See suppl. invoices lines" action="action-supplier-invoice-line-menu" />
	            <item title="Generate subscriptions invoices" action="action-supplychain-method-generate-subscription-invoice" if="__config__.app.isApp('supplychain')"/>
	     	</menu>
		</menubar>
    	<hilite color="primary" if="statusSelect == 1"/>
	    <hilite color="danger" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt; 0"/>
	    <hilite color="warning" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &gt;= 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt;= 5"/>
	    <hilite color="success" if="statusSelect == 3 &amp;&amp; amountRemaining == 0"/>
        <field name="invoiceId"/>
        <field name="invoiceDate"/>
		<field name="operationTypeSelect" />
		<field name="operationSubTypeSelect"/>
		<field name="exTaxTotal" aggregate="sum"/>
        <field name="amountRemaining" aggregate="sum"/>
        <field name="currency"/>
        <field name="statusSelect"/>
        <button name="showInvoiceBtn" title="Print" icon="fa-print" onClick="action-invoice-method-show-invoice"/>
        <button name="sendByEmailBtn" title="Send email" icon="fa-envelope" onClick="action-validate-send-email-remove-access-for-client,action-send-by-email-with-template"/>
    </grid>

    <grid name="invoice-refund-grid" title="Invoices" model="com.axelor.apps.account.db.Invoice" orderBy="-invoiceDate">
    	<hilite color="primary" if="statusSelect == 1"/>
	    <hilite color="danger" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt; 0"/>
	    <hilite color="warning" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &gt;= 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt;= 5"/>
	    <hilite color="success" if="statusSelect == 3 &amp;&amp; amountRemaining == 0"/>
        <field name="invoiceId"/>
        <field name="invoiceDate"/>
		<field name="operationTypeSelect" />
		<field name="exTaxTotal" aggregate="sum"/>
        <field name="amountRemaining" aggregate="sum"/>
        <field name="statusSelect"/>
        <button name="showInvoiceBtn" title="Print" icon="fa-print" onClick="action-invoice-method-show-invoice"/>
    </grid>

    <form name="invoice-form" title="Invoice" model="com.axelor.apps.account.db.Invoice"
          onNew="action-account-invoice-onnew-group"
          onLoad="action-account-invoice-onload-group" >
          
		<toolbar>
			<button name="reportsBtn" title="Reports" icon="fa-print" readonlyIf="!id" onClick="save,action-invoice-view-reports-wizard"/>
		</toolbar>

        <menubar>
            <menu title="Tools" icon="fa-wrench" showTitle="true">
                <item title="Send email" action="save,action-send-by-email-with-template" readonlyIf="partner == null"/>
            </menu>
        </menubar>

		<panel name="mainPanel">
			<field name="printedPDF" hidden="true"/><!-- Needed to be able to use it in menu -->
            <panel name="statusSelectPanel" colSpan="7" stacked="true">
                <field name="statusSelect" widget="NavSelect" showIf="operationSubTypeSelect != 2" showTitle="false"/>
                <field name="statusSelect" widget="NavSelect" showIf="operationSubTypeSelect == 2" showTitle="false" selection-in="[1,2,4]"/>
            </panel>
            <field name="$viewerTags" showTitle="false" readonly="true" showIf="$readonly()" colSpan="5" depends="partner.factorizedCustomer">
                <viewer>
                    <![CDATA[
                        <h4 class="text-right">
                            <span class="label label-default" style="background-color: #B6473F; margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.operationTypeSelect == 1" x-translate>Supplier purchase</span>
                            <span class="label label-default" style="background-color: #B6473F; margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.operationTypeSelect == 2" x-translate>Supplier refund</span>
                            <span class="label label-default" style="background-color: #E0A83C; margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.operationTypeSelect == 3" x-translate>Customer sale</span>
                            <span class="label label-default" style="background-color: #E0A83C; margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.operationTypeSelect == 4" x-translate>Customer refund</span>

                            <span class="label label-info" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" x-translate ng-show="record.operationSubTypeSelect == 1 && (record.operationTypeSelect == 1 || record.operationTypeSelect == 3)">Standard invoice</span>
                            <span class="label label-info" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" x-translate ng-show="record.operationSubTypeSelect == 2 && (record.operationTypeSelect == 1 || record.operationTypeSelect == 3)">Advance payment invoice</span>
                            <span class="label label-info" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" x-translate ng-show="record.operationSubTypeSelect == 3 && (record.operationTypeSelect == 1 || record.operationTypeSelect == 3)">Balance invoice</span>
                            <span class="label label-info" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" x-translate ng-show="record.operationSubTypeSelect == 4 && (record.operationTypeSelect == 1 || record.operationTypeSelect == 3)">Contract invoice</span>
                            <span class="label label-info" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" x-translate ng-show="record.operationSubTypeSelect == 5 && (record.operationTypeSelect == 1 || record.operationTypeSelect == 3)">Contract closing invoice</span>
                            <span class="label label-info" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" x-translate ng-show="record.operationSubTypeSelect == 6 && (record.operationTypeSelect == 1 || record.operationTypeSelect == 3)">Subscription</span>
                        
                            <span class="label label-info" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" x-translate ng-show="(record.operationTypeSelect == 3 || record.operationTypeSelect == 4) && record.partner.factorizedCustomer">Factorized customer</span>
                        </h4>
                    ]]>
                </viewer>
            </field>

            <field name="invoiceId" colSpan="12" css="label-bold bold large" showTitle="false" showIf="id">
                <viewer>
                    <![CDATA[
                        <span ng-show="(record.operationSubTypeSelect != 2 && record.statusSelect &lt; 3) || (record.operationSubTypeSelect == 2 && record.statusSelect == 0)" x-translate>Proforma</span> <span>{{record.invoiceId}}</span>
                    ]]>
                </viewer>
            </field>

            <panel name="operationTypePanel" colSpan="6" itemSpan="12">
                <field name="operationTypeSelect" hideIf="statusSelect &gt; 1 || partner != null || $readonly() || _operationTypeSelect != 1"
                    onChange="action-group-account-invoice-operationtype-onchange" selection-in="[1,2]"/>
                <field name="operationTypeSelect" hideIf="statusSelect &gt; 1 || partner != null || $readonly() || _operationTypeSelect != 3"
                    onChange="action-group-account-invoice-operationtype-onchange" selection-in="[3,4]"/>
            </panel>
            <field name="operationSubTypeSelect" hideIf="statusSelect &gt; 1 || operationTypeSelect != 3 || $readonly()" showTitle="true"/>
            <field name="company" canEdit="false" readonlyIf="statusSelect != 1 || partner != null" onChange="action-group-account-invoice-company-onchange" form-view="company-form" grid-view="company-grid"/>
            <field name="currency" colSpan="3" canEdit="false" onChange="action-invoice-group-currency-onchange" readonlyIf="statusSelect != 1 || (invoiceLineList &amp;&amp; invoiceLineList.length != 0)" form-view="currency-form" grid-view="currency-grid"/>
            <field name="priceList" colSpan="3" canEdit="false" onChange="action-invoice-record-hide-discount" readonlyIf="statusSelect != 1" onSelect="action-invoice-method-domain-priceList" form-view="price-list-form" grid-view="price-list-grid"/>
            <field name="tradingName" canEdit="false" grid-view="trading-name-grid" form-view="trading-name-form" if="__config__.app.getApp('base').enableTradingNamesManagement" readonlyIf="statusSelect != 1" domain=":company MEMBER OF self.companySet" onChange="action-invoice-method-printing-settings-default-values"/>
            <field name="companyBankDetails" canEdit="false" onSelect="com.axelor.apps.base.web.CompanyBankDetailsController:fillCompanyBankDetailsDomain" form-view="bank-details-form" grid-view="bank-details-grid" onChange="action-invoice-record-specific-note-on-invoice"/>  
            <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')"/>
            <field name="inAti" onChange="action-invoice-attrs-in-ati" readonlyIf="statusSelect != 1 || invoiceLineList.length > 0"/>
        </panel>

        <panel name="invoicingInfoPanel" title="Invoicing informations" hideIf="company == null">
            <field name="partner" colSpan="3" canEdit="false" readonlyIf="statusSelect != 1 || invoiceLineList.length > 0" onChange="action-group-account-invoice-partner-onchange,action-method-invoice-address-str" onSelect="action-set-partner-domain" form-view="partner-form" grid-view="partner-grid"/>
            <field name="contactPartner" colSpan="3" canEdit="false" onSelect="action-set-partner-domain" domain="self.isContact = true AND :company member of self.companySet" readonlyIf="partner != null &amp;&amp; partner.partnerTypeSelect == 2" form-view="partner-contact-form" grid-view="partner-contact-grid"/>
            <field name="paymentMode" colSpan="3" canEdit="false" widget="SuggestBox" onSelect="action-set-payment-mode-domain" onChange="action-invoice-method-fill-company-bank-details,action-invoice-method-check-partner-bank-details-list" form-view="payment-mode-form" grid-view="payment-mode-grid"/>
            <field name="paymentCondition" colSpan="3" canEdit="false" readonlyIf="statusSelect == 3" widget="SuggestBox" onChange="action-invoice-record-due-date" form-view="payment-condition-form" grid-view="payment-condition-grid"/>
    		<field name="$partnerBankDetailsListWarning" showTitle="false" hidden="true" readonly="true" colSpan="12">
      			<viewer><![CDATA[
               		<span x-translate style="color:red">Watch out, this partner has no active bank details</span>
           		]]></viewer>
    		</field>
            <panel name="addressPanel" stacked="true">
                <field name="address" hideIf="$readonly() || statusSelect &gt; 1" onSelect="action-invoice-attrs-domain-address" onChange="action-method-invoice-address-str" canEdit="false" canNew="true" form-view="address-partner-address-form" grid-view="address-grid"/>
                <field name="addressStr" readonlyIf="statusSelect &gt; 1" height="5">
                    <viewer>{{record.addressStr}}</viewer>
                
              	</field>
            </panel> 
            <field name="bankDetails" colSpan="3" canEdit="false" widget="SuggestBox" onSelect="action-invoice-attrs-bank-details-from-partner-domain" form-view="bank-details-form" grid-view="bank-details-grid"/>
           	<field name="partnerTaxNbr" colSpan="3" readonlyIf="statusSelect != 1" hideIf="operationTypeSelect != 3 &amp;&amp; operationTypeSelect != 4" if-module="axelor-supplychain" if="__config__.app.isApp('supplychain')"/>
            <field name="saleOrder"  canEdit="false" onChange="action-invoice-group-saleorder-onchange" if="__config__.app.isApp('supplychain') &amp;&amp; !__config__.app.getApp('supplychain').getManageInvoicedAmountByLine()" if-module="axelor-supplychain" form-view="sale-order-form" grid-view="sale-order-grid" showIf="operationTypeSelect == 3 || operationTypeSelect == 4"/>
            <field name="purchaseOrder" domain="self.supplierPartner = :partner AND self.company = :company" if="__config__.app.isApp('supplychain') &amp;&amp; !__config__.app.getApp('supplychain').getManageInvoicedAmountByLine()" if-module="axelor-supplychain" form-view="purchase-order-form" grid-view="purchase-order-grid" showIf="operationTypeSelect == 1 || operationTypeSelect == 2"/>
            
            <field name="supplierInvoiceNb" showIf="operationTypeSelect == 1 || operationTypeSelect == 2" requiredIf="(operationTypeSelect == 1 || operationTypeSelect == 2) &amp;&amp; statusSelect == 2" onChange="action-account-invoice-atts-suppier-invoice-nbr"/>
		    <field name="$duplicateInvoiceNbr" hidden="true" colSpan="12" showTitle="false" readonly="true">
              <viewer>
                <![CDATA[
               	  <h4>
               	    <span class="label label-warning" style="color: #FFFFFF;" x-translate>Watch out, an invoice was already created for this supplier invoice number.</span>
                  </h4>
              	]]>
              </viewer>    
            </field>
            <field name="originDate" showIf="operationTypeSelect == 1 || operationTypeSelect == 2" requiredIf="(operationTypeSelect == 1 || operationTypeSelect == 2) &amp;&amp; statusSelect == 2" onChange="action-invoice-record-due-date,action-invoice-record-estimated-payment-date"/>
        </panel>

		<panel name="subscriptionPanel" title="Subscription period"
			   showIf="[6, 7].includes(operationSubTypeSelect)">
			<field name="subscriptionFromDate" />
			<field name="subscriptionToDate" />
		</panel>

		<panel-tabs name="mainPanelTab" hideIf="partner == null">
			<panel name="invoiceContentPanel" title="Content" showTitle="false"><commit_msg>RM#17956 INVOICE : Change form view<commit_after><?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.0.xsd">

    <!-- VUE GENERALE -->

  <grid name="invoice-grid" title="Invoices" model="com.axelor.apps.account.db.Invoice" orderBy="-invoiceDate">
   	<menubar>
	    <menu title="Reports" icon="fa-files-o" showTitle="true">
	      <item title="Print invoices" action="action-invoice-method-show-invoice"/>
	  	</menu>
     	<menu title="Tools" icon="fa-wrench" showTitle="true">
	      <item title="Validate selected invoices" action="action-invoice-method-mass-validation" prompt="Are you sure you want to validate all selected invoices ?" />
	      <item title="Ventilate selected invoices" action="action-invoice-method-mass-ventilation" prompt="Are you sure you want to ventilate all selected invoices ?" if="!__config__.app.getApp('invoice').isVentilationSkipped"/>
	      <item title="Merge Cust. Invoices" action="action-invoice-mergecustinvoices" />
	      <item title="See cust. invoices lines" action="action-customer-invoice-line-menu" />
	    </menu>
	</menubar>
   	<hilite color="primary" if="statusSelect == 1"/>
    <hilite color="danger" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt; 0"/>
    <hilite color="warning" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &gt;= 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt;= 5"/>
    <hilite color="success" if="statusSelect == 3 &amp;&amp; amountRemaining == 0"/>
    <field name="invoiceId"/>
		<field name="company" form-view="company-form" grid-view="company-grid" widget="200" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
		<field name="tradingName" form-view="trading-name-form" grid-view="trading-name-grid" if="__config__.app.getApp('base').enableTradingNamesManagement" widget="200"/>
    <field name="partner" form-view="partner-form" grid-view="partner-grid" width="200"/>
		<field name="operationSubTypeSelect" widget="160"/>
    <field name="invoiceDate" width="120"/>
    <field name="dueDate" width="120"/>
    <field name="exTaxTotal" aggregate="sum" width="120"/>
    <field name="inTaxTotal" aggregate="sum" width="120"/>
    <field name="amountRemaining" aggregate="sum" width="120"/>
    <field name="currency" width="60"/>
    <field name="statusSelect" width="100"/>
    <button name="showInvoiceBtn" title="Print" icon="fa-print" onClick="action-invoice-method-show-invoice"/>
    <button name="sendByEmailBtn" title="Send email" icon="fa-envelope" onClick="action-validate-send-email-remove-access-for-client,action-send-by-email-with-template"/>
  </grid>

  <grid name="invoice-refund-grid" title="Invoices" model="com.axelor.apps.account.db.Invoice" orderBy="-invoiceDate">
	<menubar>
      <menu title="Reports" icon="fa-files-o" showTitle="true">
        <item title="Print invoices" action="action-invoice-method-show-invoice"/>
	  </menu>
	  <menu title="Tools" icon="fa-wrench" showTitle="true">
	      <item title="Validate selected invoices" action="action-invoice-method-mass-validation" prompt="Are you sure you want to validate all selected invoices ?" />
	      <item title="Ventilate selected invoices" action="action-invoice-method-mass-ventilation" prompt="Are you sure you want to ventilate all selected invoices ?" if="!__config__.app.getApp('invoice').isVentilationSkipped"/>
	      <item title="Merge Cust. Invoices" action="action-invoice-mergecustinvoices" />
	      <item title="See cust. invoices lines" action="action-customer-invoice-line-menu" />
	      <item title="Pay selected invoices" action="action-invoice-method-register-mass-payment-on-supplier-invoices"/>
		</menu>
		</menubar>
		<hilite color="primary" if="statusSelect == 1"/>
		<hilite color="danger" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt; 0"/>
		<hilite color="warning" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &gt;= 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt;= 5"/>
		<hilite color="success" if="statusSelect == 3 &amp;&amp; amountRemaining == 0"/>
    <field name="invoiceId"/>
		<field name="company" form-view="company-form" grid-view="company-grid" widget="200" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
		<field name="tradingName" form-view="trading-name-form" grid-view="trading-name-grid" if="__config__.app.getApp('base').enableTradingNamesManagement" widget="200"/>
    <field name="partner" form-view="partner-form" grid-view="partner-grid" width="200"/>
		<field name="operationSubTypeSelect" widget="160"/>
		<field name="paymentMode" grid-view="payment-mode-grid" form-view="payment-mode-form" width="160"/>
    <field name="invoiceDate" width="120"/>
    <field name="dueDate" width="120"/>
    <field name="exTaxTotal" aggregate="sum" width="120"/>
    <field name="inTaxTotal" aggregate="sum" width="120"/>
    <field name="amountRemaining" aggregate="sum" width="120"/>
    <field name="currency" width="60"/>
    <field name="statusSelect" width="100"/>
    <button name="showInvoiceBtn" title="Print" icon="fa-print" onClick="action-invoice-method-show-invoice"/>
    <button name="sendByEmailBtn" title="Send email" icon="fa-envelope" onClick="action-validate-send-email-remove-access-for-client,action-send-by-email-with-template"/>
  </grid>

  <grid name="invoice-supplier-grid" title="Invoices" model="com.axelor.apps.account.db.Invoice" orderBy="-invoiceDate">
    <menubar>
      <menu title="Reports" icon="fa-files-o" showTitle="true">
        <item title="Print invoices" action="action-invoice-method-show-invoice"/>
			</menu>
			<menu title="Tools" icon="fa-wrench" showTitle="true">
				<item title="Validate selected invoices" action="action-invoice-method-mass-validation" prompt="Are you sure you want to validate all selected invoices ?" />
				<item title="Ventilate selected invoices" action="action-invoice-method-mass-ventilation" prompt="Are you sure you want to ventilate all selected invoices ?" if="!__config__.app.getApp('invoice').isVentilationSkipped"/>
				<item title="Pay selected invoices" action="action-invoice-method-register-mass-payment-on-supplier-invoices"/>
				<item title="See suppl. invoices lines" action="action-supplier-invoice-line-menu" />
			</menu>
		</menubar>
		<hilite color="primary" if="statusSelect == 1"/>
		<hilite color="danger" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt; 0"/>
		<hilite color="warning" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &gt;= 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt;= 5"/>
    <hilite color="success" if="statusSelect == 3 &amp;&amp; amountRemaining == 0"/>
    <field name="invoiceId"/>
		<field name="company" form-view="company-form" grid-view="company-grid" widget="200" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
    <field name="supplierInvoiceNb"/>
    <field name="partner" form-view="partner-form" grid-view="partner-grid"/>
    <field name="paymentMode" grid-view="payment-mode-grid" form-view="payment-mode-form"/>
    <field name="originDate"/>
    <field name="invoiceDate"/>
    <field name="dueDate"/>
    <field name="exTaxTotal" aggregate="sum"/>
    <field name="inTaxTotal" aggregate="sum"/>
    <field name="amountRemaining" aggregate="sum"/>
    <field name="currency" />
    <field name="statusSelect"/>
    <button name="showInvoiceBtn" title="Print" icon="fa-print" onClick="action-invoice-method-show-invoice"/>
    <button name="sendByEmailBtn" title="Send email" icon="fa-envelope" onClick="action-send-by-email-with-template"/>
  </grid>

  <grid name="invoice-supplier-refund-grid" title="Invoices" model="com.axelor.apps.account.db.Invoice" orderBy="-invoiceDate">
    <menubar>
      <menu title="Reports" icon="fa-files-o" showTitle="true">
        <item title="Print invoices" action="action-invoice-method-show-invoice"/>
      </menu>
			<menu title="Tools" icon="fa-wrench" showTitle="true">
	      <item title="Validate selected invoices" action="action-invoice-method-mass-validation" prompt="Are you sure you want to validate all selected invoices ?" />
	      <item title="Ventilate selected invoices" action="action-invoice-method-mass-ventilation" prompt="Are you sure you want to ventilate all selected invoices ?" if="!__config__.app.getApp('invoice').isVentilationSkipped"/>
	      <item title="Pay selected invoices" action="action-invoice-method-register-mass-payment-on-supplier-invoices"/>
        <item title="See suppl. invoices lines" action="action-supplier-invoice-line-menu" />
      </menu>
		</menubar>
	 	<hilite color="primary" if="statusSelect == 1"/>
	  <hilite color="danger" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt; 0"/>
	  <hilite color="warning" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &gt;= 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt;= 5"/>
	  <hilite color="success" if="statusSelect == 3 &amp;&amp; amountRemaining == 0"/>
		<field name="invoiceId"/>
		<field name="company" form-view="company-form" grid-view="company-grid" widget="200" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
		<field name="supplierInvoiceNb"/>
		<field name="operationTypeSelect"/>
		<field name="operationSubTypeSelect"/>
		<field name="partner" form-view="partner-form" grid-view="partner-grid"/>
		<field name="originDate"/>
		<field name="invoiceDate"/>
		<field name="dueDate"/>
		<field name="exTaxTotal" aggregate="sum"/>
		<field name="inTaxTotal" aggregate="sum"/>
		<field name="amountRemaining" aggregate="sum"/>
		<field name="currency" />
		<field name="statusSelect"/>
		<button name="showInvoiceBtn" title="Print" icon="fa-print" onClick="action-invoice-method-show-invoice"/>
		<button name="sendByEmailBtn" title="Send email" icon="fa-envelope" onClick="action-send-by-email-with-template"/>
  </grid>

    <grid name="invoice-light-grid" title="Invoices" model="com.axelor.apps.account.db.Invoice" orderBy="-invoiceDate">
    	<menubar>
            <menu title="Reports" icon="fa-files-o" showTitle="true">
	            <item title="Print invoices" action="action-invoice-method-show-invoice"/>
	     	</menu>
			<menu title="Tools" icon="fa-wrench" showTitle="true">
	            <item title="Validate selected invoices" action="action-invoice-method-mass-validation" prompt="Are you sure you want to validate all selected invoices ?" />
	            <item title="Ventilate selected invoices" action="action-invoice-method-mass-ventilation" prompt="Are you sure you want to ventilate all selected invoices ?" if="!__config__.app.getApp('invoice').isVentilationSkipped"/>
	            <item title="See suppl. invoices lines" action="action-supplier-invoice-line-menu" />
	            <item title="Generate subscriptions invoices" action="action-supplychain-method-generate-subscription-invoice" if="__config__.app.isApp('supplychain')"/>
	     	</menu>
		</menubar>
    	<hilite color="primary" if="statusSelect == 1"/>
	    <hilite color="danger" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt; 0"/>
	    <hilite color="warning" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &gt;= 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt;= 5"/>
	    <hilite color="success" if="statusSelect == 3 &amp;&amp; amountRemaining == 0"/>
        <field name="invoiceId"/>
        <field name="invoiceDate"/>
		<field name="operationTypeSelect" />
		<field name="operationSubTypeSelect"/>
		<field name="exTaxTotal" aggregate="sum"/>
        <field name="amountRemaining" aggregate="sum"/>
        <field name="currency"/>
        <field name="statusSelect"/>
        <button name="showInvoiceBtn" title="Print" icon="fa-print" onClick="action-invoice-method-show-invoice"/>
        <button name="sendByEmailBtn" title="Send email" icon="fa-envelope" onClick="action-validate-send-email-remove-access-for-client,action-send-by-email-with-template"/>
    </grid>

    <grid name="invoice-refund-grid" title="Invoices" model="com.axelor.apps.account.db.Invoice" orderBy="-invoiceDate">
    	<hilite color="primary" if="statusSelect == 1"/>
	    <hilite color="danger" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt; 0"/>
	    <hilite color="warning" if="statusSelect == 3 &amp;&amp; amountRemaining &gt; 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &gt;= 0 &amp;&amp; $moment(dueDate).diff(todayDate,'days') &lt;= 5"/>
	    <hilite color="success" if="statusSelect == 3 &amp;&amp; amountRemaining == 0"/>
        <field name="invoiceId"/>
        <field name="invoiceDate"/>
		<field name="operationTypeSelect" />
		<field name="exTaxTotal" aggregate="sum"/>
        <field name="amountRemaining" aggregate="sum"/>
        <field name="statusSelect"/>
        <button name="showInvoiceBtn" title="Print" icon="fa-print" onClick="action-invoice-method-show-invoice"/>
    </grid>

    <form name="invoice-form" title="Invoice" model="com.axelor.apps.account.db.Invoice"
          onNew="action-account-invoice-onnew-group"
          onLoad="action-account-invoice-onload-group" >
          
		<toolbar>
			<button name="reportsBtn" title="Reports" icon="fa-print" readonlyIf="!id" onClick="save,action-invoice-view-reports-wizard"/>
		</toolbar>

        <menubar>
            <menu title="Tools" icon="fa-wrench" showTitle="true">
                <item title="Send email" action="save,action-send-by-email-with-template" readonlyIf="partner == null"/>
            </menu>
        </menubar>

		<panel name="mainPanel">
			<field name="printedPDF" hidden="true"/><!-- Needed to be able to use it in menu -->
            <panel name="statusSelectPanel" colSpan="7" stacked="true">
                <field name="statusSelect" widget="NavSelect" showIf="operationSubTypeSelect != 2" showTitle="false"/>
                <field name="statusSelect" widget="NavSelect" showIf="operationSubTypeSelect == 2" showTitle="false" selection-in="[1,2,4]"/>
            </panel>
            <field name="$viewerTags" showTitle="false" readonly="true" showIf="$readonly()" colSpan="5" depends="partner.factorizedCustomer">
                <viewer>
                    <![CDATA[
                        <h4 class="text-right">
                            <span class="label label-default" style="background-color: #B6473F; margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.operationTypeSelect == 1" x-translate>Supplier purchase</span>
                            <span class="label label-default" style="background-color: #B6473F; margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.operationTypeSelect == 2" x-translate>Supplier refund</span>
                            <span class="label label-default" style="background-color: #E0A83C; margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.operationTypeSelect == 3" x-translate>Customer sale</span>
                            <span class="label label-default" style="background-color: #E0A83C; margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.operationTypeSelect == 4" x-translate>Customer refund</span>

                            <span class="label label-info" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" x-translate ng-show="record.operationSubTypeSelect == 1 && (record.operationTypeSelect == 1 || record.operationTypeSelect == 3)">Standard invoice</span>
                            <span class="label label-info" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" x-translate ng-show="record.operationSubTypeSelect == 2 && (record.operationTypeSelect == 1 || record.operationTypeSelect == 3)">Advance payment invoice</span>
                            <span class="label label-info" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" x-translate ng-show="record.operationSubTypeSelect == 3 && (record.operationTypeSelect == 1 || record.operationTypeSelect == 3)">Balance invoice</span>
                            <span class="label label-info" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" x-translate ng-show="record.operationSubTypeSelect == 4 && (record.operationTypeSelect == 1 || record.operationTypeSelect == 3)">Contract invoice</span>
                            <span class="label label-info" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" x-translate ng-show="record.operationSubTypeSelect == 5 && (record.operationTypeSelect == 1 || record.operationTypeSelect == 3)">Contract closing invoice</span>
                            <span class="label label-info" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" x-translate ng-show="record.operationSubTypeSelect == 6 && (record.operationTypeSelect == 1 || record.operationTypeSelect == 3)">Subscription</span>
                        
                            <span class="label label-info" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" x-translate ng-show="(record.operationTypeSelect == 3 || record.operationTypeSelect == 4) && record.partner.factorizedCustomer">Factorized customer</span>
                        </h4>
                    ]]>
                </viewer>
            </field>

            <field name="invoiceId" colSpan="12" css="label-bold bold large" showTitle="false" showIf="id">
                <viewer>
                    <![CDATA[
                        <span ng-show="(record.operationSubTypeSelect != 2 && record.statusSelect &lt; 3) || (record.operationSubTypeSelect == 2 && record.statusSelect == 0)" x-translate>Proforma</span> <span>{{record.invoiceId}}</span>
                    ]]>
                </viewer>
            </field>

            <panel name="operationTypePanel" colSpan="6" itemSpan="12">
                <field name="operationTypeSelect" hideIf="statusSelect &gt; 1 || partner != null || $readonly() || _operationTypeSelect != 1"
                    onChange="action-group-account-invoice-operationtype-onchange" selection-in="[1,2]"/>
                <field name="operationTypeSelect" hideIf="statusSelect &gt; 1 || partner != null || $readonly() || _operationTypeSelect != 3"
                    onChange="action-group-account-invoice-operationtype-onchange" selection-in="[3,4]"/>
            </panel>
            <field name="operationSubTypeSelect" hideIf="statusSelect &gt; 1 || operationTypeSelect != 3 || $readonly()" showTitle="true"/>
            <field name="company" canEdit="false" readonlyIf="statusSelect != 1 || partner != null" onChange="action-group-account-invoice-company-onchange" form-view="company-form" grid-view="company-grid"/>
            <field name="currency" colSpan="3" canEdit="false" onChange="action-invoice-group-currency-onchange" readonlyIf="statusSelect != 1 || (invoiceLineList &amp;&amp; invoiceLineList.length != 0)" form-view="currency-form" grid-view="currency-grid"/>
            <field name="priceList" colSpan="3" canEdit="false" onChange="action-invoice-record-hide-discount" readonlyIf="statusSelect != 1" onSelect="action-invoice-method-domain-priceList" form-view="price-list-form" grid-view="price-list-grid"/>
            <field name="tradingName" canEdit="false" grid-view="trading-name-grid" form-view="trading-name-form" if="__config__.app.getApp('base').enableTradingNamesManagement" readonlyIf="statusSelect != 1" domain=":company MEMBER OF self.companySet" onChange="action-invoice-method-printing-settings-default-values"/>
            <field name="companyBankDetails" canEdit="false" onSelect="com.axelor.apps.base.web.CompanyBankDetailsController:fillCompanyBankDetailsDomain" form-view="bank-details-form" grid-view="bank-details-grid" onChange="action-invoice-record-specific-note-on-invoice"/>  
            <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')"/>
            <field name="inAti" onChange="action-invoice-attrs-in-ati" readonlyIf="statusSelect != 1 || invoiceLineList.length > 0"/>
        </panel>

        <panel name="invoicingInfoPanel" title="Invoicing informations" hideIf="company == null">
            <field name="partner" colSpan="3" canEdit="false" readonlyIf="statusSelect != 1 || invoiceLineList.length > 0" onChange="action-group-account-invoice-partner-onchange,action-method-invoice-address-str" onSelect="action-set-partner-domain" form-view="partner-form" grid-view="partner-grid"/>
            <field name="contactPartner" colSpan="3" canEdit="false" onSelect="action-set-partner-domain" domain="self.isContact = true AND :company member of self.companySet" readonlyIf="partner != null &amp;&amp; partner.partnerTypeSelect == 2" form-view="partner-contact-form" grid-view="partner-contact-grid"/>
            <field name="paymentMode" colSpan="3" canEdit="false" widget="SuggestBox" onSelect="action-set-payment-mode-domain" onChange="action-invoice-method-fill-company-bank-details,action-invoice-method-check-partner-bank-details-list" form-view="payment-mode-form" grid-view="payment-mode-grid"/>
            <field name="paymentCondition" colSpan="3" canEdit="false" readonlyIf="statusSelect == 3" widget="SuggestBox" onChange="action-invoice-record-due-date" form-view="payment-condition-form" grid-view="payment-condition-grid"/>
    		<field name="$partnerBankDetailsListWarning" showTitle="false" hidden="true" readonly="true" colSpan="12">
      			<viewer><![CDATA[
               		<span x-translate style="color:red">Watch out, this partner has no active bank details</span>
           		]]></viewer>
    		</field>
    		<field name="bankDetails" canEdit="false" widget="SuggestBox" onSelect="action-invoice-attrs-bank-details-from-partner-domain" form-view="bank-details-form" grid-view="bank-details-grid"/>
           	<field name="partnerTaxNbr" readonlyIf="statusSelect != 1" hideIf="operationTypeSelect != 3 &amp;&amp; operationTypeSelect != 4" if-module="axelor-supplychain" if="__config__.app.isApp('supplychain')"/>
            <panel name="addressPanel" stacked="true">
                <field name="address" hideIf="$readonly() || statusSelect &gt; 1" onSelect="action-invoice-attrs-domain-address" onChange="action-method-invoice-address-str" canEdit="false" canNew="true" form-view="address-partner-address-form" grid-view="address-grid"/>
                <field name="addressStr" readonlyIf="statusSelect &gt; 1" height="5">
                    <viewer>{{record.addressStr}}</viewer>
                
              	</field>
            </panel>    
            <field name="saleOrder"  canEdit="false" onChange="action-invoice-group-saleorder-onchange" if="__config__.app.isApp('supplychain') &amp;&amp; !__config__.app.getApp('supplychain').getManageInvoicedAmountByLine()" if-module="axelor-supplychain" form-view="sale-order-form" grid-view="sale-order-grid" showIf="operationTypeSelect == 3 || operationTypeSelect == 4"/>
            <field name="purchaseOrder" domain="self.supplierPartner = :partner AND self.company = :company" if="__config__.app.isApp('supplychain') &amp;&amp; !__config__.app.getApp('supplychain').getManageInvoicedAmountByLine()" if-module="axelor-supplychain" form-view="purchase-order-form" grid-view="purchase-order-grid" showIf="operationTypeSelect == 1 || operationTypeSelect == 2"/>
            
            <field name="supplierInvoiceNb" showIf="operationTypeSelect == 1 || operationTypeSelect == 2" requiredIf="(operationTypeSelect == 1 || operationTypeSelect == 2) &amp;&amp; statusSelect == 2" onChange="action-account-invoice-atts-suppier-invoice-nbr"/>
		    <field name="$duplicateInvoiceNbr" hidden="true" colSpan="12" showTitle="false" readonly="true">
              <viewer>
                <![CDATA[
               	  <h4>
               	    <span class="label label-warning" style="color: #FFFFFF;" x-translate>Watch out, an invoice was already created for this supplier invoice number.</span>
                  </h4>
              	]]>
              </viewer>    
            </field>
            <field name="originDate" showIf="operationTypeSelect == 1 || operationTypeSelect == 2" requiredIf="(operationTypeSelect == 1 || operationTypeSelect == 2) &amp;&amp; statusSelect == 2" onChange="action-invoice-record-due-date,action-invoice-record-estimated-payment-date"/>
        </panel>

		<panel name="subscriptionPanel" title="Subscription period"
			   showIf="[6, 7].includes(operationSubTypeSelect)">
			<field name="subscriptionFromDate" />
			<field name="subscriptionToDate" />
		</panel>

		<panel-tabs name="mainPanelTab" hideIf="partner == null">
			<panel name="invoiceContentPanel" title="Content" showTitle="false">
{'fraction_non_alphanumeric': 0.16894932689123107, 'fraction_numerical': 0.010890529720041302, 'mean_word_length': 4.30323380514516, 'pattern_counts': {'":': 2, '<': 565, '<?xml version=': 2, '>': 569, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1455664', 'n_tokens_mistral': 16391, 'n_tokens_neox': 15400, 'n_words': 2953}