<?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="account_accountType.csv" separator=";" type="com.axelor.apps.account.db.AccountType" search="self.name = :name"/>
  	  	
  	<input file="account_fiscalPosition.csv" separator=";" type="com.axelor.apps.account.db.FiscalPosition" search="self.code = :code" />
  	
	<input file="account_account.csv" separator=";" type="com.axelor.apps.account.db.Account" >
		<bind to="company" search="self.id = :_companyId" update="true" />
	</input>
	
	<input file="account_accountEquiv.csv" separator=";" type="com.axelor.apps.account.db.AccountEquiv" search="self.fiscalPosition.code = :fiscalPosition_code AND self.fromAccount.code = :fromAccount_code AND self.toAccount.code = :toAccount_code" />
	
	<input file="account_account.csv" separator=";" type="com.axelor.apps.account.db.Account"  search="self.code = :code AND self.company.id = :_companyId " update="true">
		<bind to="parentAccount" search="self.code = :parent_code AND self.company.id = :_companyId" update="true" />
	</input>
	
	<!-- TO DO Remplir le M2O activeTaxLine par un update en utilisant le code Tax -->
	<input file="account_tax.csv" separator=";" type="com.axelor.apps.account.db.Tax" search="self.code = :code" />
	
	<input file="account_taxLine.csv" separator=";" type="com.axelor.apps.account.db.TaxLine" search="self.importId = :importId and self.tax.code = :tax_code">
		<bind to="tax" search="self.code = :tax_code" />
	</input>
	
	<input file="account_taxEquiv.csv" separator=";" type="com.axelor.apps.account.db.TaxEquiv" search="self.fiscalPosition.code = :fiscalPosition_code AND self.fromTax.code = :fromTax_code AND self.toTax.code = :toTax_code" />
	
	<input file="account_taxAccount.csv" separator=";" type="com.axelor.apps.account.db.TaxAccount">
		<bind to="company" search="self.id = :_companyId" update="true" />
       	<bind to="tax" search="self.code = :tax_code" update="true" />
		<bind to="account" search="self.code = :account_code and self.company.id = :_companyId" update="true" />
	</input>
	
	<input file="account_tax.csv" separator=";" update="true" search="self.code = :code" type="com.axelor.apps.account.db.Tax">
		<bind to="activeTaxLine" search="self.importId = :_activeTaxLine AND self.tax.code = :code" update="true" />
	</input>
	
	
</csv-inputs>