From d06505315c4d4daca86375938a661ccea9c413f0 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Tue, 13 Aug 2013 22:47:06 +0800 Subject: [PATCH] IDEMPIERE-1268 Payment Allocation is getting deleted from completed Payment record. --- .../adempiere/webui/adwindow/AbstractADWindowContent.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java index e3966e8c6f..ee8e104e9d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java @@ -1389,6 +1389,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements boolean changed = e.isChanged() || e.isInserting(); boolean readOnly = adTabbox.getSelectedGridTab().isReadOnly(); + boolean processed = "Y".equals(Env.getContext(Env.getCtx(), getWindowNo(), "Processed", true)); 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()) { @@ -1410,7 +1411,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements } else { - adTabbox.updateDetailPaneToolbar(changed, readOnly); + adTabbox.updateDetailPaneToolbar(changed, readOnly || processed); } toolbar.enableIgnore(adTabbox.needSave(true, false) || adTabbox.getSelectedGridTab().isNew() ||