Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011793Openbravo ERP02. Master data managementpublic2009-12-15 18:582010-03-10 18:28
networkb 
harikrishnan 
highminoralways
closedfixed 
5
2.50MP9 
2.50MP122.50MP14 
Core
No
0011793: An error appears when a csv is imported in Import File Loader
In Import file Loader, after defining a format (see attached file), the following error appears:

      
Error while inserting data
Line No. 1
Inserting data: AD_Client_ID = '614F52E89Dadfadffsdf62',AD_Org_ID = '84C10CDFB7D24D7E848BB2',Value = 'AA935084',Name = 'AA935084'
Error: ERROR: inserción o actualización en la tabla «i_product» viola la llave foránea «adclient_iproduct» Detail: La llave (ad_client_id)=(614F52E89Dadfadffsdf62) no está presente en la tabla «ad_client».

The problem is that AD_Client_ID is cut.
Go to Master Data Management > Import Data > Import Loader Format.
Generate the same format as the document.
Go to Master Data Management > Import Data > Import File Loader.
Select the csv attached (Note: Client and Org, should be modified by yours), the format created, and process it.
No tags attached.
doc ISSUE6862LoaderFormat.doc (131,584) 2009-12-15 18:58
https://issues.openbravo.com/file_download.php?file_id=2054&type=bug
csv i_test.csv (108) 2009-12-15 19:00
https://issues.openbravo.com/file_download.php?file_id=2055&type=bug
Issue History
2009-12-15 18:58networkbNew Issue
2009-12-15 18:58networkbAssigned To => rafaroda
2009-12-15 18:58networkbFile Added: ISSUE6862LoaderFormat.doc
2009-12-15 19:00networkbTarget Version => 2.50MP12
2009-12-15 19:00networkbFile Added: i_test.csv
2009-12-30 18:06psarobeStatusnew => scheduled
2009-12-30 18:06psarobeNote Added: 0023169
2009-12-30 18:06psarobefix_in_branch => pi
2010-01-04 09:22rafarodaNote Added: 0023182
2010-01-04 09:22rafarodaPriorityimmediate => high
2010-01-04 09:22rafarodafix_in_branchpi =>
2010-02-16 16:56rafarodaAssigned Torafaroda => harikrishnan
2010-02-18 13:51hgbotCheckin
2010-02-18 13:51hgbotNote Added: 0024598
2010-02-18 13:51hgbotStatusscheduled => resolved
2010-02-18 13:51hgbotResolutionopen => fixed
2010-02-18 13:51hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4a410faff223efb18a767a953a1d11b3366d402a [^]
2010-02-19 06:05harikrishnanNote Added: 0024621
2010-02-19 07:13arunkumarNote Added: 0024623
2010-02-19 07:13arunkumarStatusresolved => closed
2010-02-19 07:13arunkumarFixed in Version => 2.50MP13
2010-02-19 16:35hudsonbotCheckin
2010-02-19 16:35hudsonbotNote Added: 0024663
2010-02-20 00:00anonymoussf_bug_id0 =>
2010-03-08 16:04jpabloaeFixed in Version2.50MP13 => 2.50MP14
2010-03-10 18:28anonymoussf_bug_id => 2967963

Notes
(0023169)
psarobe   
2009-12-30 18:06   
Please also see if it fails for the organization. It doesn't make sense to put the client but make sense to put the organization

Regards
(0023182)
rafaroda   
2010-01-04 09:22   
Changed its Priority to high.
(0024598)
hgbot   
2010-02-18 13:51   
Repository: erp/devel/pi
Changeset: 4a410faff223efb18a767a953a1d11b3366d402a
Author: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
Date: Thu Feb 18 18:22:05 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/4a410faff223efb18a767a953a1d11b3366d402a [^]

Fixes Issue 11793: An error appears when a csv is imported in Import File Loader.

---
M src/org/openbravo/erpCommon/ad_forms/FileImport.java
M src/org/openbravo/erpCommon/ad_forms/FileImport_data.xsql
---
(0024621)
harikrishnan   
2010-02-19 06:05   
Steps to test.
*Create a new organization and new client.Query the database to get the Client Id and Organization id
*Create the file format with the data that are included as screen shot in file ISSUE6862LoaderFormat.doc
*Download the CSV file from the issue, and copy the client id and organization id of yours in to the file.
*Now try to upload the file in Import File Loader(Master Data Management > Import Data > Import File Loader).Now the file will be uploaded.
*Since the CSV file has Header check the check box "Header first line".
(0024623)
arunkumar   
2010-02-19 07:13   
Tested & working fine.
(0024663)
hudsonbot   
2010-02-19 16:35   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/4a410faff223 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/d22bdcc83354 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.16481.obx [^]