IDEMPIERE-3340 Fix cross tenant in Favourites (#1445)

This commit is contained in:
Carlos Ruiz 2022-08-17 12:17:13 +02:00 committed by GitHub
parent e670ebbd14
commit a558644949
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -75,9 +75,9 @@ public class MTreeFavoriteNode extends X_AD_Tree_Favorite_Node
*/
public static MTreeFavoriteNode getFavouriteTreeNodeFromMenuID(int AD_Tree_Favorite_ID, int Menu_ID)
{
Query query = new Query(Env.getCtx(), MTreeFavoriteNode.Table_Name, "AD_Tree_Favorite_ID=? AND AD_Menu_ID=? AND IsFavourite='Y'", null);
Query query = new Query(Env.getCtx(), MTreeFavoriteNode.Table_Name, "AD_Tree_Favorite_ID=? AND AD_Menu_ID=? AND IsFavourite='Y' AND AD_Client_ID IN (0,?)", null);
query.setOnlyActiveRecords(true);
query.setParameters(new Object[] { AD_Tree_Favorite_ID, Menu_ID });
query.setParameters(new Object[] { AD_Tree_Favorite_ID, Menu_ID, Env.getAD_Client_ID(Env.getCtx()) });
return query.first();
} // getFavouriteTreeNodeFromMenuID