Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0002153Openbravo ERP04. Warehouse managementpublic2007-10-24 19:082008-06-20 17:49
user71 
cromero 
normalminoralways
closedfixed 
5
 
2.40alpha-r3 
No
Core
No
0002153: Error SELECT in Rpt_Etiquetas_data.xsql
My instalation:
Openbravo 2.34
Oracle

There is an error in SELECT clause in the file Rpt_Etiquetas_data.xsql

Where is the next SELECT

        SELECT M_PRODUCT.M_PRODUCT_ID AS ID, COALESCE(M_PRODUCT_CUSTOMER.NAME, M_PRODUCT.NAME) AS NAME,
        COALESCE(M_PRODUCT_CUSTOMER.DESCRIPTION, M_PRODUCT.DESCRIPTION) AS DESCRIPTION, COALESCE(M_PRODUCT_CUSTOMER.UPC, M_PRODUCT.UPC) AS UPC,
        '' AS LOT, '' AS GUARANTEEDATE
        FROM M_PRODUCT LEFT JOIN M_PRODUCT_CUSTOMER on M_PRODUCT.M_PRODUCT_ID = M_PRODUCT_CUSTOMER.M_PRODUCT_ID
        WHERE M_PRODUCT.M_PRODUCT_ID = ?
        AND M_PRODUCT_CUSTOMER.C_BPARTNER_ID = ?

must be the another one:

        SELECT M_PRODUCT.M_PRODUCT_ID AS ID, COALESCE(M_PRODUCT_CUSTOMER.NAME, M_PRODUCT.NAME) AS NAME,
        COALESCE(M_PRODUCT_CUSTOMER.DESCRIPTION, M_PRODUCT.DESCRIPTION) AS DESCRIPTION, COALESCE(M_PRODUCT_CUSTOMER.UPC, M_PRODUCT.UPC) AS UPC,
        '' AS LOT, '' AS GUARANTEEDATE
        FROM M_PRODUCT LEFT JOIN M_PRODUCT_CUSTOMER on M_PRODUCT.M_PRODUCT_ID = M_PRODUCT_CUSTOMER.M_PRODUCT_ID
        AND M_PRODUCT_CUSTOMER.C_BPARTNER_ID = ?
        WHERE M_PRODUCT.M_PRODUCT_ID = ?

("AND M_PRODUCT_CUSTOMER.C_BPARTNER_ID = ?" must be in the JOIN and not in the WHERE)
because if not exists the data in M_PRODUCT_CUSTOMER for the product al customer selected, it doesn't give any record
No tags attached.
Issue History
2008-06-20 17:49plujanStatusresolved => closed

Notes
(0005742)
user71   
2005-06-01 00:00   
(edited on: 2008-06-12 09:43)
This bug was originally reported in SourceForge bug tracker and then migrated to Mantis.

You can see the original bug report in:
https://sourceforge.net/support/tracker.php?aid=1819444 [^]
(0002478)
cromero   
2008-05-22 14:36   
(edited on: 2008-06-12 09:22)
Logged In: YES
user_id=1500614
Originator: NO

Fixed in the trunk in revision 4462