<?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="supplychain" package="com.axelor.apps.supplychain.db"/>
 
  <entity name="MrpForecast" lang="java">
  
	<date name="forecastDate" title="Forecast date" required="true"/>      
	<decimal name="qty" title="Qty"/>
	<many-to-one name="unit" ref="com.axelor.apps.base.db.Unit" title="Unit"/>
	<many-to-one name="product" ref="com.axelor.apps.base.db.Product" title="Product" required="true"/>
	<many-to-one name="stockLocation" ref="com.axelor.apps.stock.db.StockLocation" title="Stock location" required="true"/>
	<string name="note" title="Note" large="true" multiline="true"/>
	<many-to-one name="partner" ref="com.axelor.apps.base.db.Partner" title="Partner"/>
	<integer name="statusSelect" title="Status" selection="supplychain.mrp.forecast.status.select" readonly="true" default="1"/>
	<integer name="monthSelect" selection="iadministration.month.select"/>
	<integer name="scenario" title="Scenario"  selection="mrp.scenario.select"/>
	
	<extra-code><![CDATA[
	
		// STATUS SELECT
		public static final int STATUS_DRAFT = 1;
		public static final int STATUS_CONFIRMED = 2;
		public static final int STATUS_CANCELLED = 3;
	
	]]></extra-code>

	<track on="UPDATE">
		<field name="forecastDate"/>
		<field name="qty"/>
		<field name="unit"/>
		<field name="product"/>
		<field name="stockLocation"/>
		<field name="note"/>
		<field name="partner"/>
		<field name="statusSelect"/>
	</track>
      
  </entity>

</domain-models>
