details: /erp/devel/pi/rev/7470dce633ac changeset: 6534:7470dce633ac user: Martin Taal <martin.taal <at> openbravo.com> date: Mon Mar 01 11:36:14 2010 +0100 summary: Fixes issue 12497: Active property should have default value == true if no explicit default is defined
diffstat: src-test/org/openbravo/test/dal/IssuesTest.java | 17 ++++++++++++++++- src/org/openbravo/base/model/Property.java | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diffs (60 lines): diff -r 5c2f05f9b7ce -r 7470dce633ac src-test/org/openbravo/test/dal/IssuesTest.java --- a/src-test/org/openbravo/test/dal/IssuesTest.java Mon Mar 01 15:29:16 2010 +0530 +++ b/src-test/org/openbravo/test/dal/IssuesTest.java Mon Mar 01 11:36:14 2010 +0100 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SL - * All portions are Copyright (C) 2009 Openbravo SL + * All portions are Copyright (C) 2009-2010 Openbravo SL * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -40,7 +40,9 @@ import org.openbravo.model.ad.ui.Form; import org.openbravo.model.ad.ui.FormTrl; import org.openbravo.model.ad.ui.Message; +import org.openbravo.model.common.businesspartner.Location; import org.openbravo.model.common.enterprise.Organization; +import org.openbravo.model.common.invoice.InvoiceLine; import org.openbravo.test.base.BaseTest; /** @@ -57,6 +59,9 @@ * - https://issues.openbravo.com/view.php?id=12143 OBQuery class should add convenience method * uniqueResult similar to the OBCriteria class * + * - https://issues.openbravo.com/view.php?id=12497: Active property should have default value == + * true if no explicit default is defined + * * @author mtaal * @author iperdomo */ @@ -194,4 +199,14 @@ } OBDal.getInstance().rollbackAndClose(); } + + /** + * Tests issue: https://issues.openbravo.com/view.php?id=12497 + */ + public void test12497() { + final InvoiceLine invoiceLine = OBProvider.getInstance().get(InvoiceLine.class); + assertTrue(invoiceLine.isActive()); + Location bpLoc = OBProvider.getInstance().get(Location.class); + assertTrue(bpLoc.isActive()); + } } \ No newline at end of file diff -r 5c2f05f9b7ce -r 7470dce633ac src/org/openbravo/base/model/Property.java --- a/src/org/openbravo/base/model/Property.java Mon Mar 01 15:29:16 2010 +0530 +++ b/src/org/openbravo/base/model/Property.java Mon Mar 01 11:36:14 2010 +0100 @@ -313,7 +313,7 @@ } if (defaultValue == null && isBoolean()) { - if (getName().equalsIgnoreCase("isactive")) { + if (getName().equalsIgnoreCase("active")) { log .debug("Property " + this ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
