OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 156 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 156 Rev 180
Line 12... Line 12...
12
 */
12
 */
13
 
13
 
14
 package org.openconcerto.erp.core.humanresources.employe.element;
14
 package org.openconcerto.erp.core.humanresources.employe.element;
15
 
15
 
16
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
16
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
-
 
17
import org.openconcerto.erp.core.edm.AttachmentAction;
17
import org.openconcerto.sql.element.SQLComponent;
18
import org.openconcerto.sql.element.SQLComponent;
-
 
19
import org.openconcerto.sql.view.list.IListeAction.IListeEvent;
-
 
20
import org.openconcerto.sql.view.list.RowAction.PredicateRowAction;
18
import org.openconcerto.utils.ListMap;
21
import org.openconcerto.utils.ListMap;
19
 
22
 
20
import java.util.ArrayList;
23
import java.util.ArrayList;
21
import java.util.List;
24
import java.util.List;
22
 
25
 
Line 26... Line 29...
26
        super("COMMERCIAL");
29
        super("COMMERCIAL");
27
    }
30
    }
28
 
31
 
29
    public CommercialSQLElement(String tableName, String singular, String plural) {
32
    public CommercialSQLElement(String tableName, String singular, String plural) {
30
        super(tableName, singular, plural);
33
        super(tableName, singular, plural);
-
 
34
        if (getTable().contains("ATTACHMENTS")) {
-
 
35
            PredicateRowAction actionAttachment = new PredicateRowAction(new AttachmentAction().getAction(), true);
-
 
36
            actionAttachment.setPredicate(IListeEvent.getSingleSelectionPredicate());
-
 
37
            getRowActions().add(actionAttachment);
-
 
38
        }
31
    }
39
    }
32
 
40
 
33
    protected List<String> getListFields() {
41
    protected List<String> getListFields() {
34
        final List<String> l = new ArrayList<String>();
42
        final List<String> l = new ArrayList<String>();
35
        l.add("NOM");
43
        l.add("NOM");