There are some issues that could improve the usage of Importer Windows. I already did some improvements with and IDEMPIERE-539. There are still a lot possible improvements to the importer processes. I want to collect such issues under this Tracker item.
Actual reason is: I want to Import the UserElement Accounting Dimension to the GL Journal. This import should work by Value of the given User Element table.
I added new columns in I_GLJournal to hold UserElement 1&2 as (String) Value and as ID and the needed entries in AD_Column and AD_Field. I had to rebuild the model classes with the ModelGenerator. The real code is in ImportGLJournal. Is is builded like the code for the other accounting dimensions. Due to the dynamic nature of UserElement I had to create the SQL for that with some String Concatenation using the "Defined Column" for User Elements.
Data Import works for me.
I found some mistakes in my last commit (I did not assure that only data of my Client/Tenant is used). I repaired that.
Then I added support for a Document Date. Up to now only the Accounting Date was supported and written into both columns of the target record. If you leave the Document Date free it works like before.
In the Import definition it is not possible to enter constant date values. I fixed this with
You have to enter date values in the ISO-8601 format that most databases uses: "YYYY-MM-DD HH24:MI:SS". This is the same format used when reading the CSV table.
In the import process for GL Journal the "organization" parameter is not set per default. If you start this process very often it becomes very annoying to set it over and over. So I created this small patch for the database to set the standard organization as default.
The goal of this ticket was achieved with the CSV Importer - I think we can close it