hg merge release-5.1 (merge release5.1 into default)

This commit is contained in:
Carlos Ruiz 2018-02-26 12:19:18 +01:00
commit 351c9e22b1
3 changed files with 142 additions and 25 deletions

View File

@ -0,0 +1,49 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3632 Deprecated Message from Swing Time
-- Feb 24, 2018 2:59:57 PM CET
UPDATE AD_Tab SET CommitWarning='If you change the currency or costing method, you must reset all accounting transactions.
For changes to become effective, you must execute Cache Reset. ',Updated=TO_DATE('2018-02-24 14:59:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=199
;
-- Feb 24, 2018 3:02:19 PM CET
UPDATE AD_Tab SET CommitWarning='ATTENTION: ANY CHANGES here will affect the structure of your chart of accounts!
Depending what changes you did, you should reset accounting.
For changes to become effective, you must and execute Cache Reset and re-login.
Saving/deleting the record starts processes which may take a while.',Updated=TO_DATE('2018-02-24 15:02:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=217
;
-- Feb 24, 2018 3:02:45 PM CET
UPDATE AD_Tab SET CommitWarning='For changes to become effective, you must execute Cache Reset and re-login.',Updated=TO_DATE('2018-02-24 15:02:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200
;
-- Feb 24, 2018 3:03:29 PM CET
UPDATE AD_Tab SET CommitWarning='Create a new client via "Initial Client Setup". You can only change information here! You need execute Cache Reset and re-login for most changes made here to be effective. The change of the Material Policy applies to future transactions.',Updated=TO_DATE('2018-02-24 15:03:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=145
;
-- Feb 24, 2018 3:04:07 PM CET
UPDATE AD_Tab SET CommitWarning='You need to execute Cache Reset and re-login for most changes made here to be effective.',Updated=TO_DATE('2018-02-24 15:04:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=169
;
-- Feb 24, 2018 3:07:42 PM CET
UPDATE AD_Tab SET CommitWarning='Please create a support request - https://idempiere.atlassian.net/secure/CreateIssue.jspa - if the region info is not correct/incomplete.',Updated=TO_DATE('2018-02-24 15:07:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=136
;
-- Feb 24, 2018 3:08:40 PM CET
UPDATE AD_Tab SET CommitWarning='Please create a support request - https://idempiere.atlassian.net/secure/CreateIssue.jspa - if the country data is not correct.',Updated=TO_DATE('2018-02-24 15:08:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=135
;
-- Feb 24, 2018 3:10:25 PM CET
UPDATE AD_Tab SET CommitWarning='All not manually maintained Roles will automatically have access to the new Organization.
You need execute Cache Reset and re-login for most changes made here to be effective.',Updated=TO_DATE('2018-02-24 15:10:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=143
;
-- Feb 24, 2018 3:10:45 PM CET
UPDATE AD_Tab SET CommitWarning='You need execute Cache Reset and re-login for most changes made here to be effective.
',Updated=TO_DATE('2018-02-24 15:10:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=170
;
SELECT register_migration_script('201802241511_IDEMPIERE-3632.sql') FROM dual
;

View File

@ -0,0 +1,46 @@
-- IDEMPIERE-3632 Deprecated Message from Swing Time
-- Feb 24, 2018 2:59:57 PM CET
UPDATE AD_Tab SET CommitWarning='If you change the currency or costing method, you must reset all accounting transactions.
For changes to become effective, you must execute Cache Reset. ',Updated=TO_TIMESTAMP('2018-02-24 14:59:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=199
;
-- Feb 24, 2018 3:02:19 PM CET
UPDATE AD_Tab SET CommitWarning='ATTENTION: ANY CHANGES here will affect the structure of your chart of accounts!
Depending what changes you did, you should reset accounting.
For changes to become effective, you must and execute Cache Reset and re-login.
Saving/deleting the record starts processes which may take a while.',Updated=TO_TIMESTAMP('2018-02-24 15:02:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=217
;
-- Feb 24, 2018 3:02:45 PM CET
UPDATE AD_Tab SET CommitWarning='For changes to become effective, you must execute Cache Reset and re-login.',Updated=TO_TIMESTAMP('2018-02-24 15:02:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200
;
-- Feb 24, 2018 3:03:29 PM CET
UPDATE AD_Tab SET CommitWarning='Create a new client via "Initial Client Setup". You can only change information here! You need execute Cache Reset and re-login for most changes made here to be effective. The change of the Material Policy applies to future transactions.',Updated=TO_TIMESTAMP('2018-02-24 15:03:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=145
;
-- Feb 24, 2018 3:04:07 PM CET
UPDATE AD_Tab SET CommitWarning='You need to execute Cache Reset and re-login for most changes made here to be effective.',Updated=TO_TIMESTAMP('2018-02-24 15:04:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=169
;
-- Feb 24, 2018 3:07:42 PM CET
UPDATE AD_Tab SET CommitWarning='Please create a support request - https://idempiere.atlassian.net/secure/CreateIssue.jspa - if the region info is not correct/incomplete.',Updated=TO_TIMESTAMP('2018-02-24 15:07:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=136
;
-- Feb 24, 2018 3:08:40 PM CET
UPDATE AD_Tab SET CommitWarning='Please create a support request - https://idempiere.atlassian.net/secure/CreateIssue.jspa - if the country data is not correct.',Updated=TO_TIMESTAMP('2018-02-24 15:08:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=135
;
-- Feb 24, 2018 3:10:25 PM CET
UPDATE AD_Tab SET CommitWarning='All not manually maintained Roles will automatically have access to the new Organization.
You need execute Cache Reset and re-login for most changes made here to be effective.',Updated=TO_TIMESTAMP('2018-02-24 15:10:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=143
;
-- Feb 24, 2018 3:10:45 PM CET
UPDATE AD_Tab SET CommitWarning='You need execute Cache Reset and re-login for most changes made here to be effective.
',Updated=TO_TIMESTAMP('2018-02-24 15:10:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=170
;
SELECT register_migration_script('201802241511_IDEMPIERE-3632.sql') FROM dual
;

View File

@ -208,7 +208,9 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
private int numberOfFormColumns;
public static final String ON_TOGGLE_EVENT = "onToggle";
private static final String DEFAULT_PANEL_WIDTH = "300px";
private static enum SouthEvent {
SLIDE(),
OPEN(),
@ -370,7 +372,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
treePanel = new ADTreePanel(windowNo, gridTab.getTabNo());
West west = new West();
west.appendChild(treePanel);
ZKUpdateUtil.setWidth(west, "300px");
ZKUpdateUtil.setWidth(west, widthTreePanel());
west.setCollapsible(true);
west.setSplittable(true);
west.setAutoscroll(true);
@ -1302,6 +1304,15 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
return height;
}
private String widthTreePanel() {
String width = null;
int windowId = getGridTab().getAD_Window_ID();
int adTabId = getGridTab().getAD_Tab_ID();
if (windowId > 0 && adTabId > 0)
width = Env.getPreference(Env.getCtx(), windowId, adTabId+"|TreePanel.Width", false);
return Util.isEmpty(width) ? DEFAULT_PANEL_WIDTH : width;
}
private void navigateTo(DefaultTreeNode<MTreeNode> value) {
MTreeNode treeNode = value.getData();
// We Have a TreeNode
@ -1877,33 +1888,44 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
if (formContainer.getSouth() != null) {
if (formContainer.getSouth().isVisible() && formContainer.getSouth().isOpen()) {
String height = formContainer.getSouth().getHeight();
if (! Util.isEmpty(height)) {
int windowId = getGridTab().getAD_Window_ID();
int adTabId = getGridTab().getAD_Tab_ID();
if (windowId > 0 && adTabId > 0) {
Query query = new Query(Env.getCtx(), MTable.get(Env.getCtx(), I_AD_Preference.Table_ID), "AD_Window_ID=? AND Attribute=? AND AD_User_ID=? AND AD_Process_ID IS NULL AND PreferenceFor = 'W'", null);
int userId = Env.getAD_User_ID(Env.getCtx());
MPreference preference = query.setOnlyActiveRecords(true)
.setApplyAccessFilter(true)
.setParameters(windowId, adTabId+"|DetailPane.Height", userId)
.first();
if (preference == null || preference.getAD_Preference_ID() <= 0) {
preference = new MPreference(Env.getCtx(), 0, null);
preference.setAD_Window_ID(windowId);
preference.set_ValueOfColumn("AD_User_ID", userId); // required set_Value for System=0 user
preference.setAttribute(adTabId+"|DetailPane.Height");
}
preference.setValue(height);
preference.saveEx();
//update current context
Env.getCtx().setProperty("P"+windowId+"|"+adTabId+"|DetailPane.Height", height);
}
}
if (! Util.isEmpty(height))
savePreference("DetailPane.Height", height);
}
}
if (treePanel != null && formContainer.getWest() != null) {
if (formContainer.getWest().isVisible() && formContainer.getWest().isOpen()) {
String width = formContainer.getWest().getWidth();
if (! Util.isEmpty(width))
savePreference("TreePanel.Width", width);
}
}
super.onPageDetached(page);
}
void savePreference(String attribute, String value)
{
int windowId = getGridTab().getAD_Window_ID();
int adTabId = getGridTab().getAD_Tab_ID();
if (windowId > 0 && adTabId > 0) {
Query query = new Query(Env.getCtx(), MTable.get(Env.getCtx(), I_AD_Preference.Table_ID), "AD_Window_ID=? AND Attribute=? AND AD_User_ID=? AND AD_Process_ID IS NULL AND PreferenceFor = 'W'", null);
int userId = Env.getAD_User_ID(Env.getCtx());
MPreference preference = query.setOnlyActiveRecords(true)
.setApplyAccessFilter(true)
.setParameters(windowId, adTabId+"|"+attribute, userId)
.first();
if (preference == null || preference.getAD_Preference_ID() <= 0) {
preference = new MPreference(Env.getCtx(), 0, null);
preference.setAD_Window_ID(windowId);
preference.set_ValueOfColumn("AD_User_ID", userId); // required set_Value for System=0 user
preference.setAttribute(adTabId+"|"+attribute);
}
preference.setValue(value);
preference.saveEx();
//update current context
Env.getCtx().setProperty("P"+windowId+"|"+adTabId+"|"+attribute, value);
}
}
protected void onClientInfo() {
if (!uiCreated || gridTab == null) return;
int numCols=gridTab.getNumColumns();