<?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="base" package="com.axelor.apps.base.db"/>

	<entity name="AppProduction" lang="java" extends="App">
		<boolean name="prodOrderMgtOnSO" title="Production order management from sale order" default="false"/>
		<boolean name="productionOrderGenerationAuto" title="Generate production orders automatically" default="false"/>
		<boolean name="oneProdOrderPerSO" title="One production order per sale order" default="true"/>
		<boolean name="autoPlanManufOrderFromSO" title="Automatically plan the manuf. orders generated from sale order"/>
    	
    	<many-to-one name="workCenterProduct" ref="com.axelor.apps.base.db.Product" title="Default work center product"/>
   		<many-to-one name="workCenterCostSheetGroup" ref="com.axelor.apps.production.db.CostSheetGroup" title="Cost sheet group for work center"/>
 		<many-to-one name="productCostSheetGroup" ref="com.axelor.apps.production.db.CostSheetGroup" title="Cost sheet group for product"/>
 		
 		<many-to-one name="cycleUnit" ref="com.axelor.apps.base.db.Unit" title="Cycle unit"/>
 		
 		<boolean name="manageResidualProductOnBom" title="Manage residual products on BOM"/>
 		<boolean name="subtractProdResidualOnCostSheet" title="Subtract the product residuals cost on Cost sheet"/>
 		<boolean name="manageBillOfMaterialVersion" title="Manage bill of material versions" />
 		<boolean name="manageProdProcessVersion" title="Manage production process versions" />
 		<boolean name="manageCostSheetGroup" title="Manage cost sheet group"/>

		<boolean name="enableConfigurator" title="Enable production configurator"/>
		<boolean name="manageWorkshop" title="Manage workshop" />
		
		<integer name="nbDecimalDigitForBomQty" title="Nb of digits for BOM quantities" max="10" default="2"/>
		
		<many-to-one name="barcodeTypeConfig" title="Barcode Type" ref="com.axelor.apps.base.db.BarcodeTypeConfig" default="EAN_13"/>
		<boolean name="printPlannedDateOnManufOrder" title="Print planned date on manuf order ?" default="true"/>

        <string name="mOFilterOnStockDetailStatusSelect" title="Status considered to filter a manuf order" selection="production.manuf.order.status.select" default="4,5"/>


		<track>
			<field name="prodOrderMgtOnSO" on="UPDATE"/>
			<field name="productionOrderGenerationAuto" on="UPDATE"/>
			<field name="oneProdOrderPerSO" on="UPDATE"/>
			<field name="autoPlanManufOrderFromSO" on="UPDATE"/>

			<field name="workCenterProduct" on="UPDATE"/>
			<field name="workCenterCostSheetGroup" on="UPDATE"/>
			<field name="productCostSheetGroup" on="UPDATE"/>

			<field name="cycleUnit" on="UPDATE"/>

			<field name="manageResidualProductOnBom" on="UPDATE"/>
			<field name="subtractProdResidualOnCostSheet" on="UPDATE"/>
			<field name="manageBillOfMaterialVersion" on="UPDATE"/>
			<field name="manageProdProcessVersion" on="UPDATE"/>

			<field name="enableConfigurator" on="UPDATE"/>
			<field name="manageWorkshop" on="UPDATE"/>

			<field name="nbDecimalDigitForBomQty" on="UPDATE"/>

			<field name="barcodeTypeConfig" on="UPDATE"/>
			<field name="printPlannedDateOnManufOrder" on="UPDATE"/>
		</track>
	</entity>

</domain-models>