IDEMPIERE-471 Wrong behavior for 'Record on parent tab was changed by another user'
This commit is contained in:
parent
331fab6ed4
commit
27d790d1ae
|
@ -1056,6 +1056,30 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* refresh current row of parent tabs
|
||||
*/
|
||||
public void refreshParentTabs() {
|
||||
if (isDetail()) {
|
||||
// get parent tab
|
||||
// the parent tab is the first tab above with level = this_tab_level-1
|
||||
int level = m_vo.TabLevel;
|
||||
for (int i = m_window.getTabIndex(this) - 1; i >= 0; i--) {
|
||||
GridTab parentTab = m_window.getTab(i);
|
||||
if (parentTab.m_vo.TabLevel == level-1) {
|
||||
// this is parent tab
|
||||
parentTab.dataRefresh(false);
|
||||
// search for the next parent
|
||||
if (parentTab.isDetail()) {
|
||||
level = parentTab.m_vo.TabLevel;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Do we need to Save?
|
||||
* @param rowChange row change
|
||||
|
|
|
@ -1742,6 +1742,10 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
}
|
||||
}
|
||||
|
||||
if (dirtyTabpanel != null && dirtyTabpanel.getGridTab().isDetail()) {
|
||||
dirtyTabpanel.getGridTab().refreshParentTabs();
|
||||
}
|
||||
|
||||
if (callback != null)
|
||||
callback.onCallback(true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue