IDEMPIERE-1268 Payment Allocation is getting deleted from completed Payment record. Fixed handling of readonly logic for detailpane and processed flag for header tab.
This commit is contained in:
parent
bce1989d05
commit
49d501692c
|
@ -1389,6 +1389,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
|
||||
boolean changed = e.isChanged() || e.isInserting();
|
||||
boolean readOnly = adTabbox.getSelectedGridTab().isReadOnly();
|
||||
boolean processed = adTabbox.getSelectedGridTab().isProcessed();
|
||||
boolean insertRecord = !readOnly;
|
||||
if (!detailTab)
|
||||
{
|
||||
|
@ -1401,7 +1402,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
}
|
||||
toolbar.enableNew(!changed && insertRecord && !tabPanel.getGridTab().isSortTab());
|
||||
toolbar.enableRefresh(!changed);
|
||||
toolbar.enableDelete(!changed && !readOnly && !tabPanel.getGridTab().isSortTab());
|
||||
toolbar.enableDelete(!changed && !readOnly && !tabPanel.getGridTab().isSortTab() && !processed);
|
||||
//
|
||||
if (readOnly && adTabbox.getSelectedGridTab().isAlwaysUpdateField())
|
||||
{
|
||||
|
|
|
@ -542,7 +542,7 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
|
|||
Toolbar toolbar = (Toolbar) tabpanel.getFirstChild();
|
||||
|
||||
IADTabpanel adtab = getADTabpanel(index);
|
||||
if (adtab!=null && adtab.getGridTab().isSortTab())
|
||||
if (adtab!=null && (adtab.getGridTab().isSortTab() || adtab.getGridTab().isReadOnly()))
|
||||
readOnly = true;
|
||||
|
||||
boolean insertRecord = !readOnly;
|
||||
|
|
Loading…
Reference in New Issue