IDEMPIERE-3486:info business partner hard code to set isCustomer, isVendor, so break "Value Preference " and avoid customize
This commit is contained in:
parent
2b6321b8d9
commit
0543f00cf5
|
@ -0,0 +1,14 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- IDEMPIERE-3486 add default logic for customize and vendor parameter
|
||||||
|
-- Sep 13, 2017 9:25:06 PM ICT
|
||||||
|
UPDATE AD_InfoColumn SET DefaultValue='@SQL=SELECT ''@IsSOTrx:Y@'' AS DefaultValue FROM DUAL',Updated=TO_DATE('2017-09-13 21:25:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200036
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 13, 2017 9:25:14 PM ICT
|
||||||
|
UPDATE AD_InfoColumn SET DefaultValue='@SQL=SELECT CASE ''@IsSOTrx:N@'' WHEN ''N'' THEN ''Y'' ELSE ''N'' END AS DefaultValue FROM DUAL',Updated=TO_DATE('2017-09-13 21:25:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200037
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201709131604_IDEMPIERE-3486.sql') FROM dual
|
||||||
|
;
|
|
@ -0,0 +1,11 @@
|
||||||
|
-- IDEMPIERE-3486 add default logic for customize and vendor parameter
|
||||||
|
-- Sep 13, 2017 9:25:06 PM ICT
|
||||||
|
UPDATE AD_InfoColumn SET DefaultValue='@SQL=SELECT ''@IsSOTrx:Y@'' AS DefaultValue FROM DUAL',Updated=TO_TIMESTAMP('2017-09-13 21:25:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200036
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 13, 2017 9:25:14 PM ICT
|
||||||
|
UPDATE AD_InfoColumn SET DefaultValue='@SQL=SELECT CASE ''@IsSOTrx:N@'' WHEN ''N'' THEN ''Y'' ELSE ''N'' END AS DefaultValue FROM DUAL',Updated=TO_TIMESTAMP('2017-09-13 21:25:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200037
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201709131604_IDEMPIERE-3486.sql') FROM dual
|
||||||
|
;
|
|
@ -78,37 +78,6 @@ public class InfoBPartnerWindow extends InfoWindow {
|
||||||
ih = null;
|
ih = null;
|
||||||
} // showHistory
|
} // showHistory
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
* set value of checkbox IsVendor and IsCustomer by IsSOTrx flag
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
protected void initParameters() {
|
|
||||||
String isSOTrx = Env.getContext(Env.getCtx(), p_WindowNo, "IsSOTrx");
|
|
||||||
if (!isLookup() && Util.isEmpty(isSOTrx)) {
|
|
||||||
isSOTrx = "Y";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Util.isEmpty(isSOTrx)) {
|
|
||||||
if ("Y".equals(isSOTrx)) {
|
|
||||||
// set value of IsCustomer checkbox
|
|
||||||
for (WEditor editor : editors) {
|
|
||||||
if (editor.getGridField() != null && editor.getGridField().getColumnName().equals("IsCustomer")) {
|
|
||||||
editor.setValue("Y");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if ("N".equals(isSOTrx)) {
|
|
||||||
// set value of IsVendor checkbox
|
|
||||||
for (WEditor editor : editors) {
|
|
||||||
if (editor.getGridField() != null && editor.getGridField().getColumnName().equals("IsVendor")) {
|
|
||||||
editor.setValue("Y");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void saveSelectionDetail() {
|
protected void saveSelectionDetail() {
|
||||||
|
|
Loading…
Reference in New Issue