<?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="IrrecoverableInvoiceLine" lang="java">
  
  	<many-to-one name="irrecoverableCustomerLine" ref="com.axelor.apps.account.db.IrrecoverableCustomerLine" title="Customer" index="idx_acc_irreco_inv_line_irreco_cust_line"/>
  	<integer name="invoiceLineSeq" title="Reference"/>
  	<many-to-one name="invoice" ref="com.axelor.apps.account.db.Invoice" title="Invoice"/>
  	<one-to-many name="irrecoverableReportLineList" ref="com.axelor.apps.account.db.IrrecoverableReportLine" mappedBy="irrecoverableInvoiceLine" title="Reportings"/>
 	
 	<string name="name" title="Name">
 		<![CDATA[
	    	if (invoice != null && invoice.getInvoiceId() != null) return invoice.getInvoiceId() + " - " + invoiceLineSeq;
	    	else return invoiceLineSeq.toString();
	    ]]>
	</string>

  </entity>

</domain-models>
