From d664f2ad8497904bfa9d6f374758d6faff2ec761 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 2 Oct 2013 12:44:11 -0500 Subject: [PATCH] IDEMPIERE-159 Allow creation of combinations with Org * / based on patch from Nicolas Micoud (nmicoud) --- .../i1.0z/oracle/201310012030_IDEMPIERE-159.sql | 16 ++++++++++++++++ .../postgresql/201310012030_IDEMPIERE-159.sql | 12 ++++++++++++ .../src/org/compiere/model/MAccount.java | 2 +- .../adempiere/webui/window/WAccountDialog.java | 3 ++- 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 migration/i1.0z/oracle/201310012030_IDEMPIERE-159.sql create mode 100644 migration/i1.0z/postgresql/201310012030_IDEMPIERE-159.sql diff --git a/migration/i1.0z/oracle/201310012030_IDEMPIERE-159.sql b/migration/i1.0z/oracle/201310012030_IDEMPIERE-159.sql new file mode 100644 index 0000000000..b8ebe4c036 --- /dev/null +++ b/migration/i1.0z/oracle/201310012030_IDEMPIERE-159.sql @@ -0,0 +1,16 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Oct 1, 2013 8:22:41 PM CEST +-- IDEMPIERE-159 - Allow creation of combinations with Org * +INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,AD_Val_Rule_UU,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,200054,'a1f042c3-77df-4292-b515-89d77c959000','AD_Org.AD_Org_ID = 0 OR (AD_Org.AD_Client_ID=@AD_Client_ID@ AND AD_Org.IsSummary=''N'')',TO_DATE('2013-10-01 20:22:39','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','AD_Org of Client not parent (incl 0)','S',TO_DATE('2013-10-01 20:22:39','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Oct 1, 2013 8:23:09 PM CEST +-- IDEMPIERE-159 - Allow creation of combinations with Org * +UPDATE AD_Column SET AD_Reference_ID=19, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=200054,Updated=TO_DATE('2013-10-01 20:23:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1016 +; + + +SELECT register_migration_script('201310012030_IDEMPIERE-159.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i1.0z/postgresql/201310012030_IDEMPIERE-159.sql b/migration/i1.0z/postgresql/201310012030_IDEMPIERE-159.sql new file mode 100644 index 0000000000..a460bb5aec --- /dev/null +++ b/migration/i1.0z/postgresql/201310012030_IDEMPIERE-159.sql @@ -0,0 +1,12 @@ +-- Oct 1, 2013 8:22:41 PM CEST +-- IDEMPIERE-159 - Allow creation of combinations with Org * +INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,AD_Val_Rule_UU,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,200054,'a1f042c3-77df-4292-b515-89d77c959000','AD_Org.AD_Org_ID = 0 OR (AD_Org.AD_Client_ID=@AD_Client_ID@ AND AD_Org.IsSummary=''N'')',TO_TIMESTAMP('2013-10-01 20:22:39','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','AD_Org of Client not parent (incl 0)','S',TO_TIMESTAMP('2013-10-01 20:22:39','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Oct 1, 2013 8:23:09 PM CEST +-- IDEMPIERE-159 - Allow creation of combinations with Org * +UPDATE AD_Column SET AD_Reference_ID=19, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=200054,Updated=TO_TIMESTAMP('2013-10-01 20:23:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1016 +; + +SELECT register_migration_script('201310012030_IDEMPIERE-159.sql') FROM dual +; \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/MAccount.java b/org.adempiere.base/src/org/compiere/model/MAccount.java index 19e2155368..e032863f3c 100644 --- a/org.adempiere.base/src/org/compiere/model/MAccount.java +++ b/org.adempiere.base/src/org/compiere/model/MAccount.java @@ -574,7 +574,7 @@ public class MAccount extends X_C_ValidCombination { combiStr = "*"; descrStr = "*"; - fullyQualified = false; + //fullyQualified = false; IDEMPIERE 159 - allow combination with org * } } else if (MAcctSchemaElement.ELEMENTTYPE_Account.equals(element.getElementType())) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java index 4e809eaa00..96bf0d696d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java @@ -191,10 +191,11 @@ public final class WAccountDialog extends Window // Caption caption = new Caption(Msg.getMsg(Env.getCtx(),"Parameter")); parameterPanel.appendChild(caption); - parameterPanel.setHflex("1"); + parameterPanel.setHflex("95"); parameterPanel.setStyle("background-color: transparent;"); toolBar.setOrient("vertical"); toolBar.setStyle("border: none; margin: 5px"); + toolBar.setHflex("5"); bSave.setImage(ThemeManager.getThemeResource("images/Save24.png")); bSave.setTooltiptext(Msg.getMsg(Env.getCtx(),"AccountNewUpdate"));