Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0010991Openbravo ERPA. Platformpublic2009-10-15 16:442009-11-20 00:00
vmromanos 
marvintm 
urgentmajoralways
closedfixed 
20Debian 5.0
pi 
2.50MP7 
Core
No
0010991: Export language does not work properly when core is not indevelopment
If you try to export a language with core not in development, the files:

- AD_REFERENCE_TRL
- AD_REF_LIST_TRL

are exported with no data (empty)
1- Import Spanish translation
2- Mark core as not in development
3- Export the language <- Bug: AD_REFERENCE_TRL and AD_REF_LIST_TRL empty
4- Mark core as in development
5- Export the language <- OK
No tags attached.
Issue History
2009-10-15 16:44vmromanosNew Issue
2009-10-15 16:44vmromanosAssigned To => rafaroda
2009-10-15 16:46shuehnerIssue Monitored: shuehner
2009-10-15 16:47psarobeAssigned Torafaroda => alostale
2009-10-15 16:47psarobePrioritynormal => urgent
2009-10-15 16:47psarobeStatusnew => scheduled
2009-10-15 16:47psarobeTarget Version => 2.50MP7
2009-10-16 16:28alostaleAssigned Toalostale => marvintm
2009-11-10 12:33FrancescoFinamoreNote Added: 0021687
2009-11-10 12:33FrancescoFinamoreIssue Monitored: FrancescoFinamore
2009-11-10 12:35shuehnerNote Added: 0021688
2009-11-10 12:36FrancescoFinamoreNote Added: 0021689
2009-11-10 12:45shuehnerNote Added: 0021690
2009-11-18 18:49hgbotCheckin
2009-11-18 18:49hgbotNote Added: 0021987
2009-11-18 18:49hgbotStatusscheduled => resolved
2009-11-18 18:49hgbotResolutionopen => fixed
2009-11-18 18:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6a7d10a6bfe783e428d00b931f40f7b1562bc13e [^]
2009-11-19 08:44alostaleNote Added: 0022007
2009-11-19 08:45alostaleStatusresolved => new
2009-11-19 08:45alostaleResolutionfixed => open
2009-11-19 10:12hgbotCheckin
2009-11-19 10:12hgbotNote Added: 0022009
2009-11-19 10:12hgbotStatusnew => resolved
2009-11-19 10:12hgbotResolutionopen => fixed
2009-11-19 10:12hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/6a7d10a6bfe783e428d00b931f40f7b1562bc13e [^] => http://code.openbravo.com/erp/devel/pi/rev/16664ab3d8dce50697d96fb7aebc84ea40474b07 [^]
2009-11-19 10:20alostaleStatusresolved => closed
2009-11-20 00:00anonymoussf_bug_id0 => 2900812

Notes
(0021687)
FrancescoFinamore   
2009-11-10 12:33   
The problem is the ReferenceData :
in the class Translation.java when you launch export task there are 3 functions used
1) exportTrl
2) exportReferenceData
3) exportContibutors

the exportReferenceData export the reference data for the modules in status="In development" , otherwise create empty files.
The problem is when a table is used in function exportTrl and in exportReferenceData like :
"C_DocType"
"C_UOM"
"C_Currency"
"C_Country"
"AD_Reference"
"AD_Ref_List"
"AD_Module"

The first functions exports them correctly , the second , if the modules are not in development, rewrite them and leave them empties.

I think the correct way is export them independently from status of module.
(0021688)
shuehner   
2009-11-10 12:35   
Hi Francesco, your a correct with your explanation. Exactly this was the broken behavior i noticed when investigating the cause of the issue a bit. First its created correct and then overwritten with an empty file.
(0021689)
FrancescoFinamore   
2009-11-10 12:36   
and the solution ? :))
(0021690)
shuehner   
2009-11-10 12:45   
Solution is up to the assigned dev: marvintm, from the schedule i think it will be tackled in one of the next few weeks. Not to critical as a easy workaround switching the isindevelopment exists.
(0021987)
hgbot   
2009-11-18 18:49   
Repository: erp/devel/pi
Changeset: 6a7d10a6bfe783e428d00b931f40f7b1562bc13e
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Nov 18 18:47:58 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6a7d10a6bfe783e428d00b931f40f7b1562bc13e [^]

Fixed issue 10991. Language will not be exported for dataset DS.

---
M src-db/database/sourcedata/AD_DATASET.xml
---
(0022007)
alostale   
2009-11-19 08:44   
After the fix AD_REFERENCE_TRL and AD_REF_LIST_TRL tables are exported consistently regardless core is in development or not.

But C_UOM and C_DOCTYPE are not. The problem with these 2 ones is that when module is not in development all data is exported (why?) regardless it was imported by the dataset or not. Doing so AD_Client_ID is not checked (when exporting data just for data set is neither done, but in this case there is not client!=0 data), and data at client level is exported. Current exportation tool does only make sense for client 0.

My proposal is to add sql.append(" AND o.AD_Client_ID='0' "); in Translation.exportTable method for all cases.
(0022009)
hgbot   
2009-11-19 10:12   
Repository: erp/devel/pi
Changeset: 16664ab3d8dce50697d96fb7aebc84ea40474b07
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Nov 19 10:12:33 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/16664ab3d8dce50697d96fb7aebc84ea40474b07 [^]

Fixed issue 10991. Added filtering by client 0 on export translation.

---
M src/org/openbravo/erpCommon/ad_forms/Translation.java
---