<?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="PayerQualityConfigLine" lang="java" cacheable="true">
  
    <integer name="incidentTypeSelect" title="Incident type" selection="payer.quality.config.line.incident.type.select"/>
    <many-to-one name="debtRecoveryLevel" ref="com.axelor.apps.account.db.DebtRecoveryLevel" title="Debt recovery level"/>
    <decimal name="burden" title="Burden (weight)"/>
    <string name="description" title="Description"/>
    <string name="rejectType" title="Reject type"/>
    <string name="name" title="Label">
    	<![CDATA[
    	if (incidentTypeSelect != 0 && rejectType != null){
    		return "Rejet ("+rejectType+")";
    	}
		else if(debtRecoveryLevel != null && debtRecoveryLevel.getName() != null ) {
			return "Relance "+debtRecoveryLevel.getName();
		}
         return "";
	    ]]>
    </string>
  
  </entity>
  
</domain-models>
