Fixes Issue 31936: The SQL query of M_INVENTORY_LISTCREATE store procedure was
authorNono Carballo <f.carballo@nectus.com>
Wed, 27 Jan 2016 00:44:55 -0500
changeset 28550 24252e1edbaa
parent 28549 759c92f6e8a2
child 28551 9080d38ba575
child 28943 c57f89020b7f
Fixes Issue 31936: The SQL query of M_INVENTORY_LISTCREATE store procedure was
tuned to take care about null values.

The SQL query to retrieve the products that will be part of the lines was tuned
to take care about null values in aset.isoneattrsetvalrequired field.
The line AND aset.isoneattrsetvalrequired = 'Y' was replaced with
AND COALESCE(aset.isoneattrsetvalrequired, '-') = 'Y'
src-db/database/model/functions/M_INVENTORY_LISTCREATE.xml
--- a/src-db/database/model/functions/M_INVENTORY_LISTCREATE.xml	Fri Jan 29 09:17:02 2016 +0100
+++ b/src-db/database/model/functions/M_INVENTORY_LISTCREATE.xml	Wed Jan 27 00:44:55 2016 -0500
@@ -19,7 +19,7 @@
   * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
   * All Rights Reserved.
   * Contributor(s): Openbravo SLU
-  * Contributions are Copyright (C) 2001-2015 Openbravo, S.L.U.
+  * Contributions are Copyright (C) 2001-2016 Openbravo, S.L.U.
   *
   * Specifically, this derivative work is based upon the following Compiere
   * file and version.
@@ -238,7 +238,7 @@
           AND l.M_Attributesetinstance_ID=s.M_Attributesetinstance_ID
         )
         AND (NOT (coalesce(p.attrsetvaluetype, '-') <> 'F'
-		 AND aset.isoneattrsetvalrequired = 'Y'
+		 AND COALESCE(aset.isoneattrsetvalrequired, '-') = 'Y'
 		 AND COALESCE(s.m_attributesetinstance_id, '0') = '0'
 		 AND QTYONHAND = 0
 		 AND COALESCE(QTYORDERONHAND,0) = 0