<?xml version="1.0" encoding="UTF-8"?>
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">

  <module name="account" package="com.axelor.apps.account.db"/>

  <entity name="InvoiceBatch" lang="java">
  	
  	<!-- HEADER -->
  	<string name="code" title="Code" namecolumn="true" unique="true"/>
    <integer name="actionSelect" title="Action" required="true" selection="iinvoice.batch.action.select"/>
    <many-to-one name="company" ref="com.axelor.apps.base.db.Company" required="true" title="Company" />
    
    <!-- UPDATE STATUS -->
    <integer name="fromStatusSelect" title="Invoice initial status" default="1" selection="iaccount.invoice.status.select"/>
    <integer name="toStatusSelect" title="Invoice final status" default="2" selection="iaccount.invoice.status.select"/>
    <boolean name="onSelectOk" title="Select invoices manually" />
    <many-to-many name="invoiceSet" ref="com.axelor.apps.account.db.Invoice" title="Invoices selection" />
    
    <!-- INVOICE GENERATION -->
    
    <!-- OTHERS INFORMATION -->
    <string name="description" title="Description" large="true" />
    <one-to-many name="batchList" ref="com.axelor.apps.base.db.Batch" mappedBy="invoiceBatch" title="Batches" />
  
 	<extra-code><![CDATA[
	
	   	// ACTION TYPE
		public static final int BATCH_INVOICE = 0;
		public static final int BATCH_STATUS = 1;
		public static final int BATCH_ALARM = 2;
	
	]]></extra-code>
  
  
  </entity>

</domain-models>
