<?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="stock-move-grid" title="Stock moves" model="com.axelor.apps.stock.db.StockMove" orderBy="statusSelect,-estimatedDate">
    <toolbar>
      <button name="printStockMoveGridBtn" title="Print StockMove(s)" onClick="action-print-stock-move" icon="fa-print"/>
    </toolbar>
  	<hilite if="statusSelect == 2 &amp;&amp; $moment(__date__).diff(estimatedDate, 'days') &gt; 0" color="danger"/>
		<hilite if="statusSelect == 2 &amp;&amp;  $moment(estimatedDate).diff(todayDate, 'days') &lt; 10" color="warning"/>
		<hilite if="_fromInvoice &amp;&amp; pfpValidateStatusSelect == 2 &amp;&amp; $get('company.accountConfig.isManagePassedForPayment')" color="success"/>
		<hilite if="_fromInvoice &amp;&amp; pfpValidateStatusSelect == 3 &amp;&amp; $get('company.accountConfig.isManagePassedForPayment')" color="danger"/>
        <field name="stockMoveSeq" width="120"/>
		<field name="fromStockLocation" form-view="stock-location-form" grid-view="stock-location-grid"/>
		<field name="toStockLocation" form-view="stock-location-form" grid-view="stock-location-grid"/>
		<field name="estimatedDate"/>
		<field name="realDate"/>
		<field name="company" form-view="company-form" grid-view="company-grid" 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"/>
    <field name="statusSelect"/>
    <field name="origin" width="120"/>
    <field name="availableStatusSelect" showIf="statusSelect == 2">
	   	<hilite strong="true" color="success" if="availableStatusSelect == 1"/>
	   	<hilite strong="true" color="warning" if="availableStatusSelect == 2"/>
	   	<hilite strong="true" color="danger" if="availableStatusSelect == 3"/>
    </field>
		<field name="typeSelect" hidden="true" />
		<field name="toAddressStr" hidden="true" form-view="address-form" grid-view="address-grid"/>
        <field name="pfpValidateStatusSelect" hidden="true" if-module="axelor-supplychain" if="__config__.app.isApp('supplychain')"/>
	<field name="company.accountConfig" hidden="true" if-module="axelor-supplychain" if="__config__.app.isApp('supplychain')"/>
	<field name="company.accountConfig.isManagePassedForPayment" hidden="true" if-module="axelor-supplychain" if="__config__.app.isApp('supplychain')"/>
		<button name="printStockMoveBtn" title="Print" icon="fa-print" onClick="action-print-stock-move" readonlyIf="statusSelect == 1"/>
		<button name="viewDirectionBtn" icon="fa-location-arrow" onClick="action-stock-move-validate-address,action-stock-move-method-view-direction"
		  readonlyIf="typeSelect != 2 || statusSelect == 1"/>
  </grid>
    
  <grid name="stock-move-out-grid" title="Stock moves" model="com.axelor.apps.stock.db.StockMove" orderBy="-estimatedDate">
    <toolbar>
      <button name="printStockMoveGridBtn" title="Print StockMove(s)" onClick="action-print-stock-move" icon="fa-print"/>
			<button name="printPickingStockMoveGridBtn" title="Print Picking StockMove(s)" onClick="action-print-picking-stock-move" icon="fa-print"/>
    <button name="seeStockMoveLinesBtn" title="See stock move lines" onClick="action-stock-move-view-stock-move-line" icon="fa-tasks"/>
    	</toolbar>
		<field name="stockMoveSeq" width="120">
			<hilite color="warning" strong="true" if="pickingIsEdited"/>
		</field>
    <field name="company" form-view="company-form" grid-view="company-grid"/>
        <field name="fromStockLocation" form-view="stock-location-form" grid-view="stock-location-grid"/>
    <field name="partner" form-view="partner-form" grid-view="partner-grid"/>
        <field name="toAddressStr"/>
        <field name="estimatedDate"/>
    <field name="realDate"/>
    <field name="origin" width="120"/>
    <field name="statusSelect"/>
    <field name="fromAddressStr" hidden="true" 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"/>
    <field name="availableStatusSelect">
	  	<hilite strong="true" color="success" if="availableStatusSelect == 1"/>
	  	<hilite strong="true" color="warning" if="availableStatusSelect == 2"/>
	  	<hilite strong="true" color="danger" if="availableStatusSelect == 3"/>
     </field>
     <field name="pickingIsEdited" hidden="true" />
     <field name="typeSelect" hidden="true" />
     <button name="printStockMoveBtn" title="Print" icon="fa-print" onClick="action-print-stock-move" readonlyIf="statusSelect == 1"/>
     <button name="viewDirectionBtn" icon="fa-location-arrow" onClick="action-stock-move-validate-address,action-stock-move-method-view-direction" readonlyIf="typeSelect != 2 || statusSelect == 1"/>
  </grid>
    
  <grid name="stock-move-mass-invoicing-out-grid" title="Stock moves" model="com.axelor.apps.stock.db.StockMove" orderBy="-estimatedDate">
    <field name="stockMoveSeq" width="120"/>
    <field name="fromStockLocation" form-view="stock-location-form" grid-view="stock-location-grid"/>
    <field name="realDate"/>
    <field name="fromAddressStr" hidden="true"/>
    <field name="toAddressStr"/>
    <field name="company" form-view="company-form" grid-view="company-grid" 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"/>
    <field name="partner" form-view="partner-form" grid-view="partner-grid"/>
    <field name="origin" width="120"/>
  </grid>

  <grid name="stock-move-out-availability-req-grid" title="Stock moves" model="com.axelor.apps.stock.db.StockMove" orderBy="-estimatedDate">
    <toolbar>
			<button name="printStockMoveGridBtn" title="Print StockMove(s)" onClick="action-print-stock-move" icon="fa-print"/>
			<button name="printPickingStockMoveGridBtn" title="Print Picking StockMove(s)" onClick="action-print-picking-stock-move" icon="fa-print"/>
    <button name="seeStockMoveLinesBtn" title="See stock move lines" onClick="action-stock-move-view-stock-move-line"/>
    	</toolbar>
    <field name="stockMoveSeq" width="120">
      <hilite color="warning" strong="true" if="availabilityRequest || pickingIsEdited"/>
		</field>
    <field name="fromStockLocation" form-view="stock-location-form" grid-view="stock-location-grid"/>
    <field name="estimatedDate"/>
    <field name="realDate"/>
    <field name="fromAddressStr" hidden="true"/>
    <field name="toAddressStr"/>
    <field name="company" form-view="company-form" grid-view="company-grid" 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"/>
    <field name="partner" form-view="partner-form" grid-view="partner-grid"/>
    <field name="statusSelect"/>
    <field name="origin" width="120"/>
    <field name="availableStatusSelect">
	   	<hilite strong="true" color="success" if="availableStatusSelect == 1"/>
	   	<hilite strong="true" color="warning" if="availableStatusSelect == 2"/>
	   	<hilite strong="true" color="danger" if="availableStatusSelect == 3"/>
    </field>
    <field name="availabilityRequest"/>
    <field name="pickingIsEdited" hidden="true" />
    <field name="typeSelect" hidden="true" />
    <button name="printStockMoveBtn" title="Print" icon="fa-print" onClick="action-print-stock-move" readonlyIf="statusSelect == 1"/>
    <button name="viewDirectionBtn" icon="fa-location-arrow" onClick="action-stock-move-validate-address,action-stock-move-method-view-direction" readonlyIf="typeSelect != 2 || statusSelect == 1"/>
  </grid>
    
  <grid name="stock-move-in-grid" title="Stock moves" model="com.axelor.apps.stock.db.StockMove" orderBy="-estimatedDate">
    <toolbar>
      <button name="printStockMoveGridBtn" title="Print StockMove(s)" onClick="action-print-stock-move" icon="fa-print"/>
    <button name="seeStockMoveLinesBtn" title="See stock move lines" onClick="action-stock-move-view-stock-move-line" icon="fa-tasks"/>
    	</toolbar>
		<field name="stockMoveSeq" width="120"/>
		<field name="company" form-view="company-form" grid-view="company-grid"/>
        <field name="toStockLocation"  form-view="stock-location-form" grid-view="stock-location-grid"/>
        <field name="partner"  form-view="partner-form" grid-view="partner-grid"/>
        <field name="fromAddressStr"/>
		<field name="estimatedDate"/>
		<field name="realDate"/>
		<field name="supplierShipmentRef"/>
		<field name="origin" width="120"/>
		<field name="statusSelect"/>
        <field name="toAddressStr" hidden="true" 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"/>
    <field name="typeSelect" hidden="true" />
    <button name="printStockMoveBtn" title="Print" icon="fa-print" onClick="action-print-stock-move" readonlyIf="statusSelect == 1"/>
    <button name="viewDirectionBtn" icon="fa-location-arrow" onClick="action-stock-move-validate-address,action-stock-move-method-view-direction" readonlyIf="typeSelect != 2 || statusSelect == 1"/>
  </grid>
    
  <grid name="stock-move-mass-invoicing-in-grid" title="Stock moves" model="com.axelor.apps.stock.db.StockMove" orderBy="-estimatedDate">
    <field name="stockMoveSeq" width="120"/>
    <field name="toStockLocation"  form-view="stock-location-form" grid-view="stock-location-grid"/>
    <field name="realDate"/>
    <field name="fromAddressStr"/>
    <field name="toAddressStr" hidden="true"/>
    <field name="company" form-view="company-form" grid-view="company-grid" 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"/>
    <field name="partner"  form-view="partner-form" grid-view="partner-grid"/>
    <field name="supplierShipmentRef"/>
    <field name="origin" width="120"/>
  </grid>

    <calendar name="stock-move-calendar" model="com.axelor.apps.stock.db.StockMove" eventStart="estimatedDate"
        eventLength="24" mode="month" colorBy="statusSelect" editable="false" title="Stock moves">
        <field name="name" />
    </calendar>
    


   <form name="stock-move-form" title="Stock move" model="com.axelor.apps.stock.db.StockMove" width="large"
               onLoad="action-group-stock-stockmove-onload" onNew="action-group-stock-stockmove-onnew" onSave="save,action-stock-move-method-update-stocks">
		<toolbar>
			<button showIf="typeSelect == 2 &amp;&amp; !isReversion" name="refreshProductNetMassBtn" title="Refresh the products net mass" onClick="action-stock-move-method-refresh-net-mass"/>
		</toolbar>
		<menubar>
			 <menu name="stockMoveReportsMenu" title="Reports" icon="fa-files-o">
                <item name="printInternalMoveItem" title="Print Internal Move" action="save,action-print-stock-move" readonlyIf="statusSelect == 1" showIf="typeSelect == 1"/>
                <item name="printOutgoingMoveItem" title="Print Outgoing Move" action="save,action-print-stock-move" readonlyIf="statusSelect == 1" showIf="typeSelect == 2"/>
                <item name="printIncomingMoveItem" title="Print Incoming Move" action="save,action-print-stock-move" readonlyIf="statusSelect == 1" showIf="typeSelect == 3"/>
                <item name="printPickingOrderItem" title="Print picking order" action="save,action-print-picking-stock-move" showIf="statusSelect != 1 &amp;&amp; typeSelect == 2"/>
				<item name="printCertificateOfConformityItem" title="Print certificate of conformity" action="save,action-method-print-conformity-certificate" showIf="statusSelect != 1 &amp;&amp; isNeedingConformityCertificate"/>
            </menu>

			<menu name="stockMoveToolsMenu" title="Tools" icon="fa-wrench">
                <item name="viewDirectionItem" title="View Direction" showIf="typeSelect == 2 &amp;&amp; statusSelect!=4" action="action-stock-move-validate-address,action-stock-move-method-view-direction"/>
                <item name="splitIntoItem" title="Split into 2" action="save,action-stock-move-split-into-2" showIf="statusSelect &lt;= 2"/>
                <item name="splitByUnitItem" title="Split by unit" action="save,action-stock-move-method-split-stock-move-lines-unit" showIf="statusSelect &lt;= 2"/>
                <item name="specialSplitItem" title="Special split" action="save,action-stock-move-wizard-special-split" showIf="statusSelect &lt;= 2"/>
                <item name="shipReceiveAllProductsItem" title="Ship/Receive all products" action="save,action-stock-move-ship-recieve-all-products"/>
            </menu>
		</menubar>

		<panel name="mainPanel">
			<panel name="typeSelectPanel" colSpan="9">
				<panel name="statusPanel" colSpan="12">
					<field name="statusSelect" showTitle="false" colSpan="5" widget="NavSelect"/>
					<field name="stockMoveSeq" showTitle="false" colSpan="3" css="label-bold bold large">
					<viewer>
						<![CDATA[
							<dl class="text-left" style="float: none;">
								<dd class="order-subtotal-total" style="margin: 5px 0 !important; border-top: none; text-align: left; word-break:keep-all;">{{record.stockMoveSeq}}</dd>
							</dl>
						]]>
					</viewer>
					</field>
					<panel name="typeFieldAndTagPanel" colSpan="2" itemSpan="12" stacked="true">
			            <field name="typeSelect" title="Type" showIf="!$readonly()" readonlyIf="statusSelect != 1" onChange="action-stock-move-attrs-set-values-typeselect-onchange,action-stock-move-set-default-stock-locations,action-stock-move-attrs-typeselect-change"/>
			            <field name="$typeTags" showTitle="false" hidden="true" showIf="$readonly()" readonlyIf="statusSelect != 1">
			                <viewer depends="typeSelect"><![CDATA[
			                  <h4 class="text-left">
			                    <span class="label label-info" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.typeSelect == 1" x-translate>Internal move</span>
			                    <span class="label label-info" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.typeSelect == 2" x-translate>Outgoing move</span>
			                    <span class="label label-info" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.typeSelect == 3" x-translate>Incoming move</span>
			                  </h4>
			                ]]></viewer>
						</field>
			        </panel>
					<panel name="subTypeSelectPanel" colSpan="2" itemSpan="4" stacked="true">
						<panel name="conformityFieldAndTagPanel" stacked="true">
				          	<field name="conformitySelect" showIf="!$readonly() &amp;&amp; statusSelect == 2 &amp;&amp; toStockLocation != null &amp;&amp; toStockLocation.typeSelect != 3" onChange="action-stock-move-method-change-conformity" />
							<field name="$compliantTags" showTitle="false" hidden="true" showIf="$readonly()" readonlyIf="statusSelect &gt; 2" colSpan="2">
										<viewer depends="conformitySelect, statusSelect"><![CDATA[
											<h4 class="text-left">
												<span class="label label-success" style="margin: 5px 0 0 10px !important; display: inline-table; line-height: initial;" ng-show="record.conformitySelect == 2 && record.statusSelect != 1" x-translate>Compliant</span>
												<span class="label label-important" style="margin: 5px 0 0 10px !important; display: inline-table; line-height: initial;" ng-show="record.conformitySelect == 3 && record.statusSelect != 1" x-translate>Non-compliant</span>
											</h4>
			
										]]></viewer>
							</field>
			            </panel>
						<field name="cancelReason" readonly="true" showIf="cancelReason != null" canView="false"/>
						<field name="isReversion" hidden="true"/>
						<field name="company.accountConfig" hidden="true" if-module="axelor-supplychain" if="__config__.app.isApp('supplychain')"/>
						<field name="company.accountConfig.isManagePassedForPayment" hidden="true" if-module="axelor-supplychain" if="__config__.app.isApp('supplychain')"/>
						<field name="toStockLocation.typeSelect" hidden="true"/>
					</panel>
				</panel>
				<panel colSpan="9">
					<panel name="tagsPanel" colSpan="12">
						<panel name="availableStatusAndInvoiceStatusTagsPanel" colSpan="2" stacked="true" itemSpan="12">
							<field name="availableStatusSelect" showTitle="false" showIf="statusSelect == 2" readonly="true">
								<viewer><![CDATA[
									<h4 class="text-left">
										<span class="label label-success" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.availableStatusSelect == 1" x-translate>Available</span>
										<span class="label label-warning" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.availableStatusSelect == 2" x-translate>Partially available</span>
										<span class="label label-important" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.availableStatusSelect == 3" x-translate>Unavailable</span>
									</h4>
								]]></viewer>
							</field>
							<field name="$invoicingTags" showTitle="false" readonly="true" showIf="statusSelect == 3" if-module="axelor-supplychain" if="__config__.app.isApp('supplychain') &amp;&amp; __config__.app.getApp('account').getActivatePassedForPayment()">
								<viewer depends="$invoiceStatus"><![CDATA[
									<h4 class="text-left">
										<span class="label label-important" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.$invoiceStatus == 0"  x-translate>Not invoiced</span>
										<span class="label label-warning" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.$invoiceStatus == 1" x-translate>Partially invoiced</span>
										<span class="label label-success" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.$invoiceStatus == 2" x-translate>Invoiced</span>
									</h4>
								]]>
								</viewer>
							</field>
						</panel>
						<field name="$availabilityRequestTags" showTitle="false" readonly="true" showIf="$readonly()" colSpan="2">
							<viewer depends="pickingIsEdited,availabilityRequest,statusSelect"><![CDATA[
								<h4 class="text-left">
									<span class="label label-warning" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.pickingIsEdited && record.statusSelect == 2" x-translate>Picking printed</span>
									<span class="label label-success" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.availabilityRequest && record.statusSelect == 2" x-translate>Availability request</span>
								</h4>
							]]></viewer>
						</field>
						<field name="$pfpValidationTags" showTitle="false" colSpan="2" readonly="true" showIf="$readonly()" if-module="axelor-supplychain" if="__config__.app.isApp('supplychain')">
							<viewer depends="pfpValidateStatusSelect"><![CDATA[
	                           	<h4 class="text-left">
									<span class="label label-success" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.company.accountConfig.isManagePassedForPayment && ( record.typeSelect == 3 && !record.isReversion)  && record.pfpValidateStatusSelect == 2" x-translate>PFP authorized</span>
									<span class="label label-important" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.company.accountConfig.isManagePassedForPayment && ( record.typeSelect == 3 && !record.isReversion)  && record.pfpValidateStatusSelect == 3"  x-translate>PFP litigation</span>
								</h4>
							]]>
							</viewer>
						</field>
						<field name="$invoiceStatus" hidden="true" colSpan="12"/>
					</panel>
				</panel>
			</panel>
			<panel name="actionPanel" colSpan="3" itemSpan="12">
				<button name="planBtn" title="Plan" icon="fa-calendar" showIf="statusSelect == 1" onClick="action-group-stock-stockmove-plan-click"/>
				<button name="passedForPaymentAuthorizedBtn" showIf="company.accountConfig.isManagePassedForPayment &amp;&amp; ( typeSelect == 3 &amp;&amp; !isReversion) &amp;&amp; pfpValidateStatusSelect != 2" title="PFP authorized" onClick="save,action-stock-move-record-pfp-validate,save" if-module="axelor-supplychain" if="__config__.app.isApp('supplychain') &amp;&amp; __config__.app.getApp('account').getActivatePassedForPayment()"/>
				<button name="refusalToPayLitigationBtn" showIf="company.accountConfig.isManagePassedForPayment &amp;&amp; ( typeSelect == 3 &amp;&amp; !isReversion) &amp;&amp; pfpValidateStatusSelect != 3" title="PFP litigation" onClick="save,action-stock-move-record-pfp-refusal-to-pay,save" if-module="axelor-supplychain" if="__config__.app.isApp('supplychain') &amp;&amp; __config__.app.getApp('account').getActivatePassedForPayment()"/>
				<button name="realizeBtn" title="Realize" icon="fa-check" showIf="statusSelect == 2" prompt="Are you sure you want to realize this stock move?" onClick="action-group-stock-stockmove-realize-click"/>
				<button name="generateInvoiceBtn" title="Generate invoice" icon="fa-file-o" onClick="save,action-supplychain-stock-move-method-invoicing-wizard" if-module="axelor-supplychain" showIf="statusSelect == 3 &amp;&amp; typeSelect &gt; 1" if="__config__.app.isApp('supplychain') &amp;&amp; __config__.app.getApp('supplychain').getGenerateInvoiceFromStockMove()"/>
				<button name="generateReversionBtn" title="Generate reversion" icon="fa-undo" onClick="save,action-stock-move-method-generate-reversion" showIf="statusSelect == 3 &amp;&amp; !isReversion"/>
				<button name="cancelBtn" title="Cancel" icon="fa-times-circle" css="btn-danger" showIf="id != null &amp;&amp; statusSelect &gt; 1 &amp;&amp; statusSelect &lt; 4" onClick="action-group-stock-stockmove-cancel-click"/>
				<button name="draftBtn" title="Draft" showIf="statusSelect == 4" onClick="action-stock-move-method-draft"/>
			</panel>

			<panel name="internalMovePanel" showIf="typeSelect == 1" colSpan="12" itemSpan="3">
				<field name="company" readonlyIf="statusSelect != 1" onChange="action-stock-move-group-onchange-company" canEdit="false" grid-view="company-grid" form-view="company-form"/>
                <field name="fromStockLocation"  canEdit="false" domain="self.company = :company" onChange="action-stock-move-group-from-location-onchange" grid-view="stock-location-grid" form-view="stock-location-form" readonlyIf="statusSelect != 1"/>
                <field name="toStockLocation" canEdit="false" domain="self.company = :company" onChange="action-stock-move-group-to-location-onchange" grid-view="stock-location-grid" form-view="stock-location-form" readonlyIf="statusSelect != 1"/>
                <field name="filterOnAvailableProducts" hidden="true" widget="boolean-switch" onChange="action-stock-move-method-update-stock-move-line"/>
                <field name="estimatedDate" readonlyIf="(statusSelect != 1 &amp;&amp; statusSelect != 2) || pickingIsEdited"/>
                <field name="fromAddress" onSelect="action-stock-move-attrs-domain-address" onChange="action-stock-move-method-set-addresses-str" readonlyIf="statusSelect == 3 || statusSelect == 4" form-view="address-partner-address-form"/>
                <field name="toAddress" onSelect="action-stock-move-attrs-domain-address" onChange="action-stock-move-method-set-addresses-str,action-stock-move-record-ispm-field" readonlyIf="statusSelect == 3 || statusSelect == 4" form-view="address-partner-address-form"/>
                <static name="deliveryAddressText" hidden="true" colSpan="12">
                	<![CDATA[<span class='label label-warning'>Warning : Delivery address is missing.</span>]]></static>
                <field name="exTaxTotal" css="order-subtotal" showIf="statusSelect &gt; 1" readonly="true" showTitle="false">
	                <viewer><![CDATA[

						<dl class="dl-horizontal" style="float: none;">
							<dt class="order-subtotal-total" style="border-top: none; text-align: left;" x-translate>Total W.T.</dt>
							<dd class="order-subtotal-total" style="border-top: none; text-align: left;">{{record.exTaxTotal}}</dd>
						</dl>
	                    ]]>
	                </viewer>
				</field>

				<field name="fromAddressStr" hideIf="statusSelect &gt; 2" colOffset="3" readonlyIf="statusSelect &gt; 2" height="3">
					<viewer>{{record.fromAddressStr}}</viewer>
				</field>
				<field name="toAddressStr" hideIf="statusSelect &gt; 2" readonlyIf="statusSelect &gt; 2" height="3">
					<viewer>{{record.toAddressStr}}</viewer>
				</field>
			</panel>

			<panel name="outgoingMovePanel" showIf="typeSelect == 2" itemSpan="3" colSpan="12">
				<field name="company" readonlyIf="statusSelect != 1" onChange="action-stock-move-group-onchange-company" canEdit="false" grid-view="company-grid" form-view="company-form"/>
				<field name="partner" canEdit="false" domain="self.isContact = false AND :company member of self.companySet" readonlyIf="statusSelect != 1" onChange="action-stock-move-group-partner-onchange" grid-view="partner-grid" form-view="partner-form"/>
				<field name="fromStockLocation" canEdit="false" domain="self.company = :company" onChange="action-stock-move-group-from-location-onchange" readonlyIf="statusSelect != 1" grid-view="stock-location-grid" form-view="stock-location-form"/>
				<field name="toAddress" onSelect="action-stock-move-attrs-domain-address" onChange="action-stock-move-method-set-addresses-str,action-stock-move-record-ispm-field" readonlyIf="statusSelect == 3 || statusSelect == 4" form-view="address-partner-address-form"/>
				 <static name="deliveryAddressText" hidden="true" colSpan="12">
                	<![CDATA[<span class='label label-warning'>Warning : Delivery address is missing.</span>]]></static>
				<field name="estimatedDate" readonlyIf="(statusSelect != 1 &amp;&amp; statusSelect != 2) || pickingIsEdited"/>
                <panel stacked="true">
                <field name="filterOnAvailableProducts" hidden="true" widget="boolean-switch" onChange="action-stock-move-method-update-stock-move-line"/>
                <field name="availabilityRequest" hidden="true"  widget="boolean-switch" if="__config__.app.getApp('stock').isSeparateShipmentOperations" showIf="!isReversion &amp;&amp; statusSelect == 2" readonlyIf="_userType == null || _userType == 'Sender' || ( pickingIsEdited &amp;&amp; availabilityRequest)" onChange="action-stock-move-group-available-qty-onchange"/>
			</panel>
            <field name="pickingIsNotEditedSpacer" hidden="true" if="!__config__.app.getApp('stock').isSeparateShipmentOperations"/>
            <field name="pickingIsEdited" hidden="true"  widget="boolean-switch" if="__config__.app.getApp('stock').isSeparateShipmentOperations" showIf="!isReversion &amp;&amp; typeSelect==2  &amp;&amp; statusSelect == 2" readonlyIf="_userType == null || _userType == 'Salesperson'" onChange="action-stock-move-picking-is-edited-onchange, save"/>

            <panel name="addressStringPanel" stacked="true" itemSpan="12">
				<field name="toAddressStr" height="3" hideIf="statusSelect &gt; 2" >
					<viewer>{{record.toAddressStr}}</viewer>
				</field>

				<field name="exTaxTotal" css="order-subtotal" showIf="statusSelect &gt; 1" readonly="true" showTitle="false">
                      <viewer>
                          <![CDATA[
                              <dl class="dl-horizontal" style="float: none;">
                                  <dt class="order-subtotal-total" style="border-top: none; text-align: left;" x-translate>Total W.T.</dt>
                                  <dd class="order-subtotal-total" style="border-top: none; text-align: left;">{{record.exTaxTotal}}</dd>
                              </dl>
                          ]]>
                      </viewer>
                  </field>
				</panel>
			</panel>

            <panel name="incomingMovePanel" showIf="typeSelect == 3" itemSpan="3" colSpan="12">
				<field name="company" readonlyIf="statusSelect != 1" onChange="action-stock-move-group-onchange-company" canEdit="false" grid-view="company-grid" form-view="company-form"/>
				<field name="partner" canEdit="false" domain="self.isContact = false AND :company member of self.companySet" readonlyIf="statusSelect != 1" onChange="action-stock-move-group-partner-onchange" grid-view="partner-grid" form-view="partner-form"/>
            	<field name="toStockLocation" canEdit="false" domain="self.company = :company" onChange="action-stock-move-group-to-location-onchange" readonlyIf="statusSelect != 1" grid-view="stock-location-grid" form-view="stock-location-form"/>
                <field name="fromAddress" onSelect="action-stock-move-attrs-domain-address" onChange="action-stock-move-method-set-addresses-str" readonlyIf="statusSelect == 3 || statusSelect == 4" form-view="address-partner-address-form"/>
            	<field name="estimatedDate" readonlyIf="(statusSelect != 1 &amp;&amp; statusSelect != 2) || pickingIsEdited" />
            	<field name="supplierShipmentDate" showIf="!isReversion" />
           		<field name="supplierShipmentRef" showIf="!isReversion" />
            	<panel stacked="true" itemSpan="12">
					<field name="fromAddressStr" height="3" hideIf="statusSelect &gt; 2" >
                       <viewer>{{record.fromAddressStr}}</viewer>
					</field>
                    <field name="exTaxTotal" css="order-subtotal" showIf="statusSelect &gt; 1" readonly="true" showTitle="false">
						<viewer><![CDATA[
                              <dl class="dl-horizontal" style="float: none;">
                                  <dt class="order-subtotal-total" style="border-top: none; text-align: left;" x-translate>Total W.T.</dt>
                                  <dd class="order-subtotal-total" style="border-top: none; text-align: left;">{{record.exTaxTotal}}</dd>
                              </dl>
                          ]]>
						</viewer>
                 	 </field>
				</panel>
			</panel>
		</panel>

		<panel-tabs name="mainPanelTab">
			<panel-related name="stockMoveLineListPanel" field="stockMoveLineList" title="Stock move lines" height="12"
              readonlyIf="company == null || fromStockLocation == null || statusSelect == 3" onChange="action-stock-move-line-change-group"
              onNew="action-stock-move-line-record-filter-on-available-products" grid-view="stock-move-line-grid" form-view="stock-move-line-form" canMove="true"
              orderBy="sequence" canRemove="!(statusSelect == 2 &amp;&amp; pickingIsEdited)" canNew="true" />
			<panel name="freightCarrierPanel" title="Freight Carrier" itemSpan="12">
                <panel itemSpan="3">
					<field name="shipmentMode" canEdit="false" form-view="shipment-mode-grid" grid-view="shipment-mode-grid" />
                    <field name="freightCarrierMode" canEdit="false" domain="self.shipmentMode = :shipmentMode"  form-view="freight-carrier-mode-form" grid-view="freight-carrier-mode-grid" onChange="action-stock-move-record-freight-carrier" />
                    <field name="carrierPartner" domain="self.isCarrier = TRUE AND (self.companySet IS EMPTY OR :company MEMBER OF self.companySet)" form-view="partner-form" grid-view="partner-grid" canEdit="false"/>
                    <field name="forwarderPartner" domain=":company MEMBER OF self.companySet" form-view="partner-form" grid-view="partner-grid" canEdit="false" />
				</panel>

               <panel itemSpan="3">
					<field name="incoterm" form-view="incoterm-form" grid-view="incoterm-grid" canEdit="false" />
					<field name="trackingNumber" />
                    <field name="modeOfTransport" />
                    <field name="deliveryCondition" height="3" showIf="typeSelect == 2 &amp;&amp; originTypeSelect &amp;&amp; originTypeSelect=='com.axelor.apps.sale.db.SaleOrder'"/>
				</panel>

               <panel itemSpan="3">
					<field name="numOfPackages" readonlyIf="statusSelect == 3 || statusSelect == 4" />
                    <field name="numOfPalettes" readonlyIf="statusSelect == 3 || statusSelect == 4" />
                    <field name="grossMass" readonlyIf="statusSelect == 3 || statusSelect == 4" />
                    <panel name="freightDetailPanel" stacked="true" >
                    	<field name="isIspmRequired" showIf="!$readonly()"/>
                        <field name="$IspmTag" showTitle="false" showIf="$readonly()">
                           <viewer>
                               <![CDATA[
                                   <h4 class="text-left">
                                       <span class="label label-important" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.isIspmRequired" x-translate>ISPM standard required</span>
                                   </h4>
                               ]]>
                           </viewer>
                        </field>
                    </panel>
               </panel>

               <panel itemSpan="3">
	               <field name="isNeedingConformityCertificate" onChange="action-stock-move-record-unset-certificate-signed"/>
	               <field name="signatoryUser" canEdit="false" />
	               <field name="isConformityCertifSigned" showIf="isNeedingConformityCertificate" onChange="action-stock-move-record-is-conformity-certif-signed-onchange"/>
	               <field name="electronicSignature" showIf="isConformityCertifSigned" widget="Image"/>
	            </panel>
            </panel>
            <panel name="notePanel" title="Note" colSpan="12">
				<panel name="stockMoveCommentsPanel" title="Comment to display on stock move" colSpan="12">
					<field name="note" widget="Html" x-lite="true" colSpan="12" showTitle="false"/>
				</panel>
				<panel name="pickingOrderCommentsPanel" title="Comment to display on picking order" colSpan="12">
					<field name="pickingOrderComments" widget="html" colSpan="12" showTitle="false"/>
				</panel>
			</panel>
            <panel name="linksPanel" title="Links" if-module="axelor-supplychain" if="__config__.app.isApp('supplychain')" showIf="id">
				<panel name="OriginPanel" itemSpan="3" colSpan="12">
					<field name="originTypeSelect" title="Origin" widget="RefSelect" x-related="originId" readonly="true"/>
                    <field name="reversionOriginStockMove" readonly="true" grid-view="stock-move-form" form-view="stock-move-form" showIf="reversionOriginStockMove" />
                    <field name="invoiceSet" readonly="true" grid-view="invoice-grid" form-view="invoice-form" canEdit="false" showIf="invoiceSet" colSpan="12"/>
                    <button name="backOrderBtn" title="Backorder" colSpan="3" hidden="true" showIf="backorderId" onClick="action-stock-move-view-back-order"/>
                    <field name="backorderId" hidden="true"/>
				</panel>
				<field name="fullySpreadOverLogisticalFormsFlag" showIf="id &amp;&amp; typeSelect == 2"/>
                <panel-dashlet name="ReversionPanel" action="action-stock-move-view-reversion" title="Reversions" colSpan="12" showIf="!isReversion"/>
                <panel-dashlet name="logisticalFormsListPanel" action="action-stock-move-view-logistical-forms" title="Logistical forms" colSpan="12" showIf="id &amp;&amp; typeSelect == 2"/>
                <panel-dashlet name="viewAccountMovesPanel" action="action-stock-move-view-account-moves" colSpan="12" title="Moves" if-module="axelor-supplychain"/>
			</panel>
            
			<panel name="datesPanel" title="Dates">
            	<field name="realDate" colSpan="4"/>
                <field name="reservationDateTime" colSpan="4" if="(__config__.app.isApp('supplychain') &amp;&amp; __config__.app.getApp('supplychain')?.getManageStockReservation())"/>
                <field name="pickingEditDate" hidden="true" showIf="pickingEditDate" readonly="true"/>
			</panel>

            <panel name="configPanel" title="Configuration" itemSpan="6">
				<field name="isWithBackorder"/>
                <field name="printingSettings" onSelect="action-stock-move-method-filter-printing-settings" canEdit="false"/>
                <field name="isWithReturnSurplus" showIf="typeSelect == 3"/>
                <field name="$reservedQtyChanged" type="boolean" hidden="true"/>
                <panel name="plannedStockMovePanel" colSpan="12" showIf="typeSelect == 2">
					<field name="plannedStockMoveAutomaticMail" readonlyIf="statusSelect == 3"/>
                    <field name="realStockMoveAutomaticMail"/>
                </panel>
                <field name="fromStockLocation" showIf="typeSelect == 3" canEdit="false" domain="self.company = :company" onChange="action-stock-move-group-from-location-onchange" grid-view="stock-location-grid" form-view="stock-location-form" readonlyIf="statusSelect != 1"/>
                <field name="toStockLocation" showIf="typeSelect == 2" canEdit="false" domain="self.company = :company" onChange="action-stock-move-group-to-location-onchange" grid-view="stock-location-grid" form-view="stock-location-form" readonlyIf="statusSelect != 1"/>
                <panel name="realStockMovePanel" colSpan="12" showIf="typeSelect == 2">
                    <field name="plannedStockMoveMessageTemplate" readonlyIf="statusSelect == 3" requiredIf="plannedStockMoveAutomaticMail" showIf="plannedStockMoveAutomaticMail" grid-view="template-grid" form-view="template-form"/>
                    <field name="realStockMoveMessageTemplate" requiredIf="realStockMoveAutomaticMail" showIf="realStockMoveAutomaticMail" grid-view="template-grid" form-view="template-form"/>
                </panel>
            </panel>
            
        </panel-tabs>
        <panel-mail name="mailPanel">
			<mail-messages limit="4"/>
			<mail-followers/>
		</panel-mail>
    </form>


	<form name="popup-stock-move-backorder-form" title="Manage backorder?" model="com.axelor.apps.stock.db.StockMove" width="large">
		<panel name="mainPanel" colSpan="12">
			<field name="$msg" showTitle="false" colOffset="3" colSpan="6" readonly="true">
				<viewer depends="typeSelect,fromStockLocation.typeSelect">
					<![CDATA[
            <h5 class="text-left">
              <span ng-show="record.typeSelect == 2 || (record.typeSelect == 1 &amp;&amp; record.fromStockLocation.typeSelect == 1)" x-translate>Do you want to generate backorder for not delivered quantities?</span>
              <span ng-show="record.typeSelect == 3 || (record.typeSelect == 1 &amp;&amp; record.fromStockLocation.typeSelect == 3)" x-translate>Do you want to generate backorder for not received quantities?</span>
            </h5>
          ]]>
				</viewer>
			</field>

      <button name="yesBtn" title="Yes" onClick="action-stock-move-popup-backorder-record-set-backorder,save,action-stock-move-method-realize,close" icon="fa-check" colOffset="3" colSpan="3"/>
      <button name="noBtn" title="No" onClick="action-stock-move-method-realize,close" icon="fa-times" css="btn-danger" colSpan="3"/>

      <field name="typeSelect" hidden="true"/>
      <field name="fromStockLocation" hidden="true"/>
      <field name="isWithBackorder" hidden="true"/>
		</panel>
	</form>

	<action-record name="action-stock-move-popup-backorder-record-set-backorder" model="com.axelor.apps.stock.db.StockMove">
		<field name="isWithBackorder" expr="true"/>
	</action-record>

    <form name="stock-move-wizard-special-split-form" title="Special split" model="com.axelor.apps.base.db.Wizard">
    	<panel name="mainPanel" colSpan="12">
	        <field name="splitQty" type="decimal" widget="Decimal" title="Split in Qty of" x-scale="2" x-precision="18" colSpan="6"/>
	        <button name="splitBtn" title="Split" onClick="action-stock-move-method-split-stock-move-lines-special" colSpan="6"/>
        </panel>
    </form>
    
    <form name="stock-move-wizard-stock-per-day" title="Stock Availability" model="com.axelor.apps.base.db.Wizard" 
    	 canSave="false" canDelete="false" canCopy="false" canAttach="false" canNew="false"
    	 onNew="action-stock-move-wizard-stock-per-day-defaults">
    	<toolbar>
			<button icon="fa-play" name="runWizardBtn" title="Run" onClick="action-stock-move-method-open-stock-per-day" readonlyIf="stockFromDate == null || stockToDate == null || stockLocation == null" />
    	</toolbar>
    	<panel name="mainPanel">
    		<field name="stockFromDate" title="From Date" type="date" required="true"/>
    		<field name="stockToDate" title="To Date" type="date" required="true"/>
	        <field name="stockLocation" title="Stock location" type="many-to-one" target="com.axelor.apps.stock.db.StockLocation" required="true" />
	        <field name="productSet" title="Products" type="many-to-many" target="com.axelor.apps.base.db.Product" colSpan="12" canEdit="false"/>
        </panel>
    </form>
    
    <action-view title="Special split" model="com.axelor.apps.base.db.Wizard" name="action-stock-move-wizard-special-split">
	    <view type="form" name="stock-move-wizard-special-split-form"/>
	    <view-param name="popup" value="reload"/>
        <view-param name="forceEdit" value="true"/>
        <view-param name="show-toolbar" value="false"/>
	    <view-param name="show-confirm" value="false" />
   	  	<view-param name="popup-save" value="false"/>
	    <view-param name="width" value="800" />
	    <context name="stockMoveLineList" expr="eval:stockMoveLineList.findAll{ it.selected }" if="stockMoveLineList != null" />
	    <context name="stockMove" expr="eval: __this__"/>
	</action-view>

  <action-view name="action-stock-move-view-back-order" title="Backorder Stock Move" model="com.axelor.apps.stock.db.StockMove">
    <view type="form" name="stock-move-form"/>
    <view-param name="popup" value="reload"/>
    <view-param name="forceEdit" value="true"/>
    <view-param name="show-toolbar" value="false"/>
    <view-param name="show-confirm" value="false" />
    <view-param name="popup-save" value="true"/>
    <view-param name="width" value="200"/>
    <context name="_showRecord" expr="eval: backorderId"/>
  </action-view>

	<form name="stock-move-split-into-2-form" title="Split into 2" model="com.axelor.apps.stock.db.StockMove" width="large">
    	<panel name="mainPanel">
	        <panel-related name="stockMoveLineListPanel" field="stockMoveLineList" colSpan="12" grid-view="stock-move-line-split-grid" canEdit="true" form-view="stock-move-line-form"/>
	        <button name="splitBtn" title="Split" onClick="action-stock-move-method-split-into-2"/>
        </panel>
    </form>
    
    <action-method name="action-stock-move-method-add-subline">
    	<call class="com.axelor.apps.supplychain.web.StockMoveController" method="addSubLines"/>
    </action-method>
    
    <action-method name="action-stock-move-method-remove-subline">
    	<call class="com.axelor.apps.supplychain.web.StockMoveController" method="removeSubLines"/>
    </action-method>
    
    <action-method name="action-stock-move-method-compute">
    	<call class="com.axelor.apps.stock.web.StockMoveController" method="compute"/>
    </action-method>
    
    <action-method name="action-stock-move-method-set-available-status">
    	<call class="com.axelor.apps.stock.web.StockMoveController" method="setAvailableStatus"/>
    </action-method>
    
    <action-method name="action-stock-move-method-update-stock-move-line">
      <call class="com.axelor.apps.stock.web.StockMoveController" method="updateMoveLineFilterOnAvailableproduct"/>
    </action-method>
    
    <action-view title="Split into 2" model="com.axelor.apps.stock.db.StockMove" name="action-stock-move-split-into-2">
	    <view type="form" name="stock-move-split-into-2-form"/>
	    <view-param name="popup" value="reload"/>
	    <view-param name="forceEdit" value="true"/> 
	    <view-param name="show-toolbar" value="false"/>
	    <view-param name="show-confirm" value="false" />
   	  	<view-param name="popup-save" value="false"/>
	    <view-param name="width" value="200" />
	    <context name="_showRecord" expr="eval: __this__.id" />
	</action-view>

    <!-- <action-attrs name="action-stock-move-attrs-title-realize-button">
    	<attribute name="title" for="realize" expr="eval: (fromStockLocation) ? ((fromStockLocation?.typeSelect != 1 &amp;&amp; toStockLocation?.typeSelect == 1) ? 'Receive' : 'Send') : ((toStockLocation?.typeSelect == 1) ? 'Receive' : 'Send')"/>
    </action-attrs> -->
    
    <action-attrs name="action-stock-move-attrs-filter-on-available-products">
    	<attribute name="hidden" for="filterOnAvailableProducts" expr="eval: statusSelect &gt; 1 || (fromStockLocation != null &amp;&amp; fromStockLocation.typeSelect == 3)"/>
    </action-attrs>
    
    <action-group name="action-group-stock-stockmove-onnew">
    	<action name="action-stock-move-record-new"/>
        <action name="action-stock-move-record-mail-configuration"/>
    	<action name="action-stock-move-attrs-typeselect-change"/>
        <action name="action-stock-move-generate-invoice-button"/>
		<action name="action-stock-move-hide-reserved-qty"/>
		<action name="action-record-supply-chain-stock-move-onnew"  if="__parent__?._model == 'com.axelor.apps.account.db.Invoice'"/>
		<action name="action-attrs-supply-chain-stock-move-onnew" if="__parent__?._model == 'com.axelor.apps.account.db.Invoice'"/>
		<action name="action-stock-move-attrs-filter-on-available-products"/>
    </action-group>

    <action-group name="action-group-stock-stockmove-onload">
        <action name="action-stock-move-attrs-typeselect-change"/>
        <action name="action-stock-move-generate-invoice-button"/>
        <action name="action-stock-move-hide-reserved-qty"/>
        <action name="action-stock-move-attrs-hide-avg-price"/>
        <action name="action-stock-move-attrs-set-required-shipment-supplier-details"/>
		<action name="action-stock-move-attrs-filter-on-available-products"/>
		<action name="action-supplychain-stock-move-record-set-invoice-status"/>
		<action name="action-stock-move-attrs-check-delivery-address" if="partner?.partnerAddressList?.size() > 1" />
    </action-group>
    
    <action-group name="action-stock-move-line-change-group">
    	<action name="action-stock-move-method-remove-subline"/>
    	<action name="save" if="stockMoveLineList.find{it->it.lineTypeSelect == 2 &amp;&amp; (it.version != null || it.id == null)} != null" />
    	<action name="action-stock-move-method-add-subline"/>
    	<action name="action-stock-move-method-compute"/>
    	<action name="action-stock-move-line-method-change-conformity"/>
    	<action name="action-stock-move-method-set-available-status"/>
    </action-group>
    
	<action-group name="action-group-stock-stockmove-plan-click">
	 	<action name="save"/>
	  	<action name="action-stock-move-method-plan"/>
	  	<action name="save"/>
	</action-group>
    
	<action-group name="action-group-stock-stockmove-realize-click">
	  	<action name="save"/>
    	<action name="action-stock-move-check-stock-move-line-real-qty"/>
    	<action name="action-stock-move-validate-shipment-informations" if="typeSelect == __repo__(StockMove).TYPE_INCOMING &amp;&amp; !isReversion"/>
	    <action name="action-stock-move-method-manage-backorder" if="stockMoveLineList.any{it?.realQty.compareTo(it?.qty) != 0} &amp;&amp; !isWithBackorder"/> <!-- first condition = is it necessary to split SM -->
	    <action name="action-stock-move-method-realize" if="!stockMoveLineList.any{it?.realQty.compareTo(it?.qty) != 0} || isWithBackorder"/>
    	<action name="save"/>
	</action-group>

  <action-method name="action-stock-move-method-manage-backorder">
    <call class="com.axelor.apps.stock.web.StockMoveController" method="manageBackorder"/>
  </action-method>

	<action-group name="action-stock-move-group-to-location-onchange">
		<action name="action-stock-move-set-to-address"/>
        <action name="action-stock-move-method-set-addresses-str"/>
	</action-group>

	<action-group name="action-stock-move-group-from-location-onchange">
		<action name="action-stock-move-set-from-address"/>
		<action name="action-stock-move-method-set-addresses-str"/>
		<action name="action-stock-move-hide-reserved-qty"/>
	</action-group>

	<action-group name="action-stock-move-group-partner-onchange">
		<action name="action-stock-move-record-partner-delivery-informations"/>
        <action name="action-stock-move-record-auto-mail"/>
		<action name="action-stock-move-record-ispm-field"/>
	   	<action name="action-stock-move-record-partner-shipment-informations"/>
	   	<action name="action-stock-move-attrs-check-delivery-address" if="partner?.partnerAddressList?.size() > 1"/>
	</action-group>

    <action-group name="action-stock-move-group-onchange-company">
        <action name="action-stock-move-record-update-info-company"/>
        <action name="action-stock-move-record-mail-configuration"/>
        <action name="action-stock-move-record-set-stock-locations-company-onchange"/>
    </action-group>

    <action-group name="action-stock-move-group-available-qty-onchange">
        <action name="action-stock-move-method-verify-product-stock"/>
        <action name="action-stock-move-validate-check-reservation"/>
        <action name="action-stock-move-method-allocate-all"/>
    </action-group>

     <action-attrs name="action-stock-move-attrs-typeselect-change">
    	<attribute name="title" for="stockMoveInformationPanel" expr="eval: com.axelor.i18n.I18n.get('Internal move information')" if="typeSelect == 1"/>
    	<attribute name="title" for="stockMoveInformationPanel" expr="eval: com.axelor.i18n.I18n.get('Outgoing move information')" if="typeSelect == 2"/>
    	<attribute name="title" for="stockMoveInformationPanel" expr="eval: com.axelor.i18n.I18n.get('Incoming move information')" if="typeSelect == 3"/>
    	<attribute name="title" for="stockMoveLineList" expr="eval: com.axelor.i18n.I18n.get('Internal move lines')" if="typeSelect == 1"/>
    	<attribute name="title" for="stockMoveLineList" expr="eval: com.axelor.i18n.I18n.get('Outgoing move lines')" if="typeSelect == 2"/>
    	<attribute name="title" for="stockMoveLineList" expr="eval: com.axelor.i18n.I18n.get('Incoming move lines')" if="typeSelect == 3"/>
    </action-attrs>
	
	<action-attrs name="action-stock-move-attrs-set-values-typeselect-onchange">
		<attribute name="value" for="isWithBackorder" expr="eval:company?.stockConfig?.isWithBackorder" if="company != null"/>
    	<attribute name="value" for="isWithReturnSurplus" expr="eval:company?.stockConfig?.isWithReturnSurplus" if="company != null &amp;&amp; typeSelect == 3"/>
    	<attribute name="value" for="isWithReturnSurplus" expr="eval:false" if="typeSelect != 3"/>
	</action-attrs>
	
	<action-attrs name="action-stock-move-attrs-set-required-shipment-supplier-details">
		<attribute name="required" for="supplierShipmentRef" expr="eval: __config__.app.getApp('stock').isRequiredShipmentSupplierDetails &amp;&amp; statusSelect == 3 &amp;&amp; typeSelect == 3 &amp;&amp; !isReversion"/>
		<attribute name="required" for="supplierShipmentDate" expr="eval: __config__.app.getApp('stock').isRequiredShipmentSupplierDetails &amp;&amp; statusSelect == 3 &amp;&amp; typeSelect == 3 &amp;&amp; !isReversion"/>
	</action-attrs>

    <action-attrs name="action-stock-move-generate-invoice-button">
        <attribute name="title" for="generateInvoiceBtn" expr="eval: com.axelor.i18n.I18n.get('Generate refund')"
            if="isReversion" />
    </action-attrs>

    <action-attrs name="action-stock-move-attrs-domain-address">
		<attribute name="domain" for="fromAddress" expr="eval: &quot;self.id IN (${(partner?.partnerAddressList?.findAll().collect{it.address.id}+[null]).join(',')})&quot;" if="typeSelect == 3 &amp;&amp; isReversion == false"/>
		<attribute name="domain" for="fromAddress" expr="eval: &quot;self.id IN (${(partner?.partnerAddressList?.findAll{it.isDeliveryAddr}.collect{it.address.id}+[null]).join(',')})&quot;" if="!(typeSelect == 3 &amp;&amp; isReversion == false)"/>
		<attribute name="domain" for="toAddress" expr="eval: &quot;self.id IN (${(partner?.partnerAddressList?.findAll{it.isDeliveryAddr}.collect{it.address.id}+[null]).join(',')})&quot;" />
    </action-attrs>
    
    <action-attrs name="action-stock-move-wizard-stock-per-day-defaults">
    	<attribute name="value" for="stockFromDate" expr="eval:__date__"/>
    	<attribute name="value" for="stockToDate" expr="eval:__date__"/>
    </action-attrs>
	
	<action-attrs name="action-stock-move-hide-reserved-qty">
        <attribute for="stockMoveLineList.reservedQty" name="hidden" expr="eval: typeSelect != 2"/>
        <attribute for="stockMoveLineList.requestedReservedQty,reservationDateTime" name="hidden" expr="eval: typeSelect == 3"/>
        <attribute name="hidden" for="stockMoveLineList.availableStatus" expr="eval: typeSelect == 3"/>
	</action-attrs>

    <action-attrs name="action-stock-move-attrs-hide-avg-price">
        <attribute name="hidden" for="stockMoveLineList.wapPrice" expr="eval: typeSelect != 3 || !isReversion || !reversionOriginStockMove"/>
    </action-attrs>
	
    <action-method name="action-stock-move-method-draft" model="com.axelor.apps.stock.db.StockMove">
    	<call class="com.axelor.apps.stock.web.StockMoveController" method="draft"/>
    </action-method>
    
    
    <action-record name="action-stock-move-record-new" model="com.axelor.apps.stock.db.StockMove">
        <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="statusSelect" expr="eval: 1"/>
	    <field name="estimatedDate" expr="eval:__config__.app.getTodayDate()"/>
	    <field name="typeSelect" expr="eval: _typeSelect"/>
	    <field if="_typeSelect == __repo__(StockMove).TYPE_INCOMING" name="toStockLocation" expr="eval:__repo__(StockConfig).all().filter('company.id = ?',__user__.activeCompany?.id).fetchOne()?.receiptDefaultStockLocation"/>
	    <field if="_typeSelect == __repo__(StockMove).TYPE_INCOMING" name="fromStockLocation" expr="eval:__repo__(StockConfig).all().filter('company.id = ?',__user__.activeCompany?.id).fetchOne()?.supplierVirtualStockLocation"/>
	    <field if="_typeSelect == __repo__(StockMove).TYPE_OUTGOING" name="fromStockLocation" expr="eval:__repo__(StockConfig).all().filter('company.id = ?',__user__.activeCompany?.id).fetchOne()?.pickupDefaultStockLocation"/>
	    <field if="_typeSelect == __repo__(StockMove).TYPE_OUTGOING" name="toStockLocation" expr="eval:__repo__(StockConfig).all().filter('company.id = ?',__user__.activeCompany?.id).fetchOne()?.customerVirtualStockLocation"/>
	    <field name="printingSettings" expr="eval: __user__.activeCompany?.printingSettings" if="__user__.activeCompany != null"/>
	    <field name="isWithBackorder" expr="eval:__repo__(StockConfig).all().filter('company.id = ?',__user__.activeCompany?.id).fetchOne()?.isWithBackorder"  if="__user__.activeCompany != null"/>
	    <field name="isWithReturnSurplus" expr="eval:__repo__(StockConfig).all().filter('company.id = ?',__user__.activeCompany?.id).fetchOne()?.isWithReturnSurplus" if="__user__.activeCompany != null &amp;&amp; _typeSelect == 3"/>
	    <field name="isWithReturnSurplus" expr="eval:false" if="_typeSelect != 3"/>
	    <field name="_userType" expr="eval: _userType" />
      <!-- force boolean conversion -->
	    <field name="isReversion" expr="eval: _isReversion ?: false"/>
	</action-record>

	<action-record name="action-stock-move-record-auto-mail" model="com.axelor.apps.stock.db.StockMove">
    <field name="plannedStockMoveAutomaticMail" if="_typeSelect == '2' || typeSelect == 2"
      expr="eval: partner?.partnerStockSettingsList?.find{it.company == company}?.plannedStockMoveAutomaticMail"/>
    <field name="plannedStockMoveMessageTemplate" if="_typeSelect == '2' || typeSelect == 2"
      expr="eval: partner?.partnerStockSettingsList?.find{it.company == company}?.plannedStockMoveMessageTemplate"/>
		<field name="realStockMoveAutomaticMail" if="_typeSelect == '2' || typeSelect == 2"
			   expr="eval: partner?.partnerStockSettingsList?.find{it.company == company}?.realStockMoveAutomaticMail"/>
		<field name="realStockMoveMessageTemplate" if="_typeSelect == '2' || typeSelect == 2"
			   expr="eval: partner?.partnerStockSettingsList?.find{it.company == company}?.realStockMoveMessageTemplate"/>
	</action-record>
	
	<action-record name="action-stock-move-record-ispm-field" model="com.axelor.apps.stock.db.StockMove">
		<field name="isIspmRequired" expr="eval: partner?.isIspmRequired || toAddress?.addressL7Country?.isIspmRequired"/>
	</action-record>

	<action-record name="action-stock-move-set-from-address" model="com.axelor.apps.stock.db.StockMove">
		<field name="fromAddress" expr="eval:fromStockLocation?.address" />
	</action-record>
	
	<action-record name="action-stock-move-set-to-address" model="com.axelor.apps.stock.db.StockMove">
		<field name="toAddress" expr="eval:toStockLocation?.address" />
	</action-record>
	
	<action-record name="action-stock-move-set-default-stock-locations" model="com.axelor.apps.stock.db.StockMove">
	    <field if="typeSelect == __repo__(StockMove).TYPE_OUTGOING" name="fromStockLocation" expr="eval:__repo__(StockConfig).all().filter('company.id = ?',company != null ? company.id : __user__.activeCompany?.id).fetchOne()?.pickupDefaultStockLocation"/>
	    <field if="typeSelect == __repo__(StockMove).TYPE_OUTGOING" name="toStockLocation" expr="eval:__repo__(StockConfig).all().filter('company.id = ?',company != null ? company.id : __user__.activeCompany?.id).fetchOne()?.customerVirtualStockLocation"/>
	    <field if="typeSelect == __repo__(StockMove).TYPE_INCOMING" name="toStockLocation" expr="eval:__repo__(StockConfig).all().filter('company.id = ?',company != null ? company.id : __user__.activeCompany?.id).fetchOne()?.receiptDefaultStockLocation"/>
	    <field if="typeSelect == __repo__(StockMove).TYPE_INCOMING" name="fromStockLocation" expr="eval:__repo__(StockConfig).all().filter('company.id = ?',company != null ? company.id : __user__.activeCompany?.id).fetchOne()?.supplierVirtualStockLocation"/>
	</action-record>
	
	<action-record name="action-stock-move-record-partner-delivery-informations" model="com.axelor.apps.stock.db.StockMove">
    	<field name="shipmentMode" expr="eval: partner?.shipmentMode"/>	
    	<field name="freightCarrierMode" expr="eval: partner?.freightCarrierMode"/>
    	<field name="note" expr="eval: partner?.description"/>
	</action-record>

	<action-record name="action-stock-move-record-is-conformity-certif-signed-onchange" model="com.axelor.apps.stock.db.StockMove">
		<field name="electronicSignature" if="!signatoryUser" expr="eval: (__user__?.useSignatureForStock &amp;&amp; isConformityCertifSigned) ? __user__.electronicSignature : null"/>
		<field name="electronicSignature" if="signatoryUser" expr="eval: (signatoryUser?.useSignatureForStock &amp;&amp; isConformityCertifSigned) ? signatoryUser.electronicSignature : null"/>
    <field name="signatoryUser" if="isConformityCertifSigned &amp;&amp; !signatoryUser" expr="eval: __user__"/>
	</action-record>
  
	<action-record name="action-stock-move-picking-is-edited-onchange" model="com.axelor.apps.stock.db.StockMove">
		<field name="pickingEditDate" if="pickingIsEdited" expr="eval: __date__"/>
	</action-record>

	<action-record name="action-stock-move-record-unset-certificate-signed" model="com.axelor.apps.stock.db.StockMove">
		<field name="isConformityCertifSigned" if="!isNeedingConformityCertificate" expr="eval: false"/>
		<field name="electronicSignature" if="!isNeedingConformityCertificate" expr="eval:null"/>
	</action-record>

    <action-record name="action-stock-move-record-mail-configuration" model="com.axelor.apps.stock.db.StockMove">
        <field if="_typeSelect == __repo__(StockMove).TYPE_OUTGOING || typeSelect == __repo__(StockMove).TYPE_OUTGOING" name="plannedStockMoveAutomaticMail" expr="eval:__repo__(StockConfig).all().filter('company.id = ?',__user__.activeCompany?.id).fetchOne()?.plannedStockMoveAutomaticMail"/>
        <field if="_typeSelect == __repo__(StockMove).TYPE_OUTGOING || typeSelect == __repo__(StockMove).TYPE_OUTGOING" name="realStockMoveAutomaticMail" expr="eval:__repo__(StockConfig).all().filter('company.id = ?',__user__.activeCompany?.id).fetchOne()?.realStockMoveAutomaticMail"/>
        <field if="(_typeSelect == __repo__(StockMove).TYPE_OUTGOING || typeSelect == __repo__(StockMove).TYPE_OUTGOING) &amp;&amp; __repo__(StockConfig).all().filter('company.id = ?',__user__.activeCompany?.id).fetchOne()?.plannedStockMoveAutomaticMail" name="plannedStockMoveMessageTemplate" expr="eval:__repo__(StockConfig).all().filter('company.id = ?',__user__.activeCompany?.id).fetchOne()?.plannedStockMoveMessageTemplate"/>
        <field if="(_typeSelect == __repo__(StockMove).TYPE_OUTGOING || typeSelect == __repo__(StockMove).TYPE_OUTGOING) &amp;&amp; __repo__(StockConfig).all().filter('company.id = ?',__user__.activeCompany?.id).fetchOne()?.realStockMoveAutomaticMail" name="realStockMoveMessageTemplate" expr="eval:__repo__(StockConfig).all().filter('company.id = ?',__user__.activeCompany?.id).fetchOne()?.realStockMoveMessageTemplate"/>
        <field if="company == null" name="plannedStockMoveAutomaticMail" expr="eval: false"/>
        <field if="company == null" name="realStockMoveAutomaticMail" expr="eval: false"/>
        <field if="company == null" name="plannedStockMoveMessageTemplate" expr="eval: null"/>
        <field if="company == null" name="realStockMoveMessageTemplate" expr="eval: null"/>
    </action-record>
    
    <action-record name="action-stock-move-record-set-stock-locations-company-onchange" model="com.axelor.apps.stock.db.StockMove">
	    <field if="typeSelect == __repo__(StockMove).TYPE_OUTGOING &amp;&amp; company != null" name="fromStockLocation" expr="eval: company?.getStockConfig()?.getPickupDefaultStockLocation()"/>
	    <field if="typeSelect == __repo__(StockMove).TYPE_OUTGOING &amp;&amp; company != null" name="toStockLocation" expr="eval:company?.getStockConfig()?.getCustomerVirtualStockLocation()"/>
	    <field if="typeSelect == __repo__(StockMove).TYPE_INCOMING &amp;&amp; company != null" name="toStockLocation" expr="eval:company?.getStockConfig()?.getReceiptDefaultStockLocation()"/>
	    <field if="typeSelect == __repo__(StockMove).TYPE_INCOMING &amp;&amp; company != null" name="fromStockLocation" expr="eval:company?.getStockConfig()?.getSupplierVirtualStockLocation()"/>
	    <field name="fromStockLocation,toStockLocation" expr="eval: null" if="company == null"/>
	</action-record>
	
	<action-method name="action-stock-move-method-plan">
		<call class="com.axelor.apps.stock.web.StockMoveController" method="plan"/>
	</action-method>
	
	<action-method name="action-stock-move-method-realize">
		<call class="com.axelor.apps.stock.web.StockMoveController" method="realize"/>
	</action-method>
	
	<action-method name="action-stock-move-method-cancel">
		<call class="com.axelor.apps.stock.web.StockMoveController" method="cancel"/>
	</action-method>
	
	<action-method name="action-supply-chain-method-update-so-on-cancel" if-module="axelor-supplychain">
		<call class="com.axelor.apps.supplychain.web.SaleOrderController" method="updateSaleOrderOnCancel"/>
	</action-method>
	
	<action-method name="action-supply-chain-method-update-po-on-cancel" if-module="axelor-supplychain">
		<call class="com.axelor.apps.supplychain.web.PurchaseOrderController" method="updatePurchaseOrderOnCancel"/>
	</action-method>
	
	<action-method name="action-print-stock-move">
		<call class="com.axelor.apps.stock.web.StockMoveController" method="printStockMove"/>
	</action-method>

	<action-method name="action-print-picking-stock-move">
		<call class="com.axelor.apps.stock.web.StockMoveController" method="printPickingStockMove"/>
	</action-method>
	
	<action-method name="action-stock-move-method-split-into-2">
		<call class="com.axelor.apps.stock.web.StockMoveController" method="splitInto2"/>
	</action-method>
	
	<action-method name="action-stock-move-method-split-stock-move-lines-special">
		<call class="com.axelor.apps.stock.web.StockMoveController" method="splitStockMoveLinesSpecial"/>
	</action-method>
	
	<action-method name="action-stock-move-method-split-stock-move-lines-unit">
		<call class="com.axelor.apps.stock.web.StockMoveController" method="splitStockMoveLinesUnit"/>
	</action-method>
	
	<action-method name="action-stock-move-ship-recieve-all-products">
	    <call class="com.axelor.apps.stock.web.StockMoveController" method="shipReciveAllProducts"/>
	</action-method>
	
	<action-method name="action-stock-move-method-generate-reversion">
	    <call class="com.axelor.apps.stock.web.StockMoveController" method="generateReversion"/>
	</action-method>
	
	<action-method name="action-stock-move-method-view-direction">
		<call class="com.axelor.apps.stock.web.StockMoveController" method="viewDirection"/>
	</action-method>
	
	<action-method name="action-stock-move-method-change-conformity">
		<call class="com.axelor.apps.stock.web.StockMoveController" method="changeConformityStockMove"/>
	</action-method>
	
	<action-method name="action-stock-move-line-method-change-conformity">
		<call class="com.axelor.apps.stock.web.StockMoveController" method="changeConformityStockMoveLine"/>
	</action-method>
	
	<action-method name="action-stock-move-method-open-stock-per-day">
		<call class="com.axelor.apps.stock.web.StockMoveController" method="openStockPerDay"/>
	</action-method>

	<action-method name="action-stock-move-method-set-addresses-str">
		<call class="com.axelor.apps.stock.web.StockMoveController" method="fillAddressesStr"/>
	</action-method>
	
	<action-method name="action-stock-move-method-verify-product-stock">
		<call class="com.axelor.apps.supplychain.web.StockMoveController" method="verifyProductStock"/>
	</action-method>

    <action-method name="action-stock-move-method-allocate-all">
        <call class="com.axelor.apps.supplychain.web.StockMoveController" method="allocateAll"/>
    </action-method>

	<action-method name="action-stock-move-method-refresh-net-mass">
		<call class="com.axelor.apps.stock.web.StockMoveController" method="refreshProductNetMass"/>
	</action-method>

	<action-validate name="action-stock-move-check-stock-move-line-real-qty">
		<alert message="The move doesn't contain any product, do you wish to continue ?" if="stockMoveLineList != null &amp;&amp; stockMoveLineList.sum{it->it.realQty} == 0"/>
	</action-validate>
	
	<action-validate name="action-stock-move-validate-address">
	    <error message="Both source location address and delivery (to) address are required to define the delivery itinerary" if="fromStockLocation?.address == null &amp;&amp; toAddress == null"/>
	    <error message="Please fill in the source (from) location address to get the delivery itinerary." if="fromStockLocation?.address == null"/>
	    <error message="Please fill in the delivery (to) address to get the delivery itinerary." if="toAddress == null"/>
	</action-validate>
	
	<action-validate name="action-stock-move-validate-shipment-informations">
		<error if="__config__.app.getApp('stock').isRequiredShipmentSupplierDetails &amp;&amp; (!supplierShipmentDate || !supplierShipmentRef)" message="Please filled supplier shipment date and supplier shipment reference."/>
	</action-validate>

    <action-validate name="action-stock-move-validate-check-reservation">
        <alert message="Do you want to allocate all the products ?"
               if="__config__.app.getApp('supplychain')?.manageStockReservation &amp;&amp; company?.supplyChainConfig?.autoAllocateOnAvailabilityRequest &amp;&amp; stockMoveLineList.any{it?.reservedQty.compareTo(it?.realQty) &lt; 0} &amp;&amp; availabilityRequest"/>
    </action-validate>

    <action-view name="action-stock-move-view-logistical-forms" title="Logistical forms"
        model="com.axelor.apps.stock.db.LogisticalForm">
        <view type="grid" name="logistical-form-stock-move-grid" />
        <view type="form" name="logistical-form-form" />
        <domain>self.id IN (:logisticalFormIdList)</domain>
        <context name="logisticalFormIdList" expr="call: com.axelor.apps.stock.service.LogisticalFormService:getIdList(__this__)" />
    </action-view>
    
    <action-view name="action-stock-move-view-reversion" title="Reversions" model="com.axelor.apps.stock.db.StockMove">
        <view type="grid" name="stock-move-grid" />
        <view type="form" name="stock-move-form" />
        <domain>self.reversionOriginStockMove =:id</domain>
    </action-view>

	<search-filters name="customer-deliveries-filters" model="com.axelor.apps.stock.db.StockMove" title="Customer deliveries filters">
		<filter title="Deliveries to prepare">
			<domain>self.statusSelect = 2</domain>
		</filter>
		<filter title="Late Deliveries">
			<domain>self.estimatedDate &lt; CURRENT_DATE</domain>
		</filter>
		<filter title="Deliveries History">
			<domain>self.statusSelect = 3</domain>
		</filter>
		<filter title="Deliveries Cancelled">
			<domain>self.statusSelect = 4</domain>
		</filter>
	</search-filters>
	
	<search-filters name="supplier-arrivals-filters" model="com.axelor.apps.stock.db.StockMove" title="Supplier arrivals filters">
		<filter title="Today Arrivals">
			<domain>self.estimatedDate = CURRENT_DATE</domain>
		</filter>
		<filter title="Upcoming arrivals">
			<domain>self.estimatedDate &lt; :_newDate</domain>
		</filter>
		<filter title="Arrivals History">
			<domain>self.statusSelect = 3</domain>
		</filter>
		<filter title="Cancelled Arrivals">
			<domain>self.statusSelect = 4</domain>
		</filter>
	</search-filters>
	
	<search-filters name="internal-stock-move-filters" model="com.axelor.apps.stock.db.StockMove" title="Internal Stock Move filters">
		<filter title="Moves To Prepare">
			<domain>self.statusSelect = 2</domain>
		</filter>
		<filter title="Moves History">
			<domain>self.statusSelect = 3</domain>
		</filter>
		<filter title="Moves Cancelled">
			<domain>self.statusSelect = 4</domain>
		</filter>
	</search-filters>

	<action-view name="action.stock.move.view.cancel" title="Cancellation" model="com.axelor.apps.stock.db.StockMove">
		<view type="form" name="stock-move-cancel-wizard-form"/>
		<view-param name="popup" value="reload"/>
		<view-param name="show-toolbar" value="false"/>
		<view-param name="show-confirm" value="false" />
		<view-param name="popup-save" value="false"/>
		<view-param name="forceEdit" value="true" />
		<context name="_showRecord" expr="eval: __this__.id" />
		<context name="_xApplicationType" expr="eval: _model"/>
	</action-view>

	<form name="stock-move-cancel-wizard-form" model="com.axelor.apps.stock.db.StockMove" title="Cancellation confirmation" >
		<panel name="mainPanel">
			<field name="cancelReason" domain="self.applicationType = :_xApplicationType" colOffset="4" colSpan="4" widget="SuggestBox" canNew="false" canEdit="false"/>
			<button readonlyIf="cancelReason == null" name="cancelConfirmBtn" title="Confirm cancellation" onClick="action-stock-move-method-cancel" colOffset="4" colSpan="4"/>
		</panel>
	</form>

	<action-record name="action-stock-move-record-update-info-company" model="com.axelor.apps.stock.db.StockMove">
		<field name="tradingName" expr="eval: null" if="__config__.app.getApp('base').enableTradingNamesManagement"/>
		<field name="printingSettings" expr="eval: company?.printingSettings"/>
		<field name="isWithReturnSurplus" expr="eval:false" if="typeSelect != 3"/>
 		<field name="isWithBackorder" expr="eval:company?.stockConfig?.isWithBackorder"/>
	    <field name="isWithReturnSurplus" expr="eval:company?.stockConfig?.isWithReturnSurplus" if="typeSelect == 3"/>
	</action-record>

	<action-method name="action-stock-move-method-printing-settings-default-value">
		<call class="com.axelor.apps.stock.web.StockMoveController" method="fillDefaultPrintingSettings"/>
	</action-method>

	<action-method name="action-stock-move-method-filter-printing-settings">
		<call class="com.axelor.apps.stock.web.StockMoveController" method="filterPrintingSettings"/>
	</action-method>

	<action-method name="action-method-print-conformity-certificate">
		<call class="com.axelor.apps.stock.web.StockMoveController" method="printConformityCertificate"/>
	</action-method>

  <action-method name="action-stock-move-method-update-stocks">
    <call class="com.axelor.apps.stock.web.StockMoveController" method="updateStocks"/>
  </action-method>

	<action-record name="action-stock-move-record-freight-carrier" model="com.axelor.apps.stock.db.StockMove">
		<field name="carrierPartner" expr="eval:freightCarrierMode?.carrierPartner"/>
	</action-record>
	
	<action-record name="action-stock-move-record-partner-shipment-informations" model="com.axelor.apps.stock.db.StockMove">
		<field name="shipmentMode" expr="eval: clientPartner?.shipmentMode"/>
    	<field name="freightCarrierMode" expr="eval: clientPartner?.freightCarrierMode"/>
		<field name="carrierPartner" expr="eval: clientPartner?.freightCarrierMode?.carrierPartner"/>
	</action-record>
	
	<action-attrs name="action-stock-move-attrs-check-delivery-address">
		<attribute name="hidden" for="deliveryAddressText" expr="eval: partner?.partnerAddressList?.findAll{it.isDeliveryAddr}?.size() &gt; 0 " />
    </action-attrs>

	<action-group name="action-group-stock-stockmove-cancel-click">
		<action name="save"/>
		<action name="action-validate-stock-move-validate-cancel"/>
		<action name="action.stock.move.view.cancel"/>
	</action-group>
	
	<action-validate name="action-validate-stock-move-validate-cancel">
	  <error if="statusSelect == 2 &amp;&amp; pickingIsEdited &amp;&amp; availabilityRequest" message="Picking order has been edited for this stock move, it can not be canceled."/>
	</action-validate>

	<action-view name="action-stock-move-view-stock-move-line" title="See stock move lines" model="com.axelor.apps.stock.db.StockMoveLine">
		<view type="grid" name="stock-move-line-all-grid"/>
		<view type="form" name="stock-move-line-all-form"/>
		<domain>self.stockMove.typeSelect = :_typeSelect AND self.stockMove.isReversion = :_isReversion</domain>
		<context name="_typeSelect" expr="eval:_typeSelect"/>
		<context name="_isReversion" expr="eval:_isReversion"/>
	</action-view>

</object-views>
