← Back to team overview

openerp-india team mailing list archive

[Bug 870090] Re: More refactoring needed for partial pickings

 

It's also on my wishlist. A separate function for average price
computation is necessary.

The current computation should also be improved: prices should not be
rounded by the currency_obj.compute function. All the decimal precision
available is needed in such computation (especially when your currency
has no decimal...)

=== modified file 'stock/stock.py'
--- stock/stock.py	2011-11-29 14:23:09 +0000
+++ stock/stock.py	2011-12-06 04:23:09 +0000
@@ -1216,7 +1216,7 @@
 
                     if qty > 0:
                         new_price = currency_obj.compute(cr, uid, product_currency,
-                                move_currency_id, product_price)
+                                move_currency_id, product_price, False)
                         new_price = uom_obj._compute_price(cr, uid, product_uom, new_price,
                                 product.uom_id.id)
                         if product.qty_available <= 0:
@@ -2457,7 +2457,7 @@
                 qty = uom_obj._compute_qty(cr, uid, product_uom, product_qty, product.uom_id.id)
                 if qty > 0:
                     new_price = currency_obj.compute(cr, uid, product_currency,
-                            move_currency_id, product_price)
+                            move_currency_id, product_price, False)
                     new_price = uom_obj._compute_price(cr, uid, product_uom, new_price,
                             product.uom_id.id)
                     if product.qty_available <= 0:

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/870090

Title:
  More refactoring needed for partial pickings

Status in OpenERP Addons (modules):
  Confirmed

Bug description:
  I would love to make a patch for the trunk for a simple improvement in the partial picking procedure (https://bugs.launchpad.net/openobject-addons/+bug/891664).
  In v5, it used to be a straigtforward patch in an old-style wizard.
  in V6, some form of refactoring has been made, but the # FIXMEs admit that this was not made right.
  Now the whole thing in unreadable, and it makes it hard for the community to contribute improvements.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/870090/+subscriptions