IDEMPIERE-5232 : Chart field at tenant level - filter datasource (System and current tenant only) (#1263)

This commit is contained in:
Nicolas Micoud 2022-03-25 11:52:12 +01:00 committed by GitHub
parent 3090f2384b
commit ab0db6e9aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -4,6 +4,7 @@ import java.sql.ResultSet;
import java.util.List;
import java.util.Properties;
import org.compiere.util.Env;
public class MChart extends X_AD_Chart {
@ -11,7 +12,7 @@ public class MChart extends X_AD_Chart {
/**
*
*/
private static final long serialVersionUID = -8851465915516536910L;
private static final long serialVersionUID = 5720760885280644477L;
private int windowNo=0;
@ -24,9 +25,11 @@ public class MChart extends X_AD_Chart {
}
public List<MChartDatasource> getDatasources() {
return new Query(getCtx(), MChartDatasource.Table_Name, MChart.COLUMNNAME_AD_Chart_ID + "=?", null)
.setParameters(getAD_Chart_ID()).setOnlyActiveRecords(true).list();
return new Query(getCtx(), MChartDatasource.Table_Name, "AD_Chart_ID = ? AND AD_Client_ID IN (0, ?)", null)
.setParameters(getAD_Chart_ID(), Env.getAD_Client_ID(getCtx()))
.setOnlyActiveRecords(true)
.list();
}
public void setWindowNo(int windowNo) {