~zaber/openobject-addons/stable_5.0-extra-addons

« back to all changes in this revision

Viewing changes to c2c_immediately_usable/product.py

  • Committer: Joël Grand-Guillaume
  • Date: 2010-10-27 14:22:06 UTC
  • Revision ID: joel.grandguillaume@camptocamp.com-20101027142206-uiw9zo1a1jsxf34l
[FIX] on c2c_immediately usable

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
        if 'immediately_usable_qty' in field_names:        
44
44
            # for each product we compute the stock 
45
45
            for product_id, stock_qty in res.iteritems():
46
 
                res[product_id]['immediately_usable_qty'] = stock_qty['qty_available'] - stock_qty['outgoing_qty']
 
46
                res[product_id]['immediately_usable_qty'] = stock_qty['qty_available'] - abs(stock_qty['outgoing_qty'])
47
47
        
48
48
        return res
49
49