diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/tree/AdempiereTreeModel.java b/org.adempiere.ui.swing/src/org/compiere/grid/tree/AdempiereTreeModel.java index c716d3c92d..e892c9445b 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/tree/AdempiereTreeModel.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/tree/AdempiereTreeModel.java @@ -77,7 +77,7 @@ public class AdempiereTreeModel extends DefaultTreeModel { no = DB.executeUpdate(sql.toString(),trx.getTrxName()); } if (from != to) - for (int i = 0; i < to.getChildCount(); i++) + for (int i = 0; i < to.getChildCount()-1; i++) { MTreeNode nd = (MTreeNode)to.getChildAt(i); StringBuilder sql = new StringBuilder("UPDATE ");