← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~numerigraphe-team/stock-logistic-warehouse/7.0-stock_available_immediately-compute-error into lp:stock-logistic-warehouse

 

Lionel Sausin - Numérigraphe has proposed merging lp:~numerigraphe-team/stock-logistic-warehouse/7.0-stock_available_immediately-compute-error into lp:stock-logistic-warehouse.

Requested reviews:
  Guewen Baconnier @ Camptocamp (gbaconnier-c2c)
  Loïc Bellier - Numérigraphe (lb-b)
  Sébastien BEAU - http://www.akretion.com (sebastien.beau)
  Stock and Logistic Core Editors (stock-logistic-core-editors)
Related bugs:
  Bug #1320857 in Stock And Logistic Warehouse: "stock_available_immediately computes wrong stock level"
  https://bugs.launchpad.net/stock-logistic-warehouse/+bug/1320857

For more details, see:
https://code.launchpad.net/~numerigraphe-team/stock-logistic-warehouse/7.0-stock_available_immediately-compute-error/+merge/220023

compute "Immediately Usable" as: Quantity On Hand - Outgoing as stated by the description
-- 
https://code.launchpad.net/~numerigraphe-team/stock-logistic-warehouse/7.0-stock_available_immediately-compute-error/+merge/220023
Your team Stock and Logistic Core Editors is requested to review the proposed merge of lp:~numerigraphe-team/stock-logistic-warehouse/7.0-stock_available_immediately-compute-error into lp:stock-logistic-warehouse.
=== modified file 'stock_available_immediately/product.py'
--- stock_available_immediately/product.py	2014-02-19 11:43:35 +0000
+++ stock_available_immediately/product.py	2014-05-19 12:45:19 +0000
@@ -55,7 +55,7 @@
         if 'immediately_usable_qty' in field_names:
             for product_id, stock_qty in res.iteritems():
                 res[product_id]['immediately_usable_qty'] = \
-                    stock_qty['qty_available'] + stock_qty['outgoing_qty']
+                    stock_qty['qty_available'] - stock_qty['outgoing_qty']
 
         return res