~unifield-team/unifield-wm/us-901

« back to all changes in this revision

Viewing changes to specific_rules/unconsistent_stock_report.py

  • Committer: Quentin THEURET
  • Date: 2016-02-05 09:13:42 UTC
  • Revision ID: qt@tempo-consulting.fr-20160205091342-t1rlox5gd0mjurks
US-901 [FIX] Product which are in Pickins Not Available were displayed on report

Show diffs side-by-side

added added

removed removed

Lines of Context:
191
191
                (
192
192
                    (sp.subtype = 'packing' AND sp.state IN ('draft', 'assigned'))
193
193
                  OR
194
 
                    (sp.subtype != 'packing' AND sp.state NOT IN ('cancel', 'done'))
 
194
                    (sp.subtype != 'packing' AND sp.state NOT IN ('cancel', 'done') AND sm.state = 'assigned')
195
195
                )
196
196
              AND
197
197
                pp.batch_management = %%s
245
245
            WHERE
246
246
                sl.usage = 'internal'
247
247
                AND
248
 
                si.state NOT IN ('done', 'cancel')
 
248
                si.state NOT IN ('draft', 'done', 'cancel')
249
249
                AND
250
250
                (
251
251
                    (pp.perishable AND NOT pp.batch_management AND (sil.expiry_date IS NULL OR spl.type != 'internal'))