hg merge release-2.1 (merge release2.1 into development)

This commit is contained in:
Carlos Ruiz 2015-02-23 08:20:31 -05:00
commit f083199a46
13 changed files with 151 additions and 49 deletions

View File

@ -0,0 +1,19 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Feb 3, 2015 1:45:55 PM ICT
-- IDEMPIERE-2440 lengh of org name in session active is wrong
UPDATE AD_Column SET FieldLength=60,Updated=TO_DATE('2015-02-03 13:45:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706
;
-- Feb 3, 2015 2:02:04 PM ICT
UPDATE AD_Column SET FieldLength=60,Updated=TO_DATE('2015-02-03 14:02:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200599
;
-- Feb 3, 2015 2:02:04 PM ICT
UPDATE AD_Column SET FieldLength=60,Updated=TO_DATE('2015-02-03 14:02:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200705
;
SELECT register_migration_script('201502031604_IDEMPIERE-2440.sql') FROM dual
;

View File

@ -0,0 +1,43 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-2475 Some lists not ordered in translated languages
-- 18/02/2015 11:55:02 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_DATE('2015-02-18 11:55:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=284
;
-- 18/02/2015 11:55:16 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_DATE('2015-02-18 11:55:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=251
;
-- 18/02/2015 11:55:33 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_DATE('2015-02-18 11:55:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=102
;
-- 18/02/2015 11:55:49 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_DATE('2015-02-18 11:55:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=156
;
-- 18/02/2015 11:56:01 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_DATE('2015-02-18 11:56:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=257
;
-- 18/02/2015 11:56:15 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_DATE('2015-02-18 11:56:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=258
;
-- 18/02/2015 11:56:29 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_DATE('2015-02-18 11:56:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=1
;
-- 18/02/2015 11:56:41 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_DATE('2015-02-18 11:56:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=269
;
-- 18/02/2015 11:56:56 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_DATE('2015-02-18 11:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=163
;
SELECT register_migration_script('201502181200_IDEMPIERE-2475.sql') FROM dual
;

View File

@ -0,0 +1,16 @@
-- Feb 3, 2015 1:45:55 PM ICT
-- IDEMPIERE-2440 lengh of org name in session active is wrong
UPDATE AD_Column SET FieldLength=60,Updated=TO_TIMESTAMP('2015-02-03 13:45:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706
;
-- Feb 3, 2015 2:02:04 PM ICT
UPDATE AD_Column SET FieldLength=60,Updated=TO_TIMESTAMP('2015-02-03 14:02:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200599
;
-- Feb 3, 2015 2:02:04 PM ICT
UPDATE AD_Column SET FieldLength=60,Updated=TO_TIMESTAMP('2015-02-03 14:02:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200705
;
SELECT register_migration_script('201502031604_IDEMPIERE-2440.sql') FROM dual
;

View File

@ -0,0 +1,40 @@
-- IDEMPIERE-2475 Some lists not ordered in translated languages
-- 18/02/2015 11:55:02 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_TIMESTAMP('2015-02-18 11:55:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=284
;
-- 18/02/2015 11:55:16 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_TIMESTAMP('2015-02-18 11:55:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=251
;
-- 18/02/2015 11:55:33 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_TIMESTAMP('2015-02-18 11:55:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=102
;
-- 18/02/2015 11:55:49 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_TIMESTAMP('2015-02-18 11:55:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=156
;
-- 18/02/2015 11:56:01 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_TIMESTAMP('2015-02-18 11:56:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=257
;
-- 18/02/2015 11:56:15 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_TIMESTAMP('2015-02-18 11:56:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=258
;
-- 18/02/2015 11:56:29 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_TIMESTAMP('2015-02-18 11:56:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=1
;
-- 18/02/2015 11:56:41 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_TIMESTAMP('2015-02-18 11:56:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=269
;
-- 18/02/2015 11:56:56 AM COT
UPDATE AD_Ref_Table SET OrderByClause=NULL,Updated=TO_TIMESTAMP('2015-02-18 11:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=163
;
SELECT register_migration_script('201502181200_IDEMPIERE-2475.sql') FROM dual
;

View File

@ -18,6 +18,7 @@ package org.compiere.model;
import java.io.Serializable; import java.io.Serializable;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.text.Collator;
import java.util.Comparator; import java.util.Comparator;
import java.util.Properties; import java.util.Properties;
@ -127,7 +128,8 @@ public class MCity extends X_C_City
String s2 = o2.toString(); String s2 = o2.toString();
if (s2 == null) if (s2 == null)
s2 = ""; s2 = "";
return s1.compareTo(s2); Collator collator = Collator.getInstance();
return collator.compare(s1, s2);
} // compare } // compare
} // MCity } // MCity

View File

@ -20,6 +20,7 @@ import static org.compiere.model.SystemIDs.COUNTRY_US;
import java.io.Serializable; import java.io.Serializable;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.text.Collator;
import java.util.Arrays; import java.util.Arrays;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
@ -47,7 +48,7 @@ public class MCountry extends X_C_Country
/** /**
* *
*/ */
private static final long serialVersionUID = -4015127112992493778L; private static final long serialVersionUID = -4966707939803861163L;
/** /**
* Get Country (cached) * Get Country (cached)
@ -163,17 +164,6 @@ public class MCountry extends X_C_Country
+ " - Default=" + s_default); + " - Default=" + s_default);
} }
/**
* Return Language
* @return Name
*/
private String getEnvLanguage() {
String lang = Env.getAD_Language(Env.getCtx());
if (Language.isBaseLanguage(lang))
return null;
return lang;
}
/** /**
* Set the Language for Display (toString) * Set the Language for Display (toString)
* @param AD_Language language or null * @param AD_Language language or null
@ -232,22 +222,13 @@ public class MCountry extends X_C_Country
super(ctx, rs, trxName); super(ctx, rs, trxName);
} // MCountry } // MCountry
/** Translated Name */
private String m_trlName = null;
/** /**
* Return Name - translated if DisplayLanguage is set. * Return Name - translated if DisplayLanguage is set.
* @return Name * @return Name
*/ */
public String toString() public String toString()
{ {
if (getEnvLanguage() != null) return getTrlName();
{
String nn = getTrlName();
if (nn != null)
return nn;
}
return getName();
} // toString } // toString
/** /**
@ -256,13 +237,7 @@ public class MCountry extends X_C_Country
*/ */
public String getTrlName() public String getTrlName()
{ {
if (m_trlName == null && getEnvLanguage() != null) return getTrlName(Env.getAD_Language(Env.getCtx()));
{
m_trlName = get_Translation(COLUMNNAME_Name, getEnvLanguage());
if (m_trlName == null)
m_trlName = getName();
}
return m_trlName;
} // getTrlName } // getTrlName
/** /**
@ -272,11 +247,7 @@ public class MCountry extends X_C_Country
*/ */
public String getTrlName(String language) public String getTrlName(String language)
{ {
if ( language != null) return get_Translation(COLUMNNAME_Name, language);
{
m_trlName = get_Translation(COLUMNNAME_Name, language);
}
return m_trlName;
} // getTrlName } // getTrlName
@ -319,7 +290,8 @@ public class MCountry extends X_C_Country
String s2 = o2.toString(); String s2 = o2.toString();
if (s2 == null) if (s2 == null)
s2 = ""; s2 = "";
return s1.compareTo(s2); Collator collator = Collator.getInstance();
return collator.compare(s1, s2);
} // compare } // compare
/** /**

View File

@ -20,6 +20,7 @@ import java.io.Serializable;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Statement; import java.sql.Statement;
import java.text.Collator;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Comparator; import java.util.Comparator;
@ -227,7 +228,8 @@ public class MRegion extends X_C_Region
String s2 = o2.toString(); String s2 = o2.toString();
if (s2 == null) if (s2 == null)
s2 = ""; s2 = "";
return s1.compareTo(s2); Collator collator = Collator.getInstance();
return collator.compare(s1, s2);
} // compare } // compare
/** /**

View File

@ -28,6 +28,7 @@ import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Savepoint; import java.sql.Savepoint;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.text.Collator;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator; import java.util.Comparator;
import java.util.HashMap; import java.util.HashMap;
@ -344,6 +345,7 @@ public abstract class PO
if (!(o2 instanceof PO)) if (!(o2 instanceof PO))
throw new ClassCastException ("Not PO -2- " + o2); throw new ClassCastException ("Not PO -2- " + o2);
// same class // same class
Collator collator = Collator.getInstance();
if (o1.getClass().equals(o2.getClass())) if (o1.getClass().equals(o2.getClass()))
{ {
int index = get_ColumnIndex("DocumentNo"); int index = get_ColumnIndex("DocumentNo");
@ -363,10 +365,10 @@ public abstract class PO
return -1; return -1;
else if (comp2 == null) else if (comp2 == null)
return 1; return 1;
return comp1.toString().compareTo(comp2.toString()); return collator.compare(comp1.toString(), comp2.toString());
} }
} }
return o1.toString().compareTo(o2.toString()); return collator.compare(o1.toString(), o2.toString());
} // compare } // compare
/** /**

View File

@ -17,6 +17,7 @@
package org.compiere.util; package org.compiere.util;
import java.io.Serializable; import java.io.Serializable;
import java.text.Collator;
import java.util.Comparator; import java.util.Comparator;
/** /**
@ -84,7 +85,8 @@ public abstract class NamePair implements Comparator<Object>, Serializable, Comp
{ {
String s1 = o1 == null ? "" : o1.toString(); String s1 = o1 == null ? "" : o1.toString();
String s2 = o2 == null ? "" : o2.toString(); String s2 = o2 == null ? "" : o2.toString();
return s1.compareTo (s2); // sort order ?? Collator collator = Collator.getInstance();
return collator.compare(s1, s2);
} // compare } // compare
/** /**

View File

@ -866,7 +866,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
public void onCallback(Boolean result) { public void onCallback(Boolean result) {
if (result) { if (result) {
adTabbox.getSelectedGridTab().navigate(rowIndex); adTabbox.getSelectedGridTab().navigate(rowIndex);
focusToActivePanel(); //focusToActivePanel();
} }
} }
}; };

View File

@ -853,7 +853,11 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace, IFi
ADWindow adwindow = ADWindow.findADWindow(adtabpanel); ADWindow adwindow = ADWindow.findADWindow(adtabpanel);
if (adwindow != null) { if (adwindow != null) {
IADTabpanel selectedADTabpanel = adwindow.getADWindowContent().getADTab().getSelectedTabpanel(); IADTabpanel selectedADTabpanel = adwindow.getADWindowContent().getADTab().getSelectedTabpanel();
if (selectedADTabpanel != adtabpanel) IADTabpanel selectedADDetailTabpanel = null ;
if(selectedADTabpanel.getDetailPane() != null)
selectedADDetailTabpanel = selectedADTabpanel.getDetailPane().getSelectedADTabpanel();
if (selectedADTabpanel != adtabpanel && selectedADDetailTabpanel != null && selectedADDetailTabpanel != adtabpanel)
setFocus = false; setFocus = false;
} }
} }

View File

@ -373,15 +373,15 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
bZoom.setTooltiptext(Msg.getCleanMsg(Env.getCtx(), "Zoom")); bZoom.setTooltiptext(Msg.getCleanMsg(Env.getCtx(), "Zoom"));
bZoom.addEventListener(Events.ON_CLICK, this); bZoom.addEventListener(Events.ON_CLICK, this);
bExpand.setLabel("Expand Tree"); bExpand.setLabel(Msg.getCleanMsg(Env.getCtx(), "ExpandTree"));
bExpand.setTooltiptext(Msg.getCleanMsg(Env.getCtx(), "ExpandTree")); bExpand.setTooltiptext(Msg.getCleanMsg(Env.getCtx(), "ExpandTree"));
bExpand.addEventListener(Events.ON_CLICK, this); bExpand.addEventListener(Events.ON_CLICK, this);
justmine.setLabel("Just Mine"); justmine.setLabel(Msg.getCleanMsg(Env.getCtx(), "JustMine"));
justmine.setTooltiptext(Msg.getCleanMsg(Env.getCtx(), "JustMine")); justmine.setTooltiptext(Msg.getCleanMsg(Env.getCtx(), "JustMine"));
justmine.addEventListener(Events.ON_CHECK,this); justmine.addEventListener(Events.ON_CHECK,this);
showColors.setLabel("Show Colors"); showColors.setLabel(Msg.getCleanMsg(Env.getCtx(), "ShowColors"));
showColors.setTooltiptext(Msg.getCleanMsg(Env.getCtx(), "ShowColors")); showColors.setTooltiptext(Msg.getCleanMsg(Env.getCtx(), "ShowColors"));
showColors.addEventListener(Events.ON_CHECK,this); showColors.addEventListener(Events.ON_CHECK,this);

View File

@ -102,8 +102,8 @@ public class ADTreeOnDropListener implements EventListener<Event> {
int path[] = treeModel.getPath(toNode); int path[] = treeModel.getPath(toNode);
Treeitem toItem = tree.renderItemByPath(path); Treeitem toItem = tree.renderItemByPath(path);
tree.setSelectedItem(toItem); //tree.setSelectedItem(toItem);
Events.sendEvent(tree, new Event(Events.ON_SELECT, tree)); //Events.sendEvent(tree, new Event(Events.ON_SELECT, tree));
MenuListener listener = new MenuListener(movingNode, toNode); MenuListener listener = new MenuListener(movingNode, toNode);
@ -154,8 +154,8 @@ public class ADTreeOnDropListener implements EventListener<Event> {
tree.onInitRender(); tree.onInitRender();
} }
Treeitem movingItem = tree.renderItemByPath(path); Treeitem movingItem = tree.renderItemByPath(path);
tree.setSelectedItem(movingItem); //tree.setSelectedItem(movingItem);
Events.sendEvent(tree, new Event(Events.ON_SELECT, tree)); //Events.sendEvent(tree, new Event(Events.ON_SELECT, tree));
// *** Save changes to disk // *** Save changes to disk
Trx trx = Trx.get (Trx.createTrxName("ADTree"), true); Trx trx = Trx.get (Trx.createTrxName("ADTree"), true);