IDEMPIERE-24 Export 2pack zip on BP window fails / make export safer with parenthesis on OR

This commit is contained in:
Carlos Ruiz 2012-10-31 15:22:28 -05:00
parent ae74c7e714
commit 2fc2d6a9c1
1 changed files with 3 additions and 2 deletions

View File

@ -59,12 +59,13 @@ public class GridTab2PackExporter implements IGridTabExporter {
} else { } else {
for(int i = 0; i < gridTab.getRowCount(); i++) { for(int i = 0; i < gridTab.getRowCount(); i++) {
if (i == 0) if (i == 0)
sql.append(" WHERE "); sql.append(" WHERE ((");
else else
sql.append(" OR "); sql.append(") OR (");
gridTab.navigate(i); gridTab.navigate(i);
sql.append(gridTab.getTableModel().getWhereClause(gridTab.getCurrentRow())); sql.append(gridTab.getTableModel().getWhereClause(gridTab.getCurrentRow()));
} }
sql.append("))");
} }
for(GridTab child : childs) { for(GridTab child : childs) {
if (child.getTabLevel() > gridTab.getTabLevel()+1) { if (child.getTabLevel() > gridTab.getTabLevel()+1) {