[ 1721710 ] Changing BPartner in a completed document should be denied

http://sourceforge.net/tracker/index.php?func=detail&aid=1721710&group_id=176962&atid=879332
This commit is contained in:
teo_sarca 2007-05-19 09:48:23 +00:00
parent fbbcbd1e3c
commit 5ca57972ac
1 changed files with 4 additions and 0 deletions

View File

@ -211,6 +211,7 @@ public class VLookup extends JComponent
{
mBPartnerNew = new CMenuItem (Msg.getMsg(Env.getCtx(), "New"), Env.getImageIcon("InfoBPartner16.gif"));
mBPartnerNew.addActionListener(this);
mBPartnerNew.setVisible(isReadWrite()); // visible only if the field is editable - teo_sarca [ 1721710 ]
popupMenu.add(mBPartnerNew);
mBPartnerUpd = new CMenuItem (Msg.getMsg(Env.getCtx(), "Update"), Env.getImageIcon("InfoBPartner16.gif"));
mBPartnerUpd.addActionListener(this);
@ -343,6 +344,9 @@ public class VLookup extends JComponent
if (m_comboActive)
setValue (m_value);
}
// If the field is readonly the BPartner new option should be hidden - teo_sarca [ 1721710 ]
if (mBPartnerNew != null)
mBPartnerNew.setVisible(value);
} // setReadWrite
/**