~syleam/+junk/wms

« back to all changes in this revision

Viewing changes to wms/object/report_stock.py

  • Committer: Christophe Chauvet
  • Date: 2010-08-25 13:33:33 UTC
  • Revision ID: christophe.chauvet@syleam.fr-20100825133333-piavdr6hi5is0w7w
[FIX] When there are no product lot or tracking the field is NULL and return the bad sum

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
                     FROM   stock_move m11
68
68
                     WHERE  m11.state = m0.state
69
69
                     AND    m11.product_id = m0.product_id
70
 
                     AND    m11.prodlot_id = m0.prodlot_id
71
 
                     AND    m11.tracking_id = m0.tracking_id
 
70
                     AND    m11.prodlot_id IS NOT DISTINCT FROM m0.prodlot_id
 
71
                     AND    m11.tracking_id IS NOT DISTINCT FROM m0.tracking_id
72
72
                     AND    m11.location_dest_id = m0.location_dest_id
73
73
                     AND    m11.location_id != m0.location_dest_id
74
74
                     ) -
76
76
                     FROM   stock_move m14
77
77
                     WHERE  m14.state= m0.state
78
78
                     AND    m14.product_id = m0.product_id
79
 
                     AND    m14.prodlot_id = m0.prodlot_id
80
 
                     AND    m14.tracking_id = m0.tracking_id
 
79
                     AND    m14.prodlot_id IS NOT DISTINCT FROM m0.prodlot_id
 
80
                     AND    m14.tracking_id IS NOT DISTINCT FROM m0.tracking_id
81
81
                     AND    m14.location_id = m0.location_dest_id
82
82
                     AND    m14.location_dest_id != m0.location_dest_id) as qty
83
83
            FROM   stock_move m0
99
99
 
100
100
ReportStockReal()
101
101
 
102
 
 
103
 
 
104
102
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: