[ adempiere-Posterita-1827793 ] Error using U_Menu and should use U_WebMenu
http://sourceforge.net/tracker/?func=detail&atid=928568&aid=1827793&group_id=176962
This commit is contained in:
parent
d992038004
commit
893be04fd9
|
@ -317,19 +317,19 @@ public class MenuManager
|
|||
|
||||
String sqlStatement = "";
|
||||
|
||||
sqlStatement = "select m.U_Menu_ID, " +
|
||||
sqlStatement = "select m.U_WebMenu_ID, " +
|
||||
"m.Name, m.MenuLink, " +
|
||||
"m.Module, m.ParentMenu_ID, " +
|
||||
"m.isActive, " +
|
||||
"m.ImageLink, m.Position " +
|
||||
"from U_MENU m where " + //m.AD_Client_ID = " + adClientId +
|
||||
"from U_WEBMENU m where " + //m.AD_Client_ID = " + adClientId +
|
||||
" m.AD_CLIENT_ID=0"+
|
||||
" and m.AD_ORG_ID=0" +
|
||||
" and m.isactive = 'Y'";
|
||||
|
||||
// sqlStatement += " and m." + OrganisationManager.getOrganisationSqlStatement(ctx);
|
||||
|
||||
sqlStatement += " order by m.U_Menu_ID";
|
||||
sqlStatement += " order by m.U_WebMenu_ID";
|
||||
|
||||
System.out.println(sqlStatement);
|
||||
|
||||
|
@ -526,7 +526,7 @@ public class MenuManager
|
|||
{
|
||||
int id = POSMenuFactory.getFactoryInstance(ctx).get(ctx,role).getID();
|
||||
|
||||
String sql="select AD_ROLE_ID from U_ROLEMENU where U_MENU_ID="+id;
|
||||
String sql="select AD_ROLE_ID from U_ROLEMENU where U_WEBMENU_ID="+id;
|
||||
boolean access=false;
|
||||
int currentRoleId=Env.getAD_Role_ID(ctx);
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ public class RoleMenuManager
|
|||
|
||||
if(parentMenuId != 0)
|
||||
{
|
||||
int[] parentRoleMenuIds = MRoleMenu.getAllIDs(MRoleMenu.Table_Name, " ad_role_id = " + roleId + " and u_menu_id = " + parentMenuId, trxName);
|
||||
int[] parentRoleMenuIds = MRoleMenu.getAllIDs(MRoleMenu.Table_Name, " ad_role_id = " + roleId + " and u_webmenu_id = " + parentMenuId, trxName);
|
||||
|
||||
if (parentRoleMenuIds.length == 0)
|
||||
roleMenu = createRoleMenu(ctx,roleId,parentMenuId, trxName);
|
||||
|
|
|
@ -706,6 +706,43 @@ public class StockManager
|
|||
pstmt = null;
|
||||
}
|
||||
|
||||
//begin e-evolution is necessary find also search key
|
||||
if (productId == 0)
|
||||
{
|
||||
sql = "select m_product_id from m_product where value='"+barCode+"'"
|
||||
+" and AD_CLIENT_ID="+Env.getAD_Client_ID(ctx);
|
||||
|
||||
System.out.println("BarCode: " + barCode);
|
||||
|
||||
pstmt = DB.prepareStatement(sql, null);
|
||||
|
||||
try
|
||||
{
|
||||
ResultSet rs = pstmt.executeQuery();
|
||||
while (rs.next())
|
||||
{
|
||||
productId=rs.getInt(1);
|
||||
}
|
||||
rs.close();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
throw new OperationException(e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
pstmt.close();
|
||||
}
|
||||
catch(Exception e)
|
||||
{}
|
||||
|
||||
pstmt = null;
|
||||
}
|
||||
}
|
||||
//end e-evolution is necessary find also search key
|
||||
|
||||
return productId;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ public class MMenu extends X_U_WebMenu
|
|||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public MMenu(Properties ctx, int U_Menu_ID, String trxName)
|
||||
public MMenu(Properties ctx, int U_WebMenu_ID, String trxName)
|
||||
{
|
||||
super(ctx, U_Menu_ID, trxName);
|
||||
super(ctx, U_WebMenu_ID, trxName);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,9 +23,9 @@ import org.compiere.model.X_U_WebMenu;
|
|||
import org.posterita.exceptions.OperationException;
|
||||
|
||||
|
||||
public class UDIU_Menu extends UDIPO
|
||||
public class UDIU_WebMenu extends UDIPO
|
||||
{
|
||||
public UDIU_Menu(X_U_WebMenu menu)
|
||||
public UDIU_WebMenu(X_U_WebMenu menu)
|
||||
{
|
||||
super(menu);
|
||||
}
|
Loading…
Reference in New Issue