OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 174 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 174 Rev 182
Line 1... Line 1...
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 * 
3
 * 
4
 * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
4
 * Copyright 2011-2019 OpenConcerto, by ILM Informatique. All rights reserved.
5
 * 
5
 * 
6
 * The contents of this file are subject to the terms of the GNU General Public License Version 3
6
 * The contents of this file are subject to the terms of the GNU General Public License Version 3
7
 * only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
7
 * only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
8
 * copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
8
 * copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
9
 * language governing permissions and limitations under the License.
9
 * language governing permissions and limitations under the License.
Line 23... Line 23...
23
import org.openconcerto.sql.Configuration;
23
import org.openconcerto.sql.Configuration;
24
import org.openconcerto.sql.element.SQLComponent;
24
import org.openconcerto.sql.element.SQLComponent;
25
import org.openconcerto.sql.model.FieldPath;
25
import org.openconcerto.sql.model.FieldPath;
26
import org.openconcerto.sql.model.SQLRowAccessor;
26
import org.openconcerto.sql.model.SQLRowAccessor;
27
import org.openconcerto.sql.model.SQLRowValues;
27
import org.openconcerto.sql.model.SQLRowValues;
-
 
28
import org.openconcerto.sql.model.Where;
28
import org.openconcerto.sql.model.graph.Path;
29
import org.openconcerto.sql.model.graph.Path;
29
import org.openconcerto.sql.preferences.SQLPreferences;
30
import org.openconcerto.sql.preferences.SQLPreferences;
-
 
31
import org.openconcerto.sql.request.ComboSQLRequest;
30
import org.openconcerto.sql.request.ListSQLRequest;
32
import org.openconcerto.sql.request.ListSQLRequest;
31
import org.openconcerto.sql.view.list.BaseSQLTableModelColumn;
33
import org.openconcerto.sql.view.list.BaseSQLTableModelColumn;
32
import org.openconcerto.sql.view.list.IListe;
34
import org.openconcerto.sql.view.list.IListe;
33
import org.openconcerto.sql.view.list.IListeAction.IListeEvent;
35
import org.openconcerto.sql.view.list.IListeAction.IListeEvent;
34
import org.openconcerto.sql.view.list.RowAction.PredicateRowAction;
36
import org.openconcerto.sql.view.list.RowAction.PredicateRowAction;
Line 39... Line 41...
39
 
41
 
40
import java.awt.Font;
42
import java.awt.Font;
41
import java.awt.event.ActionEvent;
43
import java.awt.event.ActionEvent;
42
import java.util.ArrayList;
44
import java.util.ArrayList;
43
import java.util.Arrays;
45
import java.util.Arrays;
-
 
46
import java.util.Collections;
44
import java.util.List;
47
import java.util.List;
45
import java.util.Set;
48
import java.util.Set;
46
 
49
 
47
import javax.swing.AbstractAction;
50
import javax.swing.AbstractAction;
48
 
51
 
Line 69... Line 72...
69
                    @Override
72
                    @Override
70
                    public void actionPerformed(ActionEvent e) {
73
                    public void actionPerformed(ActionEvent e) {
71
                        final SQLRowAccessor row = IListe.get(e).fetchSelectedRow();
74
                        final SQLRowAccessor row = IListe.get(e).fetchSelectedRow();
72
                        FicheClientXmlSheet sheet = new FicheClientXmlSheet(row.asRow());
75
                        FicheClientXmlSheet sheet = new FicheClientXmlSheet(row.asRow());
73
                        sheet.createDocumentAsynchronous();
76
                        sheet.createDocumentAsynchronous();
74
                        sheet.showPrintAndExportAsynchronous(true, false, true);
77
                        sheet.showPrintAndExportAsynchronous(true, false, true, Collections.emptyList());
75
                    }
78
                    }
76
                }, false, "customerrelationship.customer.info.create");
79
                }, false, "customerrelationship.customer.info.create");
77
                actionFicheClient.setPredicate(IListeEvent.getSingleSelectionPredicate());
80
                actionFicheClient.setPredicate(IListeEvent.getSingleSelectionPredicate());
78
                getRowActions().add(actionFicheClient);
81
                getRowActions().add(actionFicheClient);
79
 
82
 
Line 206... Line 209...
206
            }
209
            }
207
        });
210
        });
208
 
211
 
209
    }
212
    }
210
 
213
 
-
 
214
    @Override
-
 
215
    protected void _initComboRequest(ComboSQLRequest req) {
-
 
216
        super._initComboRequest(req);
-
 
217
        req.setWhere(new Where(getTable().getField("OBSOLETE"), "=", Boolean.FALSE));
-
 
218
    }
-
 
219
 
211
    /*
220
    /*
212
     * (non-Javadoc)
221
     * (non-Javadoc)
213
     * 
222
     * 
214
     * @see org.openconcerto.devis.SQLElement#getComponent()
223
     * @see org.openconcerto.devis.SQLElement#getComponent()
215
     */
224
     */