<?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="Journal" lang="java" cacheable="true">
  
    <string name="code" title="Code"/>
    <string name="name" title="Name" required="true"/>
    <many-to-one name="journalType" ref="JournalType" title="Journal Type" massUpdate="true"/>
    <string name="exportCode" title="Export code" massUpdate="true"/>
    <boolean name="excessPaymentOk" title="Allow payments greater than due amount" massUpdate="true"/>
    <boolean name="editReceiptOk" title="Edit receipt" massUpdate="true"/>
  	<string name="descriptionModel" title="Label for automatic moveline generation" massUpdate="true"/>
  	<boolean name="descriptionIdentificationOk" title="Add Move line N° in the description" default="false" massUpdate="true"/>
  	<boolean name="notExportOk" title="Do not export" default="false" massUpdate="true"/>
  	<integer name="statusSelect" title="Status" selection="account.journal.status.select"/>
	<boolean name="isInvoiceMoveConsolidated" title="Consolidate invoice movelines" default="false" massUpdate="true"/>
  	
  	<many-to-one name="sequence" ref="com.axelor.apps.base.db.Sequence" title="Sequence" massUpdate="true"/>
  	<many-to-one name="company" ref="com.axelor.apps.base.db.Company" title="Company"/>
  	
  	<many-to-many name="validAccountTypeSet" ref="com.axelor.apps.account.db.AccountType" title="Compatible Account Types"/>
  	<many-to-many name="validAccountSet" ref="com.axelor.apps.account.db.Account" title="Compatible Accounts"/>
	<string name="compatiblePartnerTypeSelect" title="Compatible partner" selection="account.journal.compatible.partner.type.select"/>

	<unique-constraint columns="company,code,name"/>
  	
  	 <extra-code><![CDATA[
	
	   	// STATUS SELECT
		public static final int STATUS_INACTIVE = 0;
		public static final int STATUS_ACTIVE = 1;
		public static final int STATUS_ARCHIVED = 2;
	
	]]></extra-code>
  	
  </entity>

</domain-models>