<?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="Notification" lang="java">

		<integer name="statusSelect" title="Status"
			selection="account.notification.status.select" readonly="true"
			default="1" />

		<many-to-one name="company" ref="com.axelor.apps.base.db.Company" />
		<many-to-one name="factorPartner" ref="com.axelor.apps.base.db.Partner"
			required="true" title="Factor" />
		<date name="paymentDate" required="true" />
		<many-to-one name="subrogationRelease"
			ref="com.axelor.apps.account.db.SubrogationRelease" />
		<one-to-many name="notificationItemList" title="Invoices"
			ref="com.axelor.apps.account.db.NotificationItem" mappedBy="notification"
			required="true" />

		<extra-code><![CDATA[
			// STATUS SELECT
			public static final int STATUS_NEW = 1;
			public static final int STATUS_VALIDATED = 2;
			
			// TYPE SELECT
			public static final int TYPE_PAYMENT_TO_THE_FACTORE = 1;
			public static final int TYPE_PAYMENT_TO_THE_FACTORE_AFTER_FACTORE_RETURN = 2;
		]]></extra-code>

	</entity>

</domain-models>
