details: /erp/devel/pi/rev/db2ff87c56e8
changeset: 12142:db2ff87c56e8
user: Antonio Moreno <antonio.moreno <at> openbravo.com>
date: Thu May 12 19:11:30 2011 +0200
summary: Fixed issue 17146. Criteria not to compute combos made more strict.
If a combo is not showed, but either is mandatory, or has a default, then it
needs to be computed because the validation needs to be applied (in case its
mandatory, the first one of a validated list needs to be chosen, and in case
there is a default, maybe the default is not part of the validated list).
diffstat:
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
| 1 +
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/EnumUIDefinition.java
| 3 ++-
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/FKComboUIDefinition.java
| 3 ++-
3 files changed, 5 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 32c90cc9117f -r db2ff87c56e8
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
---
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
Thu May 12 19:07:46 2011 +0200
+++
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
Thu May 12 19:11:30 2011 +0200
@@ -440,6 +440,7 @@
} else {
// Else, the default is used
if (visibleProperties != null && !field.getColumn().isMandatory()
+ && field.getColumn().getDefaultValue() == null
&& !visibleProperties.contains("inp" +
Sqlc.TransformaNombreColumna(col))) {
// If the column is not currently visible, and its not
mandatory, we don't need to
// compute the combo.
diff -r 32c90cc9117f -r db2ff87c56e8
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/EnumUIDefinition.java
---
a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/EnumUIDefinition.java
Thu May 12 19:07:46 2011 +0200
+++
b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/EnumUIDefinition.java
Thu May 12 19:11:30 2011 +0200
@@ -51,7 +51,8 @@
JSONObject value;
try {
value = new JSONObject(super.getFieldProperties(field,
getValueFromSession));
- if (!field.isDisplayed()) {
+ if (!field.isDisplayed() && field.getColumn().getDefaultValue() == null
+ && !field.getColumn().isMandatory()) {
return value.toString();
}
if (!getValueFromSession
diff -r 32c90cc9117f -r db2ff87c56e8
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/FKComboUIDefinition.java
---
a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/FKComboUIDefinition.java
Thu May 12 19:07:46 2011 +0200
+++
b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/FKComboUIDefinition.java
Thu May 12 19:11:30 2011 +0200
@@ -46,7 +46,8 @@
JSONObject value;
try {
value = new JSONObject(super.getFieldProperties(field,
getValueFromSession));
- if (!field.isDisplayed()) {
+ if (!field.isDisplayed() && field.getColumn().getDefaultValue() == null
+ && !field.getColumn().isMandatory()) {
return value.toString();
}
return getValueInComboReference(field, getValueFromSession,
value.getString("classicValue"));
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits