IDEMPIERE-5249 product info window doesn't show list and standard price if pricelist selected when starting. #resolve (#1276)

This commit is contained in:
Carlos Ruiz 2022-04-05 04:32:52 +02:00 committed by GitHub
parent b2b2cf1a5c
commit 190240ae4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 30 additions and 0 deletions

View File

@ -502,9 +502,39 @@ public class InfoProductWindow extends InfoWindow {
M_Warehouse_ID = Env.getContextAsInt(Env.getCtx(), Env.M_WAREHOUSE_ID); M_Warehouse_ID = Env.getContextAsInt(Env.getCtx(), Env.M_WAREHOUSE_ID);
if (M_Warehouse_ID != 0) if (M_Warehouse_ID != 0)
setWarehouse (M_Warehouse_ID); setWarehouse (M_Warehouse_ID);
else {
// check for default value of field
for(WEditor editor : editors) {
if (editor.getGridField() != null && editor.getGridField().getColumnName().equals("M_Warehouse_ID")) {
if (editor.getValue() != null) {
M_Warehouse_ID = (Integer) editor.getValue();
if (M_Warehouse_ID > 0) {
Env.setContext(infoContext, p_WindowNo, "M_Warehouse_ID", M_Warehouse_ID);
Env.setContext(infoContext, p_WindowNo, Env.TAB_INFO, "M_Warehouse_ID", Integer.toString(M_Warehouse_ID));
}
}
break;
}
}
}
// Set PriceList Version // Set PriceList Version
if (M_PriceList_Version_ID != 0) if (M_PriceList_Version_ID != 0)
setPriceListVersion (M_PriceList_Version_ID); setPriceListVersion (M_PriceList_Version_ID);
else {
// check for default value of field
for(WEditor editor : editors) {
if (editor.getGridField() != null && editor.getGridField().getColumnName().equals("M_PriceList_Version_ID")) {
if (editor.getValue() != null) {
M_PriceList_Version_ID = (Integer) editor.getValue();
if (M_PriceList_Version_ID > 0) {
Env.setContext(infoContext, p_WindowNo, "M_PriceList_Version_ID", M_PriceList_Version_ID);
Env.setContext(infoContext, p_WindowNo, Env.TAB_INFO, "M_PriceList_Version_ID", Integer.toString(M_PriceList_Version_ID));
}
}
break;
}
}
}
} }
/** /**