Export import V5

Hi,

is it possible to collect xml formats from any object, for instance “Logs”, (csv and xml)?

I 've only succeeded to export csv from the advanced search toolbox.
My goal is to collect objects xml and then thanks to that easily import my source data (which will of course correspond to the format expected in the xml) without creating from scratch xml file.

Nothing on the forum, hence my question …

thanks in advance

What do you mean by “collect xml format from any object” ? The xml data file or the xml mapping file ?

I mean to save the structure of the xml like this :

<?xml version="1.0" encoding="UTF-8"?>
<input file="Journaux.csv" separator=";" type="com.axelor.apps.crm.db.Journal" search="self.importId = :importId" call="com.axelor.csv.script.ImportJournal:saveLead" >
	<bind column="description" to="description"/>
......

The xml mapping

I see. There is no feature to collect xml mapping form any object.

If you use CSV DataSource, you can use automatic import feature. CSV data files needs identical columns with the field names of the target domain model class, it can be imported automatically with minimal configuration. Here is the documentation of this feature : https://docs.axelor.com/adk/5.0/dev-guide/data-import/csv-import.html#automatic-import

Hope this can help.

I ve tried automatic import but it doesn’t import any record.

I ve done this xml file (I have deleted “<” to display my code like a text) :
?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.0.xsd"> "

input file=“Unit.csv” type=“com.axelor.apps.crm.db.Unit” />
/csv-inputs>

With this CSV file :
“importOrigin”;“updatedBy”;“labelToPrinting”;“updatedOn”;“unitTypeSelect”;“createdOn”;“version”;“attrs”;“archived”;“importid”;“createdBy”;“name”;“id”
;;“Année”;;“Unité de temps”;“2018-07-09T17:04:35.614”;“0”;;;“106”;“Admin”;“Année”;“19”

And the result is :
Total : 0 - Succeeded : 0 - Not null : 0
Generated anomalies :0

If you could help me.

Thx

My problem is solved

Thank you for your doc

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.