<?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="contract-batch-grid" title="Contract batches" model="com.axelor.apps.contract.db.ContractBatch">
		<field name="code"/>
		<field name="actionSelect"/>
		<field name="company" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
		<field name="description"/>
	</grid>

    <form name="contract-batch-form" title="Contract batch" model="com.axelor.apps.contract.db.ContractBatch">
        <panel name="mainPanel" >
            <field name="actionSelect"/>
            <field name="code"/>
            <field name="company" canEdit="false" widget="SuggestBox" form-view="company-form" grid-view="company-grid"/>
        </panel>
        <panel-tabs name="mainPanelTab">
            <panel name="informationPanel" title="Information" >
                <field name="createdOn" title="Created on"/>
                <field name="createdBy" title="Created by" form-view="user-form" grid-view="user-grid"/>
                <field name="description" colSpan="12" />
                <panel-related name="batchListPanel" field="batchList" colSpan="12" form-view="batch-form" grid-view="batch-grid" readonly="true"/>
            </panel>
        </panel-tabs>
        <panel name="actionsPanel" sidebar="true" title="Actions">
            <button name="batchBtn" title="Run batch" onClick="save,action-contract-method-run-batch" colSpan="12"/>
        </panel>
    </form>
    
    <action-method name="action-contract-method-run-batch">
        <call class="com.axelor.apps.contract.web.ContractBatchController" method="runBatch"/>
    </action-method>

</object-views>
