IDEMPIERE-127 Implement Recent Items dashboard

http://jira.idempiere.com/browse/IDEMPIERE-127
error trying to save when no new record saved (as pushing find on an empty new record)
This commit is contained in:
Carlos Ruiz 2012-02-03 20:11:31 -05:00
parent 47ec4aa29b
commit 714e17635b
1 changed files with 16 additions and 14 deletions

View File

@ -1564,20 +1564,22 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
if (wasChanged) {
if (newRecord) {
if (curTabIndex == 0) {
MRecentItem.addModifiedField(ctx, curTab.getAD_Table_ID(),
curTab.getRecord_ID(), Env.getAD_User_ID(ctx),
Env.getAD_Role_ID(ctx), curTab.getAD_Window_ID(),
curTab.getAD_Tab_ID());
} else {
/* when a detail record is modified add header to recent items */
GridTab mainTab = gridWindow.getTab(0);
if (mainTab != null) {
MRecentItem.addModifiedField(ctx, mainTab.getAD_Table_ID(),
mainTab.getRecord_ID(), Env.getAD_User_ID(ctx),
Env.getAD_Role_ID(ctx), mainTab.getAD_Window_ID(),
mainTab.getAD_Tab_ID());
}
if (curTab.getRecord_ID() > 0) {
if (curTabIndex == 0) {
MRecentItem.addModifiedField(ctx, curTab.getAD_Table_ID(),
curTab.getRecord_ID(), Env.getAD_User_ID(ctx),
Env.getAD_Role_ID(ctx), curTab.getAD_Window_ID(),
curTab.getAD_Tab_ID());
} else {
/* when a detail record is modified add header to recent items */
GridTab mainTab = gridWindow.getTab(0);
if (mainTab != null) {
MRecentItem.addModifiedField(ctx, mainTab.getAD_Table_ID(),
mainTab.getRecord_ID(), Env.getAD_User_ID(ctx),
Env.getAD_Role_ID(ctx), mainTab.getAD_Window_ID(),
mainTab.getAD_Tab_ID());
}
}
}
} else {
if (curTabIndex == 0) {