<?xml version="1.0" encoding="UTF-8"?>
<csv-inputs xmlns="http://axelor.com/xml/ns/data-import"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://axelor.com/xml/ns/data-import http://axelor.com/xml/ns/data-import/data-import_5.2.xsd">
  
     <input file="base_sequence.csv" separator=";" type="com.axelor.apps.base.db.Sequence" search="self.importId = :importId" call="com.axelor.csv.script.SequenceScript:computeFullname">
    	<bind to="yearlyResetOk" column="yearlyResetOk" eval="yearlyResetOk == '1' ? true : false"/>
    	<bind to="nextNum" column="nextNum" eval="nextNum?.empty ? '1' : nextNum"/>
    	<bind to="padding" column="padding" eval="padding?.empty ? '1' : padding"/>
    	<bind to="toBeAdded" column="toBeAdded" eval="toBeAdded?.empty ? '1' : toBeAdded"/>
    </input>

	<input file="production_machineType.csv" separator=";" type="com.axelor.apps.production.db.MachineType"/>

	<input file="production_machine.csv" separator=";" type="com.axelor.apps.production.db.Machine"/>
	
	<input file="production_workCenter.csv" separator=";" type="com.axelor.apps.production.db.WorkCenter"/>
	
	<input file="production_prodHumanResource.csv" separator=";" type="com.axelor.apps.production.db.ProdHumanResource"/>
	
	<input file="production_prodProcess.csv" separator=";" type="com.axelor.apps.production.db.ProdProcess">
		<bind to="name" column="name"/>
		<bind to="fullName" column="name"/>
	</input>
	
	<input file="production_prodProcessLine.csv" separator=";" type="com.axelor.apps.production.db.ProdProcessLine"/>

	<input file="production_billOfMaterial.csv" separator=";" type="com.axelor.apps.production.db.BillOfMaterial" search="self.importId = :importId">
		<bind column="billOfMaterials" to="billOfMaterialSet" search="self.importId in :billOfMaterials" eval="billOfMaterials ? billOfMaterials.split('\\|') as List : [0]"/>
		<bind to="fullName" column="name"/>
	</input>
	
	<input file="production_billOfMaterial.csv" separator=";" type="com.axelor.apps.production.db.BillOfMaterial" search="self.importId = :importId" update="true" call="com.axelor.csv.script.ImportBillOfMaterial:computeCostPrice">
		<bind column="billOfMaterials" to="billOfMaterialSet" search="self.importId in :billOfMaterials" eval="billOfMaterials ? billOfMaterials.split('\\|') as List : [0]"/>
	</input>
	
	<input file="production_productionConfig.csv" separator=";" type="com.axelor.apps.production.db.ProductionConfig" search="self.importId = :importId"/>
	<input file="stock_stockConfig.csv" separator=";" type="com.axelor.apps.stock.db.StockConfig" search="self.importId = :importId"/>

	<input file="production_costSheetGroup.csv" separator=";" type="com.axelor.apps.production.db.CostSheetGroup" search="self.importId = :importId"/>
	
<!-- 	Update default BOM -->

	<input file="base_product.csv" separator=";" type="com.axelor.apps.base.db.Product" search="self.importId = :importId" update="true">
	    <bind to="startDate" eval="call:com.axelor.csv.script.ImportDateTime:importDate(startDate)" column="startDate"/>
		<bind to="createdOn" eval="call:com.axelor.csv.script.ImportDateTime:importDate(startDate)" column="startDate"/>
	</input>
	
	<input file="base_appProduction.csv" separator=";" type="com.axelor.apps.base.db.AppProduction" search="self.code = :code" update="true" />

	<input file="production_oneLine.csv" type="com.axelor.apps.sale.db.ConfiguratorCreator" call="com.axelor.csv.script.ImportConfiguratorCreator:importConfiguratorCreator" />

</csv-inputs>