IDEMPIERE-4559 Customize and Process detail toolbar buttons are not clickable after creating a new record in the header (#390)

This commit is contained in:
Diego Ruiz 2020-11-19 06:41:36 +01:00 committed by GitHub
parent 254c871665
commit 58e83d9faa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -743,6 +743,7 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
deleteRecord = adtab.getGridTab().isDeleteRecord();
}
boolean enableDelete = !changed && deleteRecord && !adtab.getGridTab().isSortTab();
boolean enableCustomize = !adtab.getGridTab().isSortTab();
ADWindow adwindow = ADWindow.findADWindow(this);
if (adwindow == null)
@ -761,6 +762,8 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
btn.setDisabled(false);
} else if (BTN_SAVE_ID.equals(btn.getId())) {
btn.setDisabled(!adtab.needSave(true, false));
} else if (BTN_CUSTOMIZE_ID.equals(btn.getId())) {
btn.setDisabled(!enableCustomize);
}
else if (BTN_QUICK_FORM_ID.equals(btn.getId())) {
btn.setDisabled(!(adtab.isEnableQuickFormButton() && !adtab.getGridTab().isReadOnly()));
@ -786,11 +789,10 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
IADTabpanel adtab = getADTabpanel(index);
if (adtab == null) return;
String processImage = ThemeManager.getThemeResource(PROCESS_IMAGE);
for(Component c : toolbar.getChildren()) {
if (c instanceof ToolBarButton) {
ToolBarButton btn = (ToolBarButton) c;
if (processImage.equals(btn.getImage())) {
if (BTN_PROCESS_ID.equals(btn.getId())) {
if (adtab.getGridTab().isSortTab()) {
btn.setDisabled(true);
} else {