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.
This commit is contained in:
Carlos Ruiz 2011-03-08 11:43:49 -05:00
parent 780725390a
commit 52ccb1f03c
1 changed files with 3 additions and 4 deletions

View File

@ -762,8 +762,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
{ {
if (!toolbar.isPersonalLock) if (!toolbar.isPersonalLock)
return; return;
final int record_ID = curTab.getRecord_ID(); if (curTab.getRecord_ID() == -1) // No Key
if (record_ID == -1) // No Key
return; return;
if(m_popup == null) if(m_popup == null)
@ -776,7 +775,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
{ {
public void onEvent(Event event) throws Exception 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 curTab.loadAttachments(); // reload
toolbar.lock(curTab.isLocked()); toolbar.lock(curTab.isLocked());
@ -789,7 +788,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
{ {
public void onEvent(Event event) throws Exception 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()); toolbar.lock(curTab.isLocked());
} }