From 52ccb1f03ccb5fe6458dd07920b494eeb0ddf5a0 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 8 Mar 2011 11:43:49 -0500 Subject: [PATCH] Just one record for personal lock or record access can be saved. Steps to reproduce: - Enable Personal Lock on a Role (i.e. GardenAdmin) - Log in as GardenAdmin, open Payment Term window and lock the first record - Then try to lock the second record, it's not possible, just one record can be saved on the same session This commit fix the problem. --- .../org/adempiere/webui/panel/AbstractADWindowPanel.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java index 1ad038a9e8..85929fc8e9 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java @@ -762,8 +762,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To { if (!toolbar.isPersonalLock) return; - final int record_ID = curTab.getRecord_ID(); - if (record_ID == -1) // No Key + if (curTab.getRecord_ID() == -1) // No Key return; if(m_popup == null) @@ -776,7 +775,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To { public void onEvent(Event event) throws Exception { - curTab.lock(Env.getCtx(), record_ID, !toolbar.getButton("Lock").isPressed()); + curTab.lock(Env.getCtx(), curTab.getRecord_ID(), !toolbar.getButton("Lock").isPressed()); curTab.loadAttachments(); // reload toolbar.lock(curTab.isLocked()); @@ -789,7 +788,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To { public void onEvent(Event event) throws Exception { - new WRecordAccessDialog(null, curTab.getAD_Table_ID(), record_ID); + new WRecordAccessDialog(null, curTab.getAD_Table_ID(), curTab.getRecord_ID()); toolbar.lock(curTab.isLocked()); }