<?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="AnalyticMoveLine" lang="java">
	
	<many-to-one name="analyticDistributionTemplate" ref="com.axelor.apps.account.db.AnalyticDistributionTemplate" index="idx_acc_ana_move_line_ana_dist_template"/>
	<many-to-one name="invoiceLine" ref="com.axelor.apps.account.db.InvoiceLine"/>
	<many-to-one name="moveLine" ref="com.axelor.apps.account.db.MoveLine"/>

	<many-to-one name="analyticAxis" ref="com.axelor.apps.account.db.AnalyticAxis" title="Axis"/>
	<many-to-one name="analyticAccount" ref="com.axelor.apps.account.db.AnalyticAccount" title="Analytic Acc."/>
    <decimal name="percentage" title="%"/>
    <decimal name="originalPieceAmount" title="Original piece amount" hidden="true"/>
    <decimal name="amount" title="Amount"/>
    <date name="date" title="Date" column="date_val"/>
    <many-to-one name="analyticJournal" ref="com.axelor.apps.account.db.AnalyticJournal" title="Analytic Journal" required="true"/>
    <many-to-one name="account" ref="com.axelor.apps.account.db.Account" title="Accounting.Account"/>
    <many-to-one name="accountType" ref="com.axelor.apps.account.db.AccountType" title="Account Type"/>

    <integer name="typeSelect" title="Type" selection="account.analytic.move.line.type.select" default="1"/>

    <many-to-one name="currency" ref="com.axelor.apps.base.db.Currency"
        title="Currency"/>
    
    <extra-code><![CDATA[
	
	   	// STATUS SELECT
		public static final int STATUS_FORECAST_ORDER = 1;
		public static final int STATUS_FORECAST_INVOICE = 2;
		public static final int STATUS_REAL_ACCOUNTING = 3;
		
	]]></extra-code>
    
  </entity>

</domain-models>
